diff --git a/.env b/.env index 33a7f2fa23..9a2acd73f0 100644 --- a/.env +++ b/.env @@ -116,6 +116,11 @@ PRODUCT_CATALOG_PORT=3550 PRODUCT_CATALOG_ADDR=product-catalog:${PRODUCT_CATALOG_PORT} PRODUCT_CATALOG_DOCKERFILE=./src/product-catalog/Dockerfile +# Product Reviews Service +PRODUCT_REVIEWS_PORT=3551 +PRODUCT_REVIEWS_ADDR=product-reviews:${PRODUCT_REVIEWS_PORT} +PRODUCT_REVIEWS_DOCKERFILE=./src/product-reviews/Dockerfile + # Quote Service QUOTE_PORT=8090 QUOTE_ADDR=http://quote:${QUOTE_PORT} @@ -150,6 +155,17 @@ KAFKA_HOST=kafka KAFKA_ADDR=${KAFKA_HOST}:${KAFKA_PORT} KAFKA_DOCKERFILE=./src/kafka/Dockerfile +# LLM service +LLM_DOCKERFILE=./src/llm/Dockerfile +LLM_HOST=llm +LLM_PORT=8000 + +# Mock LLM - to use a real OpenAI API-compatible LLM, +# configure the .env.override file +LLM_BASE_URL=http://${LLM_HOST}:${LLM_PORT}/v1 +LLM_MODEL=astronomy-llm +OPENAI_API_KEY=dummy + # Valkey VALKEY_PORT=6379 VALKEY_ADDR=valkey-cart:${VALKEY_PORT} diff --git a/.env.override b/.env.override index 1288b8a2be..2dfb07107e 100644 --- a/.env.override +++ b/.env.override @@ -1,2 +1,12 @@ # DO NOT PUSH CHANGES OF THIS FILE TO opentelemetry/opentelemetry-demo # PLACE YOUR .env ENVIRONMENT VARIABLES OVERRIDES IN THIS FILE + + +# To use a real OpenAI API-compatible LLM, +# set the appropriate values for the target LLM +# Required permissions: +# [Models and Model capabilities] + +#LLM_BASE_URL=https://api.openai.com/v1 +#LLM_MODEL=gpt-4o-mini +#OPENAI_API_KEY= diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index b6fb10d29c..86faf441c0 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -14,7 +14,7 @@ permissions: jobs: build_images: - permissions: # required by the reusable workflow + permissions: # required by the reusable workflow contents: read packages: write uses: ./.github/workflows/component-build-images.yml diff --git a/.github/workflows/component-build-images.yml b/.github/workflows/component-build-images.yml index a4c954476d..37565babac 100644 --- a/.github/workflows/component-build-images.yml +++ b/.github/workflows/component-build-images.yml @@ -106,6 +106,10 @@ jobs: tag_suffix: kafka context: ./ setup-qemu: true + - file: ./src/llm/Dockerfile + tag_suffix: llm + context: ./ + setup-qemu: true - file: ./src/load-generator/Dockerfile tag_suffix: load-generator context: ./ @@ -126,6 +130,10 @@ jobs: tag_suffix: product-catalog context: ./ setup-qemu: true + - file: ./src/product-reviews/Dockerfile + tag_suffix: product-reviews + context: ./ + setup-qemu: true - file: ./src/quote/Dockerfile tag_suffix: quote context: ./ diff --git a/.licenserc.json b/.licenserc.json index b3603842b9..8a0d1fdb9a 100644 --- a/.licenserc.json +++ b/.licenserc.json @@ -47,6 +47,8 @@ "src/checkout/genproto/", "src/flagd-ui/assets/vendor/", "src/product-catalog/genproto/", + "src/product-reviews/demo_pb2.py", + "src/product-reviews/demo_pb2_grpc.py", "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 3900d2bc02..fd4efc51c1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,8 @@ the release. ([#2615](https://github.com/open-telemetry/opentelemetry-demo/pull/2615)) * [frontend] Fix navigation and cart math ([#2660](https://github.com/open-telemetry/opentelemetry-demo/pull/2660)) +* [feat] Add Product Review service with AI-generated summaries + ([#2663](https://github.com/open-telemetry/opentelemetry-demo/pull/2663)) * [chore] Upgrade OpenFeature and add fix deprecation warnings for dependency injection ([#2644](https://github.com/open-telemetry/opentelemetry-demo/pull/2644)) diff --git a/docker-compose-tests.yml b/docker-compose-tests.yml index d9418a5d79..6ab7175768 100644 --- a/docker-compose-tests.yml +++ b/docker-compose-tests.yml @@ -45,6 +45,7 @@ services: - FRONTEND_ADDR - PAYMENT_ADDR - PRODUCT_CATALOG_ADDR + - PRODUCT_REVIEWS_ADDR - RECOMMENDATION_ADDR - SHIPPING_ADDR - KAFKA_ADDR @@ -73,10 +74,14 @@ services: condition: service_started frontend: condition: service_started + llm: + condition: service_started payment: condition: service_started product-catalog: condition: service_started + product-reviews: + condition: service_started quote: condition: service_started recommendation: diff --git a/docker-compose.minimal.yml b/docker-compose.minimal.yml index e51b86183d..48c70d4106 100644 --- a/docker-compose.minimal.yml +++ b/docker-compose.minimal.yml @@ -430,6 +430,47 @@ services: condition: service_started logging: *logging + # Product reviews service + product-reviews: + image: ${IMAGE_NAME}:${DEMO_VERSION}-product-reviews + container_name: product-reviews + build: + context: ./ + dockerfile: ${PRODUCT_REVIEWS_DOCKERFILE} + cache_from: + - ${IMAGE_NAME}:${IMAGE_VERSION}-product-reviews + deploy: + resources: + limits: + memory: 500M + restart: unless-stopped + ports: + - "${PRODUCT_REVIEWS_PORT}" + environment: + - PRODUCT_REVIEWS_PORT + - OTEL_PYTHON_LOG_CORRELATION=true + - OTEL_EXPORTER_OTLP_ENDPOINT + - OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + - OTEL_RESOURCE_ATTRIBUTES + - OTEL_SERVICE_NAME=product-reviews + - OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT=true + - PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python + - DB_CONNECTION_STRING=host=${POSTGRES_HOST} user=otelu password=otelp dbname=${POSTGRES_DB} + - LLM_BASE_URL + - OPENAI_API_KEY + - LLM_MODEL + - PRODUCT_CATALOG_ADDR + depends_on: + product-catalog: + condition: service_started + llm: + condition: service_started + postgresql: + condition: service_started + otel-collector: + condition: service_started + logging: *logging + # Quote service quote: image: ${IMAGE_NAME}:${DEMO_VERSION}-quote @@ -559,6 +600,27 @@ services: logging: *logging + # LLM used by Product Review service + llm: + image: ${IMAGE_NAME}:${DEMO_VERSION}-llm + container_name: llm + build: + context: ./ + dockerfile: ${LLM_DOCKERFILE} + cache_from: + - ${IMAGE_NAME}:${IMAGE_VERSION}-llm + deploy: + resources: + limits: + memory: 50M + restart: unless-stopped + environment: + - FLAGD_HOST + - FLAGD_PORT + ports: + - "${LLM_PORT}" + logging: *logging + # Valkey used by Cart service valkey-cart: image: ${VALKEY_IMAGE} diff --git a/docker-compose.yml b/docker-compose.yml index 0a15c6866c..86bd955d25 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -288,6 +288,7 @@ services: - CHECKOUT_ADDR - CURRENCY_ADDR - PRODUCT_CATALOG_ADDR + - PRODUCT_REVIEWS_ADDR - RECOMMENDATION_ADDR - SHIPPING_ADDR - OTEL_EXPORTER_OTLP_ENDPOINT @@ -511,6 +512,51 @@ services: condition: service_started logging: *logging + # Product reviews service + product-reviews: + image: ${IMAGE_NAME}:${DEMO_VERSION}-product-reviews + container_name: product-reviews + build: + context: ./ + dockerfile: ${PRODUCT_REVIEWS_DOCKERFILE} + cache_from: + - ${IMAGE_NAME}:${IMAGE_VERSION}-product-reviews + deploy: + resources: + limits: + memory: 100M + restart: unless-stopped + ports: + - "${PRODUCT_REVIEWS_PORT}" + environment: + - PRODUCT_REVIEWS_PORT + - OTEL_PYTHON_LOG_CORRELATION=true + - OTEL_EXPORTER_OTLP_ENDPOINT + - OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE + - OTEL_RESOURCE_ATTRIBUTES + - OTEL_SERVICE_NAME=product-reviews + - OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT=true + - PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python + - DB_CONNECTION_STRING=host=${POSTGRES_HOST} user=otelu password=otelp dbname=${POSTGRES_DB} + - LLM_BASE_URL + - OPENAI_API_KEY + - LLM_MODEL + - PRODUCT_CATALOG_ADDR + - FLAGD_HOST + - FLAGD_PORT + - LLM_HOST + - LLM_PORT + depends_on: + product-catalog: + condition: service_started + llm: + condition: service_started + postgresql: + condition: service_started + otel-collector: + condition: service_started + logging: *logging + # Quote service quote: image: ${IMAGE_NAME}:${DEMO_VERSION}-quote @@ -704,6 +750,30 @@ services: retries: 10 logging: *logging + # LLM used by Product Review service + llm: + image: ${IMAGE_NAME}:${DEMO_VERSION}-llm + container_name: llm + build: + context: ./ + dockerfile: ${LLM_DOCKERFILE} + cache_from: + - ${IMAGE_NAME}:${IMAGE_VERSION}-llm + deploy: + resources: + limits: + memory: 50M + restart: unless-stopped + environment: + - FLAGD_HOST + - FLAGD_PORT + ports: + - "${LLM_PORT}" + depends_on: + flagd: + condition: service_started + logging: *logging + # Postgresql used by Accounting service postgresql: image: ${IMAGE_NAME}:${DEMO_VERSION}-postgresql diff --git a/docker-gen-proto.sh b/docker-gen-proto.sh index ed2e3032c5..896118a26b 100755 --- a/docker-gen-proto.sh +++ b/docker-gen-proto.sh @@ -54,6 +54,7 @@ if [ -z "$1" ]; then #gen_proto_js payment gen_proto_go product-catalog #gen_proto_php quote + gen_proto_python product-reviews gen_proto_python recommendation #gen_proto_rust shipping else diff --git a/ide-gen-proto.sh b/ide-gen-proto.sh index ec144317ed..f682fe1856 100755 --- a/ide-gen-proto.sh +++ b/ide-gen-proto.sh @@ -75,6 +75,7 @@ gen_proto_ts frontend gen_proto_ts react-native-app gen_proto_js payment gen_proto_go product-catalog +gen_proto_go product-reviews # gen_proto_php quote gen_proto_python recommendation gen_proto_rust shipping diff --git a/pb/demo.proto b/pb/demo.proto index aed0c2ce8b..1778514c86 100644 --- a/pb/demo.proto +++ b/pb/demo.proto @@ -102,6 +102,45 @@ message SearchProductsResponse { repeated Product results = 1; } +// ---------------Product Review service---------- + +service ProductReviewService { + rpc GetProductReviews(GetProductReviewsRequest) returns (GetProductReviewsResponse){} + rpc GetAverageProductReviewScore(GetAverageProductReviewScoreRequest) returns (GetAverageProductReviewScoreResponse){} + rpc AskProductAIAssistant(AskProductAIAssistantRequest) returns (AskProductAIAssistantResponse){} +} + +message ProductReview { + string username = 1; + string description = 2; + string score = 3; +} + +message GetProductReviewsRequest { + string product_id = 1; +} + +message GetProductReviewsResponse { + repeated ProductReview product_reviews = 1; +} + +message GetAverageProductReviewScoreRequest { + string product_id = 1; +} + +message GetAverageProductReviewScoreResponse { + string average_score = 1; +} + +message AskProductAIAssistantRequest { + string product_id = 1; + string question = 2; +} + +message AskProductAIAssistantResponse { + string response = 1; +} + // ---------------Shipping Service---------- service ShippingService { diff --git a/src/accounting/Entities.cs b/src/accounting/Entities.cs index 849bd1fa64..714294e27f 100644 --- a/src/accounting/Entities.cs +++ b/src/accounting/Entities.cs @@ -6,7 +6,7 @@ namespace Accounting; -[Table("shipping")] +[Table("shipping", Schema = "accounting")] [PrimaryKey(nameof(ShippingTrackingId))] internal class ShippingEntity { @@ -32,7 +32,7 @@ internal class ShippingEntity public required string OrderId { get; set; } } -[Table("orderitem")] +[Table("orderitem", Schema = "accounting")] [PrimaryKey(nameof(ProductId), nameof(OrderId))] internal class OrderItemEntity { @@ -49,7 +49,7 @@ internal class OrderItemEntity public required string OrderId { get; set; } } -[Table("order")] +[Table("order", Schema = "accounting")] [PrimaryKey(nameof(Id))] internal class OrderEntity { diff --git a/src/checkout/genproto/oteldemo/demo.pb.go b/src/checkout/genproto/oteldemo/demo.pb.go index 099cfaefe2..677934b6e4 100644 --- a/src/checkout/genproto/oteldemo/demo.pb.go +++ b/src/checkout/genproto/oteldemo/demo.pb.go @@ -673,6 +673,338 @@ func (x *SearchProductsResponse) GetResults() []*Product { return nil } +type ProductReview struct { + state protoimpl.MessageState `protogen:"open.v1"` + Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + Score string `protobuf:"bytes,3,opt,name=score,proto3" json:"score,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ProductReview) Reset() { + *x = ProductReview{} + mi := &file_demo_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ProductReview) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ProductReview) ProtoMessage() {} + +func (x *ProductReview) ProtoReflect() protoreflect.Message { + mi := &file_demo_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ProductReview.ProtoReflect.Descriptor instead. +func (*ProductReview) Descriptor() ([]byte, []int) { + return file_demo_proto_rawDescGZIP(), []int{13} +} + +func (x *ProductReview) GetUsername() string { + if x != nil { + return x.Username + } + return "" +} + +func (x *ProductReview) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *ProductReview) GetScore() string { + if x != nil { + return x.Score + } + return "" +} + +type GetProductReviewsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + ProductId string `protobuf:"bytes,1,opt,name=product_id,json=productId,proto3" json:"product_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetProductReviewsRequest) Reset() { + *x = GetProductReviewsRequest{} + mi := &file_demo_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetProductReviewsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetProductReviewsRequest) ProtoMessage() {} + +func (x *GetProductReviewsRequest) ProtoReflect() protoreflect.Message { + mi := &file_demo_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetProductReviewsRequest.ProtoReflect.Descriptor instead. +func (*GetProductReviewsRequest) Descriptor() ([]byte, []int) { + return file_demo_proto_rawDescGZIP(), []int{14} +} + +func (x *GetProductReviewsRequest) GetProductId() string { + if x != nil { + return x.ProductId + } + return "" +} + +type GetProductReviewsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + ProductReviews []*ProductReview `protobuf:"bytes,1,rep,name=product_reviews,json=productReviews,proto3" json:"product_reviews,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetProductReviewsResponse) Reset() { + *x = GetProductReviewsResponse{} + mi := &file_demo_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetProductReviewsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetProductReviewsResponse) ProtoMessage() {} + +func (x *GetProductReviewsResponse) ProtoReflect() protoreflect.Message { + mi := &file_demo_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetProductReviewsResponse.ProtoReflect.Descriptor instead. +func (*GetProductReviewsResponse) Descriptor() ([]byte, []int) { + return file_demo_proto_rawDescGZIP(), []int{15} +} + +func (x *GetProductReviewsResponse) GetProductReviews() []*ProductReview { + if x != nil { + return x.ProductReviews + } + return nil +} + +type GetAverageProductReviewScoreRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + ProductId string `protobuf:"bytes,1,opt,name=product_id,json=productId,proto3" json:"product_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetAverageProductReviewScoreRequest) Reset() { + *x = GetAverageProductReviewScoreRequest{} + mi := &file_demo_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetAverageProductReviewScoreRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAverageProductReviewScoreRequest) ProtoMessage() {} + +func (x *GetAverageProductReviewScoreRequest) ProtoReflect() protoreflect.Message { + mi := &file_demo_proto_msgTypes[16] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetAverageProductReviewScoreRequest.ProtoReflect.Descriptor instead. +func (*GetAverageProductReviewScoreRequest) Descriptor() ([]byte, []int) { + return file_demo_proto_rawDescGZIP(), []int{16} +} + +func (x *GetAverageProductReviewScoreRequest) GetProductId() string { + if x != nil { + return x.ProductId + } + return "" +} + +type GetAverageProductReviewScoreResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + AverageScore string `protobuf:"bytes,1,opt,name=average_score,json=averageScore,proto3" json:"average_score,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetAverageProductReviewScoreResponse) Reset() { + *x = GetAverageProductReviewScoreResponse{} + mi := &file_demo_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetAverageProductReviewScoreResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAverageProductReviewScoreResponse) ProtoMessage() {} + +func (x *GetAverageProductReviewScoreResponse) ProtoReflect() protoreflect.Message { + mi := &file_demo_proto_msgTypes[17] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetAverageProductReviewScoreResponse.ProtoReflect.Descriptor instead. +func (*GetAverageProductReviewScoreResponse) Descriptor() ([]byte, []int) { + return file_demo_proto_rawDescGZIP(), []int{17} +} + +func (x *GetAverageProductReviewScoreResponse) GetAverageScore() string { + if x != nil { + return x.AverageScore + } + return "" +} + +type AskProductAIAssistantRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + ProductId string `protobuf:"bytes,1,opt,name=product_id,json=productId,proto3" json:"product_id,omitempty"` + Question string `protobuf:"bytes,2,opt,name=question,proto3" json:"question,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AskProductAIAssistantRequest) Reset() { + *x = AskProductAIAssistantRequest{} + mi := &file_demo_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AskProductAIAssistantRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AskProductAIAssistantRequest) ProtoMessage() {} + +func (x *AskProductAIAssistantRequest) ProtoReflect() protoreflect.Message { + mi := &file_demo_proto_msgTypes[18] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AskProductAIAssistantRequest.ProtoReflect.Descriptor instead. +func (*AskProductAIAssistantRequest) Descriptor() ([]byte, []int) { + return file_demo_proto_rawDescGZIP(), []int{18} +} + +func (x *AskProductAIAssistantRequest) GetProductId() string { + if x != nil { + return x.ProductId + } + return "" +} + +func (x *AskProductAIAssistantRequest) GetQuestion() string { + if x != nil { + return x.Question + } + return "" +} + +type AskProductAIAssistantResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Response string `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AskProductAIAssistantResponse) Reset() { + *x = AskProductAIAssistantResponse{} + mi := &file_demo_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AskProductAIAssistantResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AskProductAIAssistantResponse) ProtoMessage() {} + +func (x *AskProductAIAssistantResponse) ProtoReflect() protoreflect.Message { + mi := &file_demo_proto_msgTypes[19] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AskProductAIAssistantResponse.ProtoReflect.Descriptor instead. +func (*AskProductAIAssistantResponse) Descriptor() ([]byte, []int) { + return file_demo_proto_rawDescGZIP(), []int{19} +} + +func (x *AskProductAIAssistantResponse) GetResponse() string { + if x != nil { + return x.Response + } + return "" +} + type GetQuoteRequest struct { state protoimpl.MessageState `protogen:"open.v1"` Address *Address `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` @@ -683,7 +1015,7 @@ type GetQuoteRequest struct { func (x *GetQuoteRequest) Reset() { *x = GetQuoteRequest{} - mi := &file_demo_proto_msgTypes[13] + mi := &file_demo_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -695,7 +1027,7 @@ func (x *GetQuoteRequest) String() string { func (*GetQuoteRequest) ProtoMessage() {} func (x *GetQuoteRequest) ProtoReflect() protoreflect.Message { - mi := &file_demo_proto_msgTypes[13] + mi := &file_demo_proto_msgTypes[20] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -708,7 +1040,7 @@ func (x *GetQuoteRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetQuoteRequest.ProtoReflect.Descriptor instead. func (*GetQuoteRequest) Descriptor() ([]byte, []int) { - return file_demo_proto_rawDescGZIP(), []int{13} + return file_demo_proto_rawDescGZIP(), []int{20} } func (x *GetQuoteRequest) GetAddress() *Address { @@ -734,7 +1066,7 @@ type GetQuoteResponse struct { func (x *GetQuoteResponse) Reset() { *x = GetQuoteResponse{} - mi := &file_demo_proto_msgTypes[14] + mi := &file_demo_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -746,7 +1078,7 @@ func (x *GetQuoteResponse) String() string { func (*GetQuoteResponse) ProtoMessage() {} func (x *GetQuoteResponse) ProtoReflect() protoreflect.Message { - mi := &file_demo_proto_msgTypes[14] + mi := &file_demo_proto_msgTypes[21] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -759,7 +1091,7 @@ func (x *GetQuoteResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetQuoteResponse.ProtoReflect.Descriptor instead. func (*GetQuoteResponse) Descriptor() ([]byte, []int) { - return file_demo_proto_rawDescGZIP(), []int{14} + return file_demo_proto_rawDescGZIP(), []int{21} } func (x *GetQuoteResponse) GetCostUsd() *Money { @@ -779,7 +1111,7 @@ type ShipOrderRequest struct { func (x *ShipOrderRequest) Reset() { *x = ShipOrderRequest{} - mi := &file_demo_proto_msgTypes[15] + mi := &file_demo_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -791,7 +1123,7 @@ func (x *ShipOrderRequest) String() string { func (*ShipOrderRequest) ProtoMessage() {} func (x *ShipOrderRequest) ProtoReflect() protoreflect.Message { - mi := &file_demo_proto_msgTypes[15] + mi := &file_demo_proto_msgTypes[22] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -804,7 +1136,7 @@ func (x *ShipOrderRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ShipOrderRequest.ProtoReflect.Descriptor instead. func (*ShipOrderRequest) Descriptor() ([]byte, []int) { - return file_demo_proto_rawDescGZIP(), []int{15} + return file_demo_proto_rawDescGZIP(), []int{22} } func (x *ShipOrderRequest) GetAddress() *Address { @@ -830,7 +1162,7 @@ type ShipOrderResponse struct { func (x *ShipOrderResponse) Reset() { *x = ShipOrderResponse{} - mi := &file_demo_proto_msgTypes[16] + mi := &file_demo_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -842,7 +1174,7 @@ func (x *ShipOrderResponse) String() string { func (*ShipOrderResponse) ProtoMessage() {} func (x *ShipOrderResponse) ProtoReflect() protoreflect.Message { - mi := &file_demo_proto_msgTypes[16] + mi := &file_demo_proto_msgTypes[23] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -855,7 +1187,7 @@ func (x *ShipOrderResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ShipOrderResponse.ProtoReflect.Descriptor instead. func (*ShipOrderResponse) Descriptor() ([]byte, []int) { - return file_demo_proto_rawDescGZIP(), []int{16} + return file_demo_proto_rawDescGZIP(), []int{23} } func (x *ShipOrderResponse) GetTrackingId() string { @@ -878,7 +1210,7 @@ type Address struct { func (x *Address) Reset() { *x = Address{} - mi := &file_demo_proto_msgTypes[17] + mi := &file_demo_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -890,7 +1222,7 @@ func (x *Address) String() string { func (*Address) ProtoMessage() {} func (x *Address) ProtoReflect() protoreflect.Message { - mi := &file_demo_proto_msgTypes[17] + mi := &file_demo_proto_msgTypes[24] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -903,7 +1235,7 @@ func (x *Address) ProtoReflect() protoreflect.Message { // Deprecated: Use Address.ProtoReflect.Descriptor instead. func (*Address) Descriptor() ([]byte, []int) { - return file_demo_proto_rawDescGZIP(), []int{17} + return file_demo_proto_rawDescGZIP(), []int{24} } func (x *Address) GetStreetAddress() string { @@ -962,7 +1294,7 @@ type Money struct { func (x *Money) Reset() { *x = Money{} - mi := &file_demo_proto_msgTypes[18] + mi := &file_demo_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -974,7 +1306,7 @@ func (x *Money) String() string { func (*Money) ProtoMessage() {} func (x *Money) ProtoReflect() protoreflect.Message { - mi := &file_demo_proto_msgTypes[18] + mi := &file_demo_proto_msgTypes[25] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -987,7 +1319,7 @@ func (x *Money) ProtoReflect() protoreflect.Message { // Deprecated: Use Money.ProtoReflect.Descriptor instead. func (*Money) Descriptor() ([]byte, []int) { - return file_demo_proto_rawDescGZIP(), []int{18} + return file_demo_proto_rawDescGZIP(), []int{25} } func (x *Money) GetCurrencyCode() string { @@ -1021,7 +1353,7 @@ type GetSupportedCurrenciesResponse struct { func (x *GetSupportedCurrenciesResponse) Reset() { *x = GetSupportedCurrenciesResponse{} - mi := &file_demo_proto_msgTypes[19] + mi := &file_demo_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1033,7 +1365,7 @@ func (x *GetSupportedCurrenciesResponse) String() string { func (*GetSupportedCurrenciesResponse) ProtoMessage() {} func (x *GetSupportedCurrenciesResponse) ProtoReflect() protoreflect.Message { - mi := &file_demo_proto_msgTypes[19] + mi := &file_demo_proto_msgTypes[26] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1046,7 +1378,7 @@ func (x *GetSupportedCurrenciesResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetSupportedCurrenciesResponse.ProtoReflect.Descriptor instead. func (*GetSupportedCurrenciesResponse) Descriptor() ([]byte, []int) { - return file_demo_proto_rawDescGZIP(), []int{19} + return file_demo_proto_rawDescGZIP(), []int{26} } func (x *GetSupportedCurrenciesResponse) GetCurrencyCodes() []string { @@ -1067,7 +1399,7 @@ type CurrencyConversionRequest struct { func (x *CurrencyConversionRequest) Reset() { *x = CurrencyConversionRequest{} - mi := &file_demo_proto_msgTypes[20] + mi := &file_demo_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1079,7 +1411,7 @@ func (x *CurrencyConversionRequest) String() string { func (*CurrencyConversionRequest) ProtoMessage() {} func (x *CurrencyConversionRequest) ProtoReflect() protoreflect.Message { - mi := &file_demo_proto_msgTypes[20] + mi := &file_demo_proto_msgTypes[27] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1092,7 +1424,7 @@ func (x *CurrencyConversionRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CurrencyConversionRequest.ProtoReflect.Descriptor instead. func (*CurrencyConversionRequest) Descriptor() ([]byte, []int) { - return file_demo_proto_rawDescGZIP(), []int{20} + return file_demo_proto_rawDescGZIP(), []int{27} } func (x *CurrencyConversionRequest) GetFrom() *Money { @@ -1121,7 +1453,7 @@ type CreditCardInfo struct { func (x *CreditCardInfo) Reset() { *x = CreditCardInfo{} - mi := &file_demo_proto_msgTypes[21] + mi := &file_demo_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1133,7 +1465,7 @@ func (x *CreditCardInfo) String() string { func (*CreditCardInfo) ProtoMessage() {} func (x *CreditCardInfo) ProtoReflect() protoreflect.Message { - mi := &file_demo_proto_msgTypes[21] + mi := &file_demo_proto_msgTypes[28] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1146,7 +1478,7 @@ func (x *CreditCardInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use CreditCardInfo.ProtoReflect.Descriptor instead. func (*CreditCardInfo) Descriptor() ([]byte, []int) { - return file_demo_proto_rawDescGZIP(), []int{21} + return file_demo_proto_rawDescGZIP(), []int{28} } func (x *CreditCardInfo) GetCreditCardNumber() string { @@ -1187,7 +1519,7 @@ type ChargeRequest struct { func (x *ChargeRequest) Reset() { *x = ChargeRequest{} - mi := &file_demo_proto_msgTypes[22] + mi := &file_demo_proto_msgTypes[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1199,7 +1531,7 @@ func (x *ChargeRequest) String() string { func (*ChargeRequest) ProtoMessage() {} func (x *ChargeRequest) ProtoReflect() protoreflect.Message { - mi := &file_demo_proto_msgTypes[22] + mi := &file_demo_proto_msgTypes[29] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1212,7 +1544,7 @@ func (x *ChargeRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ChargeRequest.ProtoReflect.Descriptor instead. func (*ChargeRequest) Descriptor() ([]byte, []int) { - return file_demo_proto_rawDescGZIP(), []int{22} + return file_demo_proto_rawDescGZIP(), []int{29} } func (x *ChargeRequest) GetAmount() *Money { @@ -1238,7 +1570,7 @@ type ChargeResponse struct { func (x *ChargeResponse) Reset() { *x = ChargeResponse{} - mi := &file_demo_proto_msgTypes[23] + mi := &file_demo_proto_msgTypes[30] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1250,7 +1582,7 @@ func (x *ChargeResponse) String() string { func (*ChargeResponse) ProtoMessage() {} func (x *ChargeResponse) ProtoReflect() protoreflect.Message { - mi := &file_demo_proto_msgTypes[23] + mi := &file_demo_proto_msgTypes[30] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1263,7 +1595,7 @@ func (x *ChargeResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ChargeResponse.ProtoReflect.Descriptor instead. func (*ChargeResponse) Descriptor() ([]byte, []int) { - return file_demo_proto_rawDescGZIP(), []int{23} + return file_demo_proto_rawDescGZIP(), []int{30} } func (x *ChargeResponse) GetTransactionId() string { @@ -1283,7 +1615,7 @@ type OrderItem struct { func (x *OrderItem) Reset() { *x = OrderItem{} - mi := &file_demo_proto_msgTypes[24] + mi := &file_demo_proto_msgTypes[31] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1295,7 +1627,7 @@ func (x *OrderItem) String() string { func (*OrderItem) ProtoMessage() {} func (x *OrderItem) ProtoReflect() protoreflect.Message { - mi := &file_demo_proto_msgTypes[24] + mi := &file_demo_proto_msgTypes[31] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1308,7 +1640,7 @@ func (x *OrderItem) ProtoReflect() protoreflect.Message { // Deprecated: Use OrderItem.ProtoReflect.Descriptor instead. func (*OrderItem) Descriptor() ([]byte, []int) { - return file_demo_proto_rawDescGZIP(), []int{24} + return file_demo_proto_rawDescGZIP(), []int{31} } func (x *OrderItem) GetItem() *CartItem { @@ -1338,7 +1670,7 @@ type OrderResult struct { func (x *OrderResult) Reset() { *x = OrderResult{} - mi := &file_demo_proto_msgTypes[25] + mi := &file_demo_proto_msgTypes[32] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1350,7 +1682,7 @@ func (x *OrderResult) String() string { func (*OrderResult) ProtoMessage() {} func (x *OrderResult) ProtoReflect() protoreflect.Message { - mi := &file_demo_proto_msgTypes[25] + mi := &file_demo_proto_msgTypes[32] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1363,7 +1695,7 @@ func (x *OrderResult) ProtoReflect() protoreflect.Message { // Deprecated: Use OrderResult.ProtoReflect.Descriptor instead. func (*OrderResult) Descriptor() ([]byte, []int) { - return file_demo_proto_rawDescGZIP(), []int{25} + return file_demo_proto_rawDescGZIP(), []int{32} } func (x *OrderResult) GetOrderId() string { @@ -1411,7 +1743,7 @@ type SendOrderConfirmationRequest struct { func (x *SendOrderConfirmationRequest) Reset() { *x = SendOrderConfirmationRequest{} - mi := &file_demo_proto_msgTypes[26] + mi := &file_demo_proto_msgTypes[33] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1423,7 +1755,7 @@ func (x *SendOrderConfirmationRequest) String() string { func (*SendOrderConfirmationRequest) ProtoMessage() {} func (x *SendOrderConfirmationRequest) ProtoReflect() protoreflect.Message { - mi := &file_demo_proto_msgTypes[26] + mi := &file_demo_proto_msgTypes[33] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1436,7 +1768,7 @@ func (x *SendOrderConfirmationRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SendOrderConfirmationRequest.ProtoReflect.Descriptor instead. func (*SendOrderConfirmationRequest) Descriptor() ([]byte, []int) { - return file_demo_proto_rawDescGZIP(), []int{26} + return file_demo_proto_rawDescGZIP(), []int{33} } func (x *SendOrderConfirmationRequest) GetEmail() string { @@ -1466,7 +1798,7 @@ type PlaceOrderRequest struct { func (x *PlaceOrderRequest) Reset() { *x = PlaceOrderRequest{} - mi := &file_demo_proto_msgTypes[27] + mi := &file_demo_proto_msgTypes[34] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1478,7 +1810,7 @@ func (x *PlaceOrderRequest) String() string { func (*PlaceOrderRequest) ProtoMessage() {} func (x *PlaceOrderRequest) ProtoReflect() protoreflect.Message { - mi := &file_demo_proto_msgTypes[27] + mi := &file_demo_proto_msgTypes[34] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1491,7 +1823,7 @@ func (x *PlaceOrderRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use PlaceOrderRequest.ProtoReflect.Descriptor instead. func (*PlaceOrderRequest) Descriptor() ([]byte, []int) { - return file_demo_proto_rawDescGZIP(), []int{27} + return file_demo_proto_rawDescGZIP(), []int{34} } func (x *PlaceOrderRequest) GetUserId() string { @@ -1538,7 +1870,7 @@ type PlaceOrderResponse struct { func (x *PlaceOrderResponse) Reset() { *x = PlaceOrderResponse{} - mi := &file_demo_proto_msgTypes[28] + mi := &file_demo_proto_msgTypes[35] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1550,7 +1882,7 @@ func (x *PlaceOrderResponse) String() string { func (*PlaceOrderResponse) ProtoMessage() {} func (x *PlaceOrderResponse) ProtoReflect() protoreflect.Message { - mi := &file_demo_proto_msgTypes[28] + mi := &file_demo_proto_msgTypes[35] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1563,7 +1895,7 @@ func (x *PlaceOrderResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use PlaceOrderResponse.ProtoReflect.Descriptor instead. func (*PlaceOrderResponse) Descriptor() ([]byte, []int) { - return file_demo_proto_rawDescGZIP(), []int{28} + return file_demo_proto_rawDescGZIP(), []int{35} } func (x *PlaceOrderResponse) GetOrder() *OrderResult { @@ -1583,7 +1915,7 @@ type AdRequest struct { func (x *AdRequest) Reset() { *x = AdRequest{} - mi := &file_demo_proto_msgTypes[29] + mi := &file_demo_proto_msgTypes[36] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1595,7 +1927,7 @@ func (x *AdRequest) String() string { func (*AdRequest) ProtoMessage() {} func (x *AdRequest) ProtoReflect() protoreflect.Message { - mi := &file_demo_proto_msgTypes[29] + mi := &file_demo_proto_msgTypes[36] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1608,7 +1940,7 @@ func (x *AdRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use AdRequest.ProtoReflect.Descriptor instead. func (*AdRequest) Descriptor() ([]byte, []int) { - return file_demo_proto_rawDescGZIP(), []int{29} + return file_demo_proto_rawDescGZIP(), []int{36} } func (x *AdRequest) GetContextKeys() []string { @@ -1627,7 +1959,7 @@ type AdResponse struct { func (x *AdResponse) Reset() { *x = AdResponse{} - mi := &file_demo_proto_msgTypes[30] + mi := &file_demo_proto_msgTypes[37] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1639,7 +1971,7 @@ func (x *AdResponse) String() string { func (*AdResponse) ProtoMessage() {} func (x *AdResponse) ProtoReflect() protoreflect.Message { - mi := &file_demo_proto_msgTypes[30] + mi := &file_demo_proto_msgTypes[37] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1652,7 +1984,7 @@ func (x *AdResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use AdResponse.ProtoReflect.Descriptor instead. func (*AdResponse) Descriptor() ([]byte, []int) { - return file_demo_proto_rawDescGZIP(), []int{30} + return file_demo_proto_rawDescGZIP(), []int{37} } func (x *AdResponse) GetAds() []*Ad { @@ -1674,7 +2006,7 @@ type Ad struct { func (x *Ad) Reset() { *x = Ad{} - mi := &file_demo_proto_msgTypes[31] + mi := &file_demo_proto_msgTypes[38] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1686,7 +2018,7 @@ func (x *Ad) String() string { func (*Ad) ProtoMessage() {} func (x *Ad) ProtoReflect() protoreflect.Message { - mi := &file_demo_proto_msgTypes[31] + mi := &file_demo_proto_msgTypes[38] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1699,7 +2031,7 @@ func (x *Ad) ProtoReflect() protoreflect.Message { // Deprecated: Use Ad.ProtoReflect.Descriptor instead. func (*Ad) Descriptor() ([]byte, []int) { - return file_demo_proto_rawDescGZIP(), []int{31} + return file_demo_proto_rawDescGZIP(), []int{38} } func (x *Ad) GetRedirectUrl() string { @@ -1727,7 +2059,7 @@ type Flag struct { func (x *Flag) Reset() { *x = Flag{} - mi := &file_demo_proto_msgTypes[32] + mi := &file_demo_proto_msgTypes[39] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1739,7 +2071,7 @@ func (x *Flag) String() string { func (*Flag) ProtoMessage() {} func (x *Flag) ProtoReflect() protoreflect.Message { - mi := &file_demo_proto_msgTypes[32] + mi := &file_demo_proto_msgTypes[39] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1752,7 +2084,7 @@ func (x *Flag) ProtoReflect() protoreflect.Message { // Deprecated: Use Flag.ProtoReflect.Descriptor instead. func (*Flag) Descriptor() ([]byte, []int) { - return file_demo_proto_rawDescGZIP(), []int{32} + return file_demo_proto_rawDescGZIP(), []int{39} } func (x *Flag) GetName() string { @@ -1785,7 +2117,7 @@ type GetFlagRequest struct { func (x *GetFlagRequest) Reset() { *x = GetFlagRequest{} - mi := &file_demo_proto_msgTypes[33] + mi := &file_demo_proto_msgTypes[40] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1797,7 +2129,7 @@ func (x *GetFlagRequest) String() string { func (*GetFlagRequest) ProtoMessage() {} func (x *GetFlagRequest) ProtoReflect() protoreflect.Message { - mi := &file_demo_proto_msgTypes[33] + mi := &file_demo_proto_msgTypes[40] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1810,7 +2142,7 @@ func (x *GetFlagRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetFlagRequest.ProtoReflect.Descriptor instead. func (*GetFlagRequest) Descriptor() ([]byte, []int) { - return file_demo_proto_rawDescGZIP(), []int{33} + return file_demo_proto_rawDescGZIP(), []int{40} } func (x *GetFlagRequest) GetName() string { @@ -1829,7 +2161,7 @@ type GetFlagResponse struct { func (x *GetFlagResponse) Reset() { *x = GetFlagResponse{} - mi := &file_demo_proto_msgTypes[34] + mi := &file_demo_proto_msgTypes[41] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1841,7 +2173,7 @@ func (x *GetFlagResponse) String() string { func (*GetFlagResponse) ProtoMessage() {} func (x *GetFlagResponse) ProtoReflect() protoreflect.Message { - mi := &file_demo_proto_msgTypes[34] + mi := &file_demo_proto_msgTypes[41] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1854,7 +2186,7 @@ func (x *GetFlagResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetFlagResponse.ProtoReflect.Descriptor instead. func (*GetFlagResponse) Descriptor() ([]byte, []int) { - return file_demo_proto_rawDescGZIP(), []int{34} + return file_demo_proto_rawDescGZIP(), []int{41} } func (x *GetFlagResponse) GetFlag() *Flag { @@ -1875,7 +2207,7 @@ type CreateFlagRequest struct { func (x *CreateFlagRequest) Reset() { *x = CreateFlagRequest{} - mi := &file_demo_proto_msgTypes[35] + mi := &file_demo_proto_msgTypes[42] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1887,7 +2219,7 @@ func (x *CreateFlagRequest) String() string { func (*CreateFlagRequest) ProtoMessage() {} func (x *CreateFlagRequest) ProtoReflect() protoreflect.Message { - mi := &file_demo_proto_msgTypes[35] + mi := &file_demo_proto_msgTypes[42] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1900,7 +2232,7 @@ func (x *CreateFlagRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateFlagRequest.ProtoReflect.Descriptor instead. func (*CreateFlagRequest) Descriptor() ([]byte, []int) { - return file_demo_proto_rawDescGZIP(), []int{35} + return file_demo_proto_rawDescGZIP(), []int{42} } func (x *CreateFlagRequest) GetName() string { @@ -1933,7 +2265,7 @@ type CreateFlagResponse struct { func (x *CreateFlagResponse) Reset() { *x = CreateFlagResponse{} - mi := &file_demo_proto_msgTypes[36] + mi := &file_demo_proto_msgTypes[43] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1945,7 +2277,7 @@ func (x *CreateFlagResponse) String() string { func (*CreateFlagResponse) ProtoMessage() {} func (x *CreateFlagResponse) ProtoReflect() protoreflect.Message { - mi := &file_demo_proto_msgTypes[36] + mi := &file_demo_proto_msgTypes[43] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1958,7 +2290,7 @@ func (x *CreateFlagResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateFlagResponse.ProtoReflect.Descriptor instead. func (*CreateFlagResponse) Descriptor() ([]byte, []int) { - return file_demo_proto_rawDescGZIP(), []int{36} + return file_demo_proto_rawDescGZIP(), []int{43} } func (x *CreateFlagResponse) GetFlag() *Flag { @@ -1978,7 +2310,7 @@ type UpdateFlagRequest struct { func (x *UpdateFlagRequest) Reset() { *x = UpdateFlagRequest{} - mi := &file_demo_proto_msgTypes[37] + mi := &file_demo_proto_msgTypes[44] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1990,7 +2322,7 @@ func (x *UpdateFlagRequest) String() string { func (*UpdateFlagRequest) ProtoMessage() {} func (x *UpdateFlagRequest) ProtoReflect() protoreflect.Message { - mi := &file_demo_proto_msgTypes[37] + mi := &file_demo_proto_msgTypes[44] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2003,7 +2335,7 @@ func (x *UpdateFlagRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdateFlagRequest.ProtoReflect.Descriptor instead. func (*UpdateFlagRequest) Descriptor() ([]byte, []int) { - return file_demo_proto_rawDescGZIP(), []int{37} + return file_demo_proto_rawDescGZIP(), []int{44} } func (x *UpdateFlagRequest) GetName() string { @@ -2028,7 +2360,7 @@ type UpdateFlagResponse struct { func (x *UpdateFlagResponse) Reset() { *x = UpdateFlagResponse{} - mi := &file_demo_proto_msgTypes[38] + mi := &file_demo_proto_msgTypes[45] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2040,7 +2372,7 @@ func (x *UpdateFlagResponse) String() string { func (*UpdateFlagResponse) ProtoMessage() {} func (x *UpdateFlagResponse) ProtoReflect() protoreflect.Message { - mi := &file_demo_proto_msgTypes[38] + mi := &file_demo_proto_msgTypes[45] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2053,7 +2385,7 @@ func (x *UpdateFlagResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdateFlagResponse.ProtoReflect.Descriptor instead. func (*UpdateFlagResponse) Descriptor() ([]byte, []int) { - return file_demo_proto_rawDescGZIP(), []int{38} + return file_demo_proto_rawDescGZIP(), []int{45} } type ListFlagsRequest struct { @@ -2064,7 +2396,7 @@ type ListFlagsRequest struct { func (x *ListFlagsRequest) Reset() { *x = ListFlagsRequest{} - mi := &file_demo_proto_msgTypes[39] + mi := &file_demo_proto_msgTypes[46] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2076,7 +2408,7 @@ func (x *ListFlagsRequest) String() string { func (*ListFlagsRequest) ProtoMessage() {} func (x *ListFlagsRequest) ProtoReflect() protoreflect.Message { - mi := &file_demo_proto_msgTypes[39] + mi := &file_demo_proto_msgTypes[46] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2089,7 +2421,7 @@ func (x *ListFlagsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListFlagsRequest.ProtoReflect.Descriptor instead. func (*ListFlagsRequest) Descriptor() ([]byte, []int) { - return file_demo_proto_rawDescGZIP(), []int{39} + return file_demo_proto_rawDescGZIP(), []int{46} } type ListFlagsResponse struct { @@ -2101,7 +2433,7 @@ type ListFlagsResponse struct { func (x *ListFlagsResponse) Reset() { *x = ListFlagsResponse{} - mi := &file_demo_proto_msgTypes[40] + mi := &file_demo_proto_msgTypes[47] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2113,7 +2445,7 @@ func (x *ListFlagsResponse) String() string { func (*ListFlagsResponse) ProtoMessage() {} func (x *ListFlagsResponse) ProtoReflect() protoreflect.Message { - mi := &file_demo_proto_msgTypes[40] + mi := &file_demo_proto_msgTypes[47] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2126,7 +2458,7 @@ func (x *ListFlagsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListFlagsResponse.ProtoReflect.Descriptor instead. func (*ListFlagsResponse) Descriptor() ([]byte, []int) { - return file_demo_proto_rawDescGZIP(), []int{40} + return file_demo_proto_rawDescGZIP(), []int{47} } func (x *ListFlagsResponse) GetFlag() []*Flag { @@ -2145,7 +2477,7 @@ type DeleteFlagRequest struct { func (x *DeleteFlagRequest) Reset() { *x = DeleteFlagRequest{} - mi := &file_demo_proto_msgTypes[41] + mi := &file_demo_proto_msgTypes[48] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2157,7 +2489,7 @@ func (x *DeleteFlagRequest) String() string { func (*DeleteFlagRequest) ProtoMessage() {} func (x *DeleteFlagRequest) ProtoReflect() protoreflect.Message { - mi := &file_demo_proto_msgTypes[41] + mi := &file_demo_proto_msgTypes[48] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2170,7 +2502,7 @@ func (x *DeleteFlagRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteFlagRequest.ProtoReflect.Descriptor instead. func (*DeleteFlagRequest) Descriptor() ([]byte, []int) { - return file_demo_proto_rawDescGZIP(), []int{41} + return file_demo_proto_rawDescGZIP(), []int{48} } func (x *DeleteFlagRequest) GetName() string { @@ -2188,7 +2520,7 @@ type DeleteFlagResponse struct { func (x *DeleteFlagResponse) Reset() { *x = DeleteFlagResponse{} - mi := &file_demo_proto_msgTypes[42] + mi := &file_demo_proto_msgTypes[49] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2200,7 +2532,7 @@ func (x *DeleteFlagResponse) String() string { func (*DeleteFlagResponse) ProtoMessage() {} func (x *DeleteFlagResponse) ProtoReflect() protoreflect.Message { - mi := &file_demo_proto_msgTypes[42] + mi := &file_demo_proto_msgTypes[49] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2213,7 +2545,7 @@ func (x *DeleteFlagResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteFlagResponse.ProtoReflect.Descriptor instead. func (*DeleteFlagResponse) Descriptor() ([]byte, []int) { - return file_demo_proto_rawDescGZIP(), []int{42} + return file_demo_proto_rawDescGZIP(), []int{49} } var File_demo_proto protoreflect.FileDescriptor @@ -2260,7 +2592,27 @@ const file_demo_proto_rawDesc = "" + "\x15SearchProductsRequest\x12\x14\n" + "\x05query\x18\x01 \x01(\tR\x05query\"E\n" + "\x16SearchProductsResponse\x12+\n" + - "\aresults\x18\x01 \x03(\v2\x11.oteldemo.ProductR\aresults\"h\n" + + "\aresults\x18\x01 \x03(\v2\x11.oteldemo.ProductR\aresults\"c\n" + + "\rProductReview\x12\x1a\n" + + "\busername\x18\x01 \x01(\tR\busername\x12 \n" + + "\vdescription\x18\x02 \x01(\tR\vdescription\x12\x14\n" + + "\x05score\x18\x03 \x01(\tR\x05score\"9\n" + + "\x18GetProductReviewsRequest\x12\x1d\n" + + "\n" + + "product_id\x18\x01 \x01(\tR\tproductId\"]\n" + + "\x19GetProductReviewsResponse\x12@\n" + + "\x0fproduct_reviews\x18\x01 \x03(\v2\x17.oteldemo.ProductReviewR\x0eproductReviews\"D\n" + + "#GetAverageProductReviewScoreRequest\x12\x1d\n" + + "\n" + + "product_id\x18\x01 \x01(\tR\tproductId\"K\n" + + "$GetAverageProductReviewScoreResponse\x12#\n" + + "\raverage_score\x18\x01 \x01(\tR\faverageScore\"Y\n" + + "\x1cAskProductAIAssistantRequest\x12\x1d\n" + + "\n" + + "product_id\x18\x01 \x01(\tR\tproductId\x12\x1a\n" + + "\bquestion\x18\x02 \x01(\tR\bquestion\";\n" + + "\x1dAskProductAIAssistantResponse\x12\x1a\n" + + "\bresponse\x18\x01 \x01(\tR\bresponse\"h\n" + "\x0fGetQuoteRequest\x12+\n" + "\aaddress\x18\x01 \x01(\v2\x11.oteldemo.AddressR\aaddress\x12(\n" + "\x05items\x18\x02 \x03(\v2\x12.oteldemo.CartItemR\x05items\">\n" + @@ -2361,7 +2713,11 @@ const file_demo_proto_rawDesc = "" + "\fListProducts\x12\x0f.oteldemo.Empty\x1a\x1e.oteldemo.ListProductsResponse\"\x00\x12>\n" + "\n" + "GetProduct\x12\x1b.oteldemo.GetProductRequest\x1a\x11.oteldemo.Product\"\x00\x12U\n" + - "\x0eSearchProducts\x12\x1f.oteldemo.SearchProductsRequest\x1a .oteldemo.SearchProductsResponse\"\x002\x9e\x01\n" + + "\x0eSearchProducts\x12\x1f.oteldemo.SearchProductsRequest\x1a .oteldemo.SearchProductsResponse\"\x002\xe3\x02\n" + + "\x14ProductReviewService\x12^\n" + + "\x11GetProductReviews\x12\".oteldemo.GetProductReviewsRequest\x1a#.oteldemo.GetProductReviewsResponse\"\x00\x12\x7f\n" + + "\x1cGetAverageProductReviewScore\x12-.oteldemo.GetAverageProductReviewScoreRequest\x1a..oteldemo.GetAverageProductReviewScoreResponse\"\x00\x12j\n" + + "\x15AskProductAIAssistant\x12&.oteldemo.AskProductAIAssistantRequest\x1a'.oteldemo.AskProductAIAssistantResponse\"\x002\x9e\x01\n" + "\x0fShippingService\x12C\n" + "\bGetQuote\x12\x19.oteldemo.GetQuoteRequest\x1a\x1a.oteldemo.GetQuoteResponse\"\x00\x12F\n" + "\tShipOrder\x12\x1a.oteldemo.ShipOrderRequest\x1a\x1b.oteldemo.ShipOrderResponse\"\x002\xab\x01\n" + @@ -2399,124 +2755,138 @@ func file_demo_proto_rawDescGZIP() []byte { return file_demo_proto_rawDescData } -var file_demo_proto_msgTypes = make([]protoimpl.MessageInfo, 43) +var file_demo_proto_msgTypes = make([]protoimpl.MessageInfo, 50) var file_demo_proto_goTypes = []any{ - (*CartItem)(nil), // 0: oteldemo.CartItem - (*AddItemRequest)(nil), // 1: oteldemo.AddItemRequest - (*EmptyCartRequest)(nil), // 2: oteldemo.EmptyCartRequest - (*GetCartRequest)(nil), // 3: oteldemo.GetCartRequest - (*Cart)(nil), // 4: oteldemo.Cart - (*Empty)(nil), // 5: oteldemo.Empty - (*ListRecommendationsRequest)(nil), // 6: oteldemo.ListRecommendationsRequest - (*ListRecommendationsResponse)(nil), // 7: oteldemo.ListRecommendationsResponse - (*Product)(nil), // 8: oteldemo.Product - (*ListProductsResponse)(nil), // 9: oteldemo.ListProductsResponse - (*GetProductRequest)(nil), // 10: oteldemo.GetProductRequest - (*SearchProductsRequest)(nil), // 11: oteldemo.SearchProductsRequest - (*SearchProductsResponse)(nil), // 12: oteldemo.SearchProductsResponse - (*GetQuoteRequest)(nil), // 13: oteldemo.GetQuoteRequest - (*GetQuoteResponse)(nil), // 14: oteldemo.GetQuoteResponse - (*ShipOrderRequest)(nil), // 15: oteldemo.ShipOrderRequest - (*ShipOrderResponse)(nil), // 16: oteldemo.ShipOrderResponse - (*Address)(nil), // 17: oteldemo.Address - (*Money)(nil), // 18: oteldemo.Money - (*GetSupportedCurrenciesResponse)(nil), // 19: oteldemo.GetSupportedCurrenciesResponse - (*CurrencyConversionRequest)(nil), // 20: oteldemo.CurrencyConversionRequest - (*CreditCardInfo)(nil), // 21: oteldemo.CreditCardInfo - (*ChargeRequest)(nil), // 22: oteldemo.ChargeRequest - (*ChargeResponse)(nil), // 23: oteldemo.ChargeResponse - (*OrderItem)(nil), // 24: oteldemo.OrderItem - (*OrderResult)(nil), // 25: oteldemo.OrderResult - (*SendOrderConfirmationRequest)(nil), // 26: oteldemo.SendOrderConfirmationRequest - (*PlaceOrderRequest)(nil), // 27: oteldemo.PlaceOrderRequest - (*PlaceOrderResponse)(nil), // 28: oteldemo.PlaceOrderResponse - (*AdRequest)(nil), // 29: oteldemo.AdRequest - (*AdResponse)(nil), // 30: oteldemo.AdResponse - (*Ad)(nil), // 31: oteldemo.Ad - (*Flag)(nil), // 32: oteldemo.Flag - (*GetFlagRequest)(nil), // 33: oteldemo.GetFlagRequest - (*GetFlagResponse)(nil), // 34: oteldemo.GetFlagResponse - (*CreateFlagRequest)(nil), // 35: oteldemo.CreateFlagRequest - (*CreateFlagResponse)(nil), // 36: oteldemo.CreateFlagResponse - (*UpdateFlagRequest)(nil), // 37: oteldemo.UpdateFlagRequest - (*UpdateFlagResponse)(nil), // 38: oteldemo.UpdateFlagResponse - (*ListFlagsRequest)(nil), // 39: oteldemo.ListFlagsRequest - (*ListFlagsResponse)(nil), // 40: oteldemo.ListFlagsResponse - (*DeleteFlagRequest)(nil), // 41: oteldemo.DeleteFlagRequest - (*DeleteFlagResponse)(nil), // 42: oteldemo.DeleteFlagResponse + (*CartItem)(nil), // 0: oteldemo.CartItem + (*AddItemRequest)(nil), // 1: oteldemo.AddItemRequest + (*EmptyCartRequest)(nil), // 2: oteldemo.EmptyCartRequest + (*GetCartRequest)(nil), // 3: oteldemo.GetCartRequest + (*Cart)(nil), // 4: oteldemo.Cart + (*Empty)(nil), // 5: oteldemo.Empty + (*ListRecommendationsRequest)(nil), // 6: oteldemo.ListRecommendationsRequest + (*ListRecommendationsResponse)(nil), // 7: oteldemo.ListRecommendationsResponse + (*Product)(nil), // 8: oteldemo.Product + (*ListProductsResponse)(nil), // 9: oteldemo.ListProductsResponse + (*GetProductRequest)(nil), // 10: oteldemo.GetProductRequest + (*SearchProductsRequest)(nil), // 11: oteldemo.SearchProductsRequest + (*SearchProductsResponse)(nil), // 12: oteldemo.SearchProductsResponse + (*ProductReview)(nil), // 13: oteldemo.ProductReview + (*GetProductReviewsRequest)(nil), // 14: oteldemo.GetProductReviewsRequest + (*GetProductReviewsResponse)(nil), // 15: oteldemo.GetProductReviewsResponse + (*GetAverageProductReviewScoreRequest)(nil), // 16: oteldemo.GetAverageProductReviewScoreRequest + (*GetAverageProductReviewScoreResponse)(nil), // 17: oteldemo.GetAverageProductReviewScoreResponse + (*AskProductAIAssistantRequest)(nil), // 18: oteldemo.AskProductAIAssistantRequest + (*AskProductAIAssistantResponse)(nil), // 19: oteldemo.AskProductAIAssistantResponse + (*GetQuoteRequest)(nil), // 20: oteldemo.GetQuoteRequest + (*GetQuoteResponse)(nil), // 21: oteldemo.GetQuoteResponse + (*ShipOrderRequest)(nil), // 22: oteldemo.ShipOrderRequest + (*ShipOrderResponse)(nil), // 23: oteldemo.ShipOrderResponse + (*Address)(nil), // 24: oteldemo.Address + (*Money)(nil), // 25: oteldemo.Money + (*GetSupportedCurrenciesResponse)(nil), // 26: oteldemo.GetSupportedCurrenciesResponse + (*CurrencyConversionRequest)(nil), // 27: oteldemo.CurrencyConversionRequest + (*CreditCardInfo)(nil), // 28: oteldemo.CreditCardInfo + (*ChargeRequest)(nil), // 29: oteldemo.ChargeRequest + (*ChargeResponse)(nil), // 30: oteldemo.ChargeResponse + (*OrderItem)(nil), // 31: oteldemo.OrderItem + (*OrderResult)(nil), // 32: oteldemo.OrderResult + (*SendOrderConfirmationRequest)(nil), // 33: oteldemo.SendOrderConfirmationRequest + (*PlaceOrderRequest)(nil), // 34: oteldemo.PlaceOrderRequest + (*PlaceOrderResponse)(nil), // 35: oteldemo.PlaceOrderResponse + (*AdRequest)(nil), // 36: oteldemo.AdRequest + (*AdResponse)(nil), // 37: oteldemo.AdResponse + (*Ad)(nil), // 38: oteldemo.Ad + (*Flag)(nil), // 39: oteldemo.Flag + (*GetFlagRequest)(nil), // 40: oteldemo.GetFlagRequest + (*GetFlagResponse)(nil), // 41: oteldemo.GetFlagResponse + (*CreateFlagRequest)(nil), // 42: oteldemo.CreateFlagRequest + (*CreateFlagResponse)(nil), // 43: oteldemo.CreateFlagResponse + (*UpdateFlagRequest)(nil), // 44: oteldemo.UpdateFlagRequest + (*UpdateFlagResponse)(nil), // 45: oteldemo.UpdateFlagResponse + (*ListFlagsRequest)(nil), // 46: oteldemo.ListFlagsRequest + (*ListFlagsResponse)(nil), // 47: oteldemo.ListFlagsResponse + (*DeleteFlagRequest)(nil), // 48: oteldemo.DeleteFlagRequest + (*DeleteFlagResponse)(nil), // 49: oteldemo.DeleteFlagResponse } var file_demo_proto_depIdxs = []int32{ 0, // 0: oteldemo.AddItemRequest.item:type_name -> oteldemo.CartItem 0, // 1: oteldemo.Cart.items:type_name -> oteldemo.CartItem - 18, // 2: oteldemo.Product.price_usd:type_name -> oteldemo.Money + 25, // 2: oteldemo.Product.price_usd:type_name -> oteldemo.Money 8, // 3: oteldemo.ListProductsResponse.products:type_name -> oteldemo.Product 8, // 4: oteldemo.SearchProductsResponse.results:type_name -> oteldemo.Product - 17, // 5: oteldemo.GetQuoteRequest.address:type_name -> oteldemo.Address - 0, // 6: oteldemo.GetQuoteRequest.items:type_name -> oteldemo.CartItem - 18, // 7: oteldemo.GetQuoteResponse.cost_usd:type_name -> oteldemo.Money - 17, // 8: oteldemo.ShipOrderRequest.address:type_name -> oteldemo.Address - 0, // 9: oteldemo.ShipOrderRequest.items:type_name -> oteldemo.CartItem - 18, // 10: oteldemo.CurrencyConversionRequest.from:type_name -> oteldemo.Money - 18, // 11: oteldemo.ChargeRequest.amount:type_name -> oteldemo.Money - 21, // 12: oteldemo.ChargeRequest.credit_card:type_name -> oteldemo.CreditCardInfo - 0, // 13: oteldemo.OrderItem.item:type_name -> oteldemo.CartItem - 18, // 14: oteldemo.OrderItem.cost:type_name -> oteldemo.Money - 18, // 15: oteldemo.OrderResult.shipping_cost:type_name -> oteldemo.Money - 17, // 16: oteldemo.OrderResult.shipping_address:type_name -> oteldemo.Address - 24, // 17: oteldemo.OrderResult.items:type_name -> oteldemo.OrderItem - 25, // 18: oteldemo.SendOrderConfirmationRequest.order:type_name -> oteldemo.OrderResult - 17, // 19: oteldemo.PlaceOrderRequest.address:type_name -> oteldemo.Address - 21, // 20: oteldemo.PlaceOrderRequest.credit_card:type_name -> oteldemo.CreditCardInfo - 25, // 21: oteldemo.PlaceOrderResponse.order:type_name -> oteldemo.OrderResult - 31, // 22: oteldemo.AdResponse.ads:type_name -> oteldemo.Ad - 32, // 23: oteldemo.GetFlagResponse.flag:type_name -> oteldemo.Flag - 32, // 24: oteldemo.CreateFlagResponse.flag:type_name -> oteldemo.Flag - 32, // 25: oteldemo.ListFlagsResponse.flag:type_name -> oteldemo.Flag - 1, // 26: oteldemo.CartService.AddItem:input_type -> oteldemo.AddItemRequest - 3, // 27: oteldemo.CartService.GetCart:input_type -> oteldemo.GetCartRequest - 2, // 28: oteldemo.CartService.EmptyCart:input_type -> oteldemo.EmptyCartRequest - 6, // 29: oteldemo.RecommendationService.ListRecommendations:input_type -> oteldemo.ListRecommendationsRequest - 5, // 30: oteldemo.ProductCatalogService.ListProducts:input_type -> oteldemo.Empty - 10, // 31: oteldemo.ProductCatalogService.GetProduct:input_type -> oteldemo.GetProductRequest - 11, // 32: oteldemo.ProductCatalogService.SearchProducts:input_type -> oteldemo.SearchProductsRequest - 13, // 33: oteldemo.ShippingService.GetQuote:input_type -> oteldemo.GetQuoteRequest - 15, // 34: oteldemo.ShippingService.ShipOrder:input_type -> oteldemo.ShipOrderRequest - 5, // 35: oteldemo.CurrencyService.GetSupportedCurrencies:input_type -> oteldemo.Empty - 20, // 36: oteldemo.CurrencyService.Convert:input_type -> oteldemo.CurrencyConversionRequest - 22, // 37: oteldemo.PaymentService.Charge:input_type -> oteldemo.ChargeRequest - 26, // 38: oteldemo.EmailService.SendOrderConfirmation:input_type -> oteldemo.SendOrderConfirmationRequest - 27, // 39: oteldemo.CheckoutService.PlaceOrder:input_type -> oteldemo.PlaceOrderRequest - 29, // 40: oteldemo.AdService.GetAds:input_type -> oteldemo.AdRequest - 33, // 41: oteldemo.FeatureFlagService.GetFlag:input_type -> oteldemo.GetFlagRequest - 35, // 42: oteldemo.FeatureFlagService.CreateFlag:input_type -> oteldemo.CreateFlagRequest - 37, // 43: oteldemo.FeatureFlagService.UpdateFlag:input_type -> oteldemo.UpdateFlagRequest - 39, // 44: oteldemo.FeatureFlagService.ListFlags:input_type -> oteldemo.ListFlagsRequest - 41, // 45: oteldemo.FeatureFlagService.DeleteFlag:input_type -> oteldemo.DeleteFlagRequest - 5, // 46: oteldemo.CartService.AddItem:output_type -> oteldemo.Empty - 4, // 47: oteldemo.CartService.GetCart:output_type -> oteldemo.Cart - 5, // 48: oteldemo.CartService.EmptyCart:output_type -> oteldemo.Empty - 7, // 49: oteldemo.RecommendationService.ListRecommendations:output_type -> oteldemo.ListRecommendationsResponse - 9, // 50: oteldemo.ProductCatalogService.ListProducts:output_type -> oteldemo.ListProductsResponse - 8, // 51: oteldemo.ProductCatalogService.GetProduct:output_type -> oteldemo.Product - 12, // 52: oteldemo.ProductCatalogService.SearchProducts:output_type -> oteldemo.SearchProductsResponse - 14, // 53: oteldemo.ShippingService.GetQuote:output_type -> oteldemo.GetQuoteResponse - 16, // 54: oteldemo.ShippingService.ShipOrder:output_type -> oteldemo.ShipOrderResponse - 19, // 55: oteldemo.CurrencyService.GetSupportedCurrencies:output_type -> oteldemo.GetSupportedCurrenciesResponse - 18, // 56: oteldemo.CurrencyService.Convert:output_type -> oteldemo.Money - 23, // 57: oteldemo.PaymentService.Charge:output_type -> oteldemo.ChargeResponse - 5, // 58: oteldemo.EmailService.SendOrderConfirmation:output_type -> oteldemo.Empty - 28, // 59: oteldemo.CheckoutService.PlaceOrder:output_type -> oteldemo.PlaceOrderResponse - 30, // 60: oteldemo.AdService.GetAds:output_type -> oteldemo.AdResponse - 34, // 61: oteldemo.FeatureFlagService.GetFlag:output_type -> oteldemo.GetFlagResponse - 36, // 62: oteldemo.FeatureFlagService.CreateFlag:output_type -> oteldemo.CreateFlagResponse - 38, // 63: oteldemo.FeatureFlagService.UpdateFlag:output_type -> oteldemo.UpdateFlagResponse - 40, // 64: oteldemo.FeatureFlagService.ListFlags:output_type -> oteldemo.ListFlagsResponse - 42, // 65: oteldemo.FeatureFlagService.DeleteFlag:output_type -> oteldemo.DeleteFlagResponse - 46, // [46:66] is the sub-list for method output_type - 26, // [26:46] is the sub-list for method input_type - 26, // [26:26] is the sub-list for extension type_name - 26, // [26:26] is the sub-list for extension extendee - 0, // [0:26] is the sub-list for field type_name + 13, // 5: oteldemo.GetProductReviewsResponse.product_reviews:type_name -> oteldemo.ProductReview + 24, // 6: oteldemo.GetQuoteRequest.address:type_name -> oteldemo.Address + 0, // 7: oteldemo.GetQuoteRequest.items:type_name -> oteldemo.CartItem + 25, // 8: oteldemo.GetQuoteResponse.cost_usd:type_name -> oteldemo.Money + 24, // 9: oteldemo.ShipOrderRequest.address:type_name -> oteldemo.Address + 0, // 10: oteldemo.ShipOrderRequest.items:type_name -> oteldemo.CartItem + 25, // 11: oteldemo.CurrencyConversionRequest.from:type_name -> oteldemo.Money + 25, // 12: oteldemo.ChargeRequest.amount:type_name -> oteldemo.Money + 28, // 13: oteldemo.ChargeRequest.credit_card:type_name -> oteldemo.CreditCardInfo + 0, // 14: oteldemo.OrderItem.item:type_name -> oteldemo.CartItem + 25, // 15: oteldemo.OrderItem.cost:type_name -> oteldemo.Money + 25, // 16: oteldemo.OrderResult.shipping_cost:type_name -> oteldemo.Money + 24, // 17: oteldemo.OrderResult.shipping_address:type_name -> oteldemo.Address + 31, // 18: oteldemo.OrderResult.items:type_name -> oteldemo.OrderItem + 32, // 19: oteldemo.SendOrderConfirmationRequest.order:type_name -> oteldemo.OrderResult + 24, // 20: oteldemo.PlaceOrderRequest.address:type_name -> oteldemo.Address + 28, // 21: oteldemo.PlaceOrderRequest.credit_card:type_name -> oteldemo.CreditCardInfo + 32, // 22: oteldemo.PlaceOrderResponse.order:type_name -> oteldemo.OrderResult + 38, // 23: oteldemo.AdResponse.ads:type_name -> oteldemo.Ad + 39, // 24: oteldemo.GetFlagResponse.flag:type_name -> oteldemo.Flag + 39, // 25: oteldemo.CreateFlagResponse.flag:type_name -> oteldemo.Flag + 39, // 26: oteldemo.ListFlagsResponse.flag:type_name -> oteldemo.Flag + 1, // 27: oteldemo.CartService.AddItem:input_type -> oteldemo.AddItemRequest + 3, // 28: oteldemo.CartService.GetCart:input_type -> oteldemo.GetCartRequest + 2, // 29: oteldemo.CartService.EmptyCart:input_type -> oteldemo.EmptyCartRequest + 6, // 30: oteldemo.RecommendationService.ListRecommendations:input_type -> oteldemo.ListRecommendationsRequest + 5, // 31: oteldemo.ProductCatalogService.ListProducts:input_type -> oteldemo.Empty + 10, // 32: oteldemo.ProductCatalogService.GetProduct:input_type -> oteldemo.GetProductRequest + 11, // 33: oteldemo.ProductCatalogService.SearchProducts:input_type -> oteldemo.SearchProductsRequest + 14, // 34: oteldemo.ProductReviewService.GetProductReviews:input_type -> oteldemo.GetProductReviewsRequest + 16, // 35: oteldemo.ProductReviewService.GetAverageProductReviewScore:input_type -> oteldemo.GetAverageProductReviewScoreRequest + 18, // 36: oteldemo.ProductReviewService.AskProductAIAssistant:input_type -> oteldemo.AskProductAIAssistantRequest + 20, // 37: oteldemo.ShippingService.GetQuote:input_type -> oteldemo.GetQuoteRequest + 22, // 38: oteldemo.ShippingService.ShipOrder:input_type -> oteldemo.ShipOrderRequest + 5, // 39: oteldemo.CurrencyService.GetSupportedCurrencies:input_type -> oteldemo.Empty + 27, // 40: oteldemo.CurrencyService.Convert:input_type -> oteldemo.CurrencyConversionRequest + 29, // 41: oteldemo.PaymentService.Charge:input_type -> oteldemo.ChargeRequest + 33, // 42: oteldemo.EmailService.SendOrderConfirmation:input_type -> oteldemo.SendOrderConfirmationRequest + 34, // 43: oteldemo.CheckoutService.PlaceOrder:input_type -> oteldemo.PlaceOrderRequest + 36, // 44: oteldemo.AdService.GetAds:input_type -> oteldemo.AdRequest + 40, // 45: oteldemo.FeatureFlagService.GetFlag:input_type -> oteldemo.GetFlagRequest + 42, // 46: oteldemo.FeatureFlagService.CreateFlag:input_type -> oteldemo.CreateFlagRequest + 44, // 47: oteldemo.FeatureFlagService.UpdateFlag:input_type -> oteldemo.UpdateFlagRequest + 46, // 48: oteldemo.FeatureFlagService.ListFlags:input_type -> oteldemo.ListFlagsRequest + 48, // 49: oteldemo.FeatureFlagService.DeleteFlag:input_type -> oteldemo.DeleteFlagRequest + 5, // 50: oteldemo.CartService.AddItem:output_type -> oteldemo.Empty + 4, // 51: oteldemo.CartService.GetCart:output_type -> oteldemo.Cart + 5, // 52: oteldemo.CartService.EmptyCart:output_type -> oteldemo.Empty + 7, // 53: oteldemo.RecommendationService.ListRecommendations:output_type -> oteldemo.ListRecommendationsResponse + 9, // 54: oteldemo.ProductCatalogService.ListProducts:output_type -> oteldemo.ListProductsResponse + 8, // 55: oteldemo.ProductCatalogService.GetProduct:output_type -> oteldemo.Product + 12, // 56: oteldemo.ProductCatalogService.SearchProducts:output_type -> oteldemo.SearchProductsResponse + 15, // 57: oteldemo.ProductReviewService.GetProductReviews:output_type -> oteldemo.GetProductReviewsResponse + 17, // 58: oteldemo.ProductReviewService.GetAverageProductReviewScore:output_type -> oteldemo.GetAverageProductReviewScoreResponse + 19, // 59: oteldemo.ProductReviewService.AskProductAIAssistant:output_type -> oteldemo.AskProductAIAssistantResponse + 21, // 60: oteldemo.ShippingService.GetQuote:output_type -> oteldemo.GetQuoteResponse + 23, // 61: oteldemo.ShippingService.ShipOrder:output_type -> oteldemo.ShipOrderResponse + 26, // 62: oteldemo.CurrencyService.GetSupportedCurrencies:output_type -> oteldemo.GetSupportedCurrenciesResponse + 25, // 63: oteldemo.CurrencyService.Convert:output_type -> oteldemo.Money + 30, // 64: oteldemo.PaymentService.Charge:output_type -> oteldemo.ChargeResponse + 5, // 65: oteldemo.EmailService.SendOrderConfirmation:output_type -> oteldemo.Empty + 35, // 66: oteldemo.CheckoutService.PlaceOrder:output_type -> oteldemo.PlaceOrderResponse + 37, // 67: oteldemo.AdService.GetAds:output_type -> oteldemo.AdResponse + 41, // 68: oteldemo.FeatureFlagService.GetFlag:output_type -> oteldemo.GetFlagResponse + 43, // 69: oteldemo.FeatureFlagService.CreateFlag:output_type -> oteldemo.CreateFlagResponse + 45, // 70: oteldemo.FeatureFlagService.UpdateFlag:output_type -> oteldemo.UpdateFlagResponse + 47, // 71: oteldemo.FeatureFlagService.ListFlags:output_type -> oteldemo.ListFlagsResponse + 49, // 72: oteldemo.FeatureFlagService.DeleteFlag:output_type -> oteldemo.DeleteFlagResponse + 50, // [50:73] is the sub-list for method output_type + 27, // [27:50] is the sub-list for method input_type + 27, // [27:27] is the sub-list for extension type_name + 27, // [27:27] is the sub-list for extension extendee + 0, // [0:27] is the sub-list for field type_name } func init() { file_demo_proto_init() } @@ -2530,9 +2900,9 @@ func file_demo_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_demo_proto_rawDesc), len(file_demo_proto_rawDesc)), NumEnums: 0, - NumMessages: 43, + NumMessages: 50, NumExtensions: 0, - NumServices: 10, + NumServices: 11, }, GoTypes: file_demo_proto_goTypes, DependencyIndexes: file_demo_proto_depIdxs, diff --git a/src/checkout/genproto/oteldemo/demo_grpc.pb.go b/src/checkout/genproto/oteldemo/demo_grpc.pb.go index f04633a673..5fda83bb62 100644 --- a/src/checkout/genproto/oteldemo/demo_grpc.pb.go +++ b/src/checkout/genproto/oteldemo/demo_grpc.pb.go @@ -490,6 +490,184 @@ var ProductCatalogService_ServiceDesc = grpc.ServiceDesc{ Metadata: "demo.proto", } +const ( + ProductReviewService_GetProductReviews_FullMethodName = "/oteldemo.ProductReviewService/GetProductReviews" + ProductReviewService_GetAverageProductReviewScore_FullMethodName = "/oteldemo.ProductReviewService/GetAverageProductReviewScore" + ProductReviewService_AskProductAIAssistant_FullMethodName = "/oteldemo.ProductReviewService/AskProductAIAssistant" +) + +// ProductReviewServiceClient is the client API for ProductReviewService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type ProductReviewServiceClient interface { + GetProductReviews(ctx context.Context, in *GetProductReviewsRequest, opts ...grpc.CallOption) (*GetProductReviewsResponse, error) + GetAverageProductReviewScore(ctx context.Context, in *GetAverageProductReviewScoreRequest, opts ...grpc.CallOption) (*GetAverageProductReviewScoreResponse, error) + AskProductAIAssistant(ctx context.Context, in *AskProductAIAssistantRequest, opts ...grpc.CallOption) (*AskProductAIAssistantResponse, error) +} + +type productReviewServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewProductReviewServiceClient(cc grpc.ClientConnInterface) ProductReviewServiceClient { + return &productReviewServiceClient{cc} +} + +func (c *productReviewServiceClient) GetProductReviews(ctx context.Context, in *GetProductReviewsRequest, opts ...grpc.CallOption) (*GetProductReviewsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetProductReviewsResponse) + err := c.cc.Invoke(ctx, ProductReviewService_GetProductReviews_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *productReviewServiceClient) GetAverageProductReviewScore(ctx context.Context, in *GetAverageProductReviewScoreRequest, opts ...grpc.CallOption) (*GetAverageProductReviewScoreResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetAverageProductReviewScoreResponse) + err := c.cc.Invoke(ctx, ProductReviewService_GetAverageProductReviewScore_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *productReviewServiceClient) AskProductAIAssistant(ctx context.Context, in *AskProductAIAssistantRequest, opts ...grpc.CallOption) (*AskProductAIAssistantResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(AskProductAIAssistantResponse) + err := c.cc.Invoke(ctx, ProductReviewService_AskProductAIAssistant_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ProductReviewServiceServer is the server API for ProductReviewService service. +// All implementations must embed UnimplementedProductReviewServiceServer +// for forward compatibility. +type ProductReviewServiceServer interface { + GetProductReviews(context.Context, *GetProductReviewsRequest) (*GetProductReviewsResponse, error) + GetAverageProductReviewScore(context.Context, *GetAverageProductReviewScoreRequest) (*GetAverageProductReviewScoreResponse, error) + AskProductAIAssistant(context.Context, *AskProductAIAssistantRequest) (*AskProductAIAssistantResponse, error) + mustEmbedUnimplementedProductReviewServiceServer() +} + +// UnimplementedProductReviewServiceServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedProductReviewServiceServer struct{} + +func (UnimplementedProductReviewServiceServer) GetProductReviews(context.Context, *GetProductReviewsRequest) (*GetProductReviewsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetProductReviews not implemented") +} +func (UnimplementedProductReviewServiceServer) GetAverageProductReviewScore(context.Context, *GetAverageProductReviewScoreRequest) (*GetAverageProductReviewScoreResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetAverageProductReviewScore not implemented") +} +func (UnimplementedProductReviewServiceServer) AskProductAIAssistant(context.Context, *AskProductAIAssistantRequest) (*AskProductAIAssistantResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AskProductAIAssistant not implemented") +} +func (UnimplementedProductReviewServiceServer) mustEmbedUnimplementedProductReviewServiceServer() {} +func (UnimplementedProductReviewServiceServer) testEmbeddedByValue() {} + +// UnsafeProductReviewServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to ProductReviewServiceServer will +// result in compilation errors. +type UnsafeProductReviewServiceServer interface { + mustEmbedUnimplementedProductReviewServiceServer() +} + +func RegisterProductReviewServiceServer(s grpc.ServiceRegistrar, srv ProductReviewServiceServer) { + // If the following call pancis, it indicates UnimplementedProductReviewServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&ProductReviewService_ServiceDesc, srv) +} + +func _ProductReviewService_GetProductReviews_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetProductReviewsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProductReviewServiceServer).GetProductReviews(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ProductReviewService_GetProductReviews_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProductReviewServiceServer).GetProductReviews(ctx, req.(*GetProductReviewsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ProductReviewService_GetAverageProductReviewScore_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetAverageProductReviewScoreRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProductReviewServiceServer).GetAverageProductReviewScore(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ProductReviewService_GetAverageProductReviewScore_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProductReviewServiceServer).GetAverageProductReviewScore(ctx, req.(*GetAverageProductReviewScoreRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ProductReviewService_AskProductAIAssistant_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AskProductAIAssistantRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProductReviewServiceServer).AskProductAIAssistant(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ProductReviewService_AskProductAIAssistant_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProductReviewServiceServer).AskProductAIAssistant(ctx, req.(*AskProductAIAssistantRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// ProductReviewService_ServiceDesc is the grpc.ServiceDesc for ProductReviewService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var ProductReviewService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "oteldemo.ProductReviewService", + HandlerType: (*ProductReviewServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetProductReviews", + Handler: _ProductReviewService_GetProductReviews_Handler, + }, + { + MethodName: "GetAverageProductReviewScore", + Handler: _ProductReviewService_GetAverageProductReviewScore_Handler, + }, + { + MethodName: "AskProductAIAssistant", + Handler: _ProductReviewService_AskProductAIAssistant_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "demo.proto", +} + const ( ShippingService_GetQuote_FullMethodName = "/oteldemo.ShippingService/GetQuote" ShippingService_ShipOrder_FullMethodName = "/oteldemo.ShippingService/ShipOrder" diff --git a/src/currency/build/generated/proto/demo.grpc.pb.cc b/src/currency/build/generated/proto/demo.grpc.pb.cc index b02a92ab4e..a445864313 100644 --- a/src/currency/build/generated/proto/demo.grpc.pb.cc +++ b/src/currency/build/generated/proto/demo.grpc.pb.cc @@ -372,6 +372,151 @@ ::grpc::Status ProductCatalogService::Service::SearchProducts(::grpc::ServerCont } +static const char* ProductReviewService_method_names[] = { + "/oteldemo.ProductReviewService/GetProductReviews", + "/oteldemo.ProductReviewService/GetAverageProductReviewScore", + "/oteldemo.ProductReviewService/AskProductAIAssistant", +}; + +std::unique_ptr< ProductReviewService::Stub> ProductReviewService::NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) { + (void)options; + std::unique_ptr< ProductReviewService::Stub> stub(new ProductReviewService::Stub(channel, options)); + return stub; +} + +ProductReviewService::Stub::Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) + : channel_(channel), rpcmethod_GetProductReviews_(ProductReviewService_method_names[0], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_GetAverageProductReviewScore_(ProductReviewService_method_names[1], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_AskProductAIAssistant_(ProductReviewService_method_names[2], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) + {} + +::grpc::Status ProductReviewService::Stub::GetProductReviews(::grpc::ClientContext* context, const ::oteldemo::GetProductReviewsRequest& request, ::oteldemo::GetProductReviewsResponse* response) { + return ::grpc::internal::BlockingUnaryCall< ::oteldemo::GetProductReviewsRequest, ::oteldemo::GetProductReviewsResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_GetProductReviews_, context, request, response); +} + +void ProductReviewService::Stub::async::GetProductReviews(::grpc::ClientContext* context, const ::oteldemo::GetProductReviewsRequest* request, ::oteldemo::GetProductReviewsResponse* response, std::function f) { + ::grpc::internal::CallbackUnaryCall< ::oteldemo::GetProductReviewsRequest, ::oteldemo::GetProductReviewsResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_GetProductReviews_, context, request, response, std::move(f)); +} + +void ProductReviewService::Stub::async::GetProductReviews(::grpc::ClientContext* context, const ::oteldemo::GetProductReviewsRequest* request, ::oteldemo::GetProductReviewsResponse* response, ::grpc::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_GetProductReviews_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::oteldemo::GetProductReviewsResponse>* ProductReviewService::Stub::PrepareAsyncGetProductReviewsRaw(::grpc::ClientContext* context, const ::oteldemo::GetProductReviewsRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::oteldemo::GetProductReviewsResponse, ::oteldemo::GetProductReviewsRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_GetProductReviews_, context, request); +} + +::grpc::ClientAsyncResponseReader< ::oteldemo::GetProductReviewsResponse>* ProductReviewService::Stub::AsyncGetProductReviewsRaw(::grpc::ClientContext* context, const ::oteldemo::GetProductReviewsRequest& request, ::grpc::CompletionQueue* cq) { + auto* result = + this->PrepareAsyncGetProductReviewsRaw(context, request, cq); + result->StartCall(); + return result; +} + +::grpc::Status ProductReviewService::Stub::GetAverageProductReviewScore(::grpc::ClientContext* context, const ::oteldemo::GetAverageProductReviewScoreRequest& request, ::oteldemo::GetAverageProductReviewScoreResponse* response) { + return ::grpc::internal::BlockingUnaryCall< ::oteldemo::GetAverageProductReviewScoreRequest, ::oteldemo::GetAverageProductReviewScoreResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_GetAverageProductReviewScore_, context, request, response); +} + +void ProductReviewService::Stub::async::GetAverageProductReviewScore(::grpc::ClientContext* context, const ::oteldemo::GetAverageProductReviewScoreRequest* request, ::oteldemo::GetAverageProductReviewScoreResponse* response, std::function f) { + ::grpc::internal::CallbackUnaryCall< ::oteldemo::GetAverageProductReviewScoreRequest, ::oteldemo::GetAverageProductReviewScoreResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_GetAverageProductReviewScore_, context, request, response, std::move(f)); +} + +void ProductReviewService::Stub::async::GetAverageProductReviewScore(::grpc::ClientContext* context, const ::oteldemo::GetAverageProductReviewScoreRequest* request, ::oteldemo::GetAverageProductReviewScoreResponse* response, ::grpc::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_GetAverageProductReviewScore_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::oteldemo::GetAverageProductReviewScoreResponse>* ProductReviewService::Stub::PrepareAsyncGetAverageProductReviewScoreRaw(::grpc::ClientContext* context, const ::oteldemo::GetAverageProductReviewScoreRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::oteldemo::GetAverageProductReviewScoreResponse, ::oteldemo::GetAverageProductReviewScoreRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_GetAverageProductReviewScore_, context, request); +} + +::grpc::ClientAsyncResponseReader< ::oteldemo::GetAverageProductReviewScoreResponse>* ProductReviewService::Stub::AsyncGetAverageProductReviewScoreRaw(::grpc::ClientContext* context, const ::oteldemo::GetAverageProductReviewScoreRequest& request, ::grpc::CompletionQueue* cq) { + auto* result = + this->PrepareAsyncGetAverageProductReviewScoreRaw(context, request, cq); + result->StartCall(); + return result; +} + +::grpc::Status ProductReviewService::Stub::AskProductAIAssistant(::grpc::ClientContext* context, const ::oteldemo::AskProductAIAssistantRequest& request, ::oteldemo::AskProductAIAssistantResponse* response) { + return ::grpc::internal::BlockingUnaryCall< ::oteldemo::AskProductAIAssistantRequest, ::oteldemo::AskProductAIAssistantResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_AskProductAIAssistant_, context, request, response); +} + +void ProductReviewService::Stub::async::AskProductAIAssistant(::grpc::ClientContext* context, const ::oteldemo::AskProductAIAssistantRequest* request, ::oteldemo::AskProductAIAssistantResponse* response, std::function f) { + ::grpc::internal::CallbackUnaryCall< ::oteldemo::AskProductAIAssistantRequest, ::oteldemo::AskProductAIAssistantResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_AskProductAIAssistant_, context, request, response, std::move(f)); +} + +void ProductReviewService::Stub::async::AskProductAIAssistant(::grpc::ClientContext* context, const ::oteldemo::AskProductAIAssistantRequest* request, ::oteldemo::AskProductAIAssistantResponse* response, ::grpc::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_AskProductAIAssistant_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::oteldemo::AskProductAIAssistantResponse>* ProductReviewService::Stub::PrepareAsyncAskProductAIAssistantRaw(::grpc::ClientContext* context, const ::oteldemo::AskProductAIAssistantRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::oteldemo::AskProductAIAssistantResponse, ::oteldemo::AskProductAIAssistantRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_AskProductAIAssistant_, context, request); +} + +::grpc::ClientAsyncResponseReader< ::oteldemo::AskProductAIAssistantResponse>* ProductReviewService::Stub::AsyncAskProductAIAssistantRaw(::grpc::ClientContext* context, const ::oteldemo::AskProductAIAssistantRequest& request, ::grpc::CompletionQueue* cq) { + auto* result = + this->PrepareAsyncAskProductAIAssistantRaw(context, request, cq); + result->StartCall(); + return result; +} + +ProductReviewService::Service::Service() { + AddMethod(new ::grpc::internal::RpcServiceMethod( + ProductReviewService_method_names[0], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< ProductReviewService::Service, ::oteldemo::GetProductReviewsRequest, ::oteldemo::GetProductReviewsResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( + [](ProductReviewService::Service* service, + ::grpc::ServerContext* ctx, + const ::oteldemo::GetProductReviewsRequest* req, + ::oteldemo::GetProductReviewsResponse* resp) { + return service->GetProductReviews(ctx, req, resp); + }, this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + ProductReviewService_method_names[1], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< ProductReviewService::Service, ::oteldemo::GetAverageProductReviewScoreRequest, ::oteldemo::GetAverageProductReviewScoreResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( + [](ProductReviewService::Service* service, + ::grpc::ServerContext* ctx, + const ::oteldemo::GetAverageProductReviewScoreRequest* req, + ::oteldemo::GetAverageProductReviewScoreResponse* resp) { + return service->GetAverageProductReviewScore(ctx, req, resp); + }, this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + ProductReviewService_method_names[2], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< ProductReviewService::Service, ::oteldemo::AskProductAIAssistantRequest, ::oteldemo::AskProductAIAssistantResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( + [](ProductReviewService::Service* service, + ::grpc::ServerContext* ctx, + const ::oteldemo::AskProductAIAssistantRequest* req, + ::oteldemo::AskProductAIAssistantResponse* resp) { + return service->AskProductAIAssistant(ctx, req, resp); + }, this))); +} + +ProductReviewService::Service::~Service() { +} + +::grpc::Status ProductReviewService::Service::GetProductReviews(::grpc::ServerContext* context, const ::oteldemo::GetProductReviewsRequest* request, ::oteldemo::GetProductReviewsResponse* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status ProductReviewService::Service::GetAverageProductReviewScore(::grpc::ServerContext* context, const ::oteldemo::GetAverageProductReviewScoreRequest* request, ::oteldemo::GetAverageProductReviewScoreResponse* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status ProductReviewService::Service::AskProductAIAssistant(::grpc::ServerContext* context, const ::oteldemo::AskProductAIAssistantRequest* request, ::oteldemo::AskProductAIAssistantResponse* 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", diff --git a/src/currency/build/generated/proto/demo.grpc.pb.h b/src/currency/build/generated/proto/demo.grpc.pb.h index 82871733e9..2bd5cb8ae2 100644 --- a/src/currency/build/generated/proto/demo.grpc.pb.h +++ b/src/currency/build/generated/proto/demo.grpc.pb.h @@ -1297,6 +1297,529 @@ class ProductCatalogService final { typedef WithStreamedUnaryMethod_ListProducts > > StreamedService; }; +// ---------------Product Review service---------- +// +class ProductReviewService final { + public: + static constexpr char const* service_full_name() { + return "oteldemo.ProductReviewService"; + } + class StubInterface { + public: + virtual ~StubInterface() {} + virtual ::grpc::Status GetProductReviews(::grpc::ClientContext* context, const ::oteldemo::GetProductReviewsRequest& request, ::oteldemo::GetProductReviewsResponse* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::GetProductReviewsResponse>> AsyncGetProductReviews(::grpc::ClientContext* context, const ::oteldemo::GetProductReviewsRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::GetProductReviewsResponse>>(AsyncGetProductReviewsRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::GetProductReviewsResponse>> PrepareAsyncGetProductReviews(::grpc::ClientContext* context, const ::oteldemo::GetProductReviewsRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::GetProductReviewsResponse>>(PrepareAsyncGetProductReviewsRaw(context, request, cq)); + } + virtual ::grpc::Status GetAverageProductReviewScore(::grpc::ClientContext* context, const ::oteldemo::GetAverageProductReviewScoreRequest& request, ::oteldemo::GetAverageProductReviewScoreResponse* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::GetAverageProductReviewScoreResponse>> AsyncGetAverageProductReviewScore(::grpc::ClientContext* context, const ::oteldemo::GetAverageProductReviewScoreRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::GetAverageProductReviewScoreResponse>>(AsyncGetAverageProductReviewScoreRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::GetAverageProductReviewScoreResponse>> PrepareAsyncGetAverageProductReviewScore(::grpc::ClientContext* context, const ::oteldemo::GetAverageProductReviewScoreRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::GetAverageProductReviewScoreResponse>>(PrepareAsyncGetAverageProductReviewScoreRaw(context, request, cq)); + } + virtual ::grpc::Status AskProductAIAssistant(::grpc::ClientContext* context, const ::oteldemo::AskProductAIAssistantRequest& request, ::oteldemo::AskProductAIAssistantResponse* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::AskProductAIAssistantResponse>> AsyncAskProductAIAssistant(::grpc::ClientContext* context, const ::oteldemo::AskProductAIAssistantRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::AskProductAIAssistantResponse>>(AsyncAskProductAIAssistantRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::AskProductAIAssistantResponse>> PrepareAsyncAskProductAIAssistant(::grpc::ClientContext* context, const ::oteldemo::AskProductAIAssistantRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::AskProductAIAssistantResponse>>(PrepareAsyncAskProductAIAssistantRaw(context, request, cq)); + } + class async_interface { + public: + virtual ~async_interface() {} + virtual void GetProductReviews(::grpc::ClientContext* context, const ::oteldemo::GetProductReviewsRequest* request, ::oteldemo::GetProductReviewsResponse* response, std::function) = 0; + virtual void GetProductReviews(::grpc::ClientContext* context, const ::oteldemo::GetProductReviewsRequest* request, ::oteldemo::GetProductReviewsResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + virtual void GetAverageProductReviewScore(::grpc::ClientContext* context, const ::oteldemo::GetAverageProductReviewScoreRequest* request, ::oteldemo::GetAverageProductReviewScoreResponse* response, std::function) = 0; + virtual void GetAverageProductReviewScore(::grpc::ClientContext* context, const ::oteldemo::GetAverageProductReviewScoreRequest* request, ::oteldemo::GetAverageProductReviewScoreResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + virtual void AskProductAIAssistant(::grpc::ClientContext* context, const ::oteldemo::AskProductAIAssistantRequest* request, ::oteldemo::AskProductAIAssistantResponse* response, std::function) = 0; + virtual void AskProductAIAssistant(::grpc::ClientContext* context, const ::oteldemo::AskProductAIAssistantRequest* request, ::oteldemo::AskProductAIAssistantResponse* 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::GetProductReviewsResponse>* AsyncGetProductReviewsRaw(::grpc::ClientContext* context, const ::oteldemo::GetProductReviewsRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::GetProductReviewsResponse>* PrepareAsyncGetProductReviewsRaw(::grpc::ClientContext* context, const ::oteldemo::GetProductReviewsRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::GetAverageProductReviewScoreResponse>* AsyncGetAverageProductReviewScoreRaw(::grpc::ClientContext* context, const ::oteldemo::GetAverageProductReviewScoreRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::GetAverageProductReviewScoreResponse>* PrepareAsyncGetAverageProductReviewScoreRaw(::grpc::ClientContext* context, const ::oteldemo::GetAverageProductReviewScoreRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::AskProductAIAssistantResponse>* AsyncAskProductAIAssistantRaw(::grpc::ClientContext* context, const ::oteldemo::AskProductAIAssistantRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::AskProductAIAssistantResponse>* PrepareAsyncAskProductAIAssistantRaw(::grpc::ClientContext* context, const ::oteldemo::AskProductAIAssistantRequest& 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 GetProductReviews(::grpc::ClientContext* context, const ::oteldemo::GetProductReviewsRequest& request, ::oteldemo::GetProductReviewsResponse* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::oteldemo::GetProductReviewsResponse>> AsyncGetProductReviews(::grpc::ClientContext* context, const ::oteldemo::GetProductReviewsRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::oteldemo::GetProductReviewsResponse>>(AsyncGetProductReviewsRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::oteldemo::GetProductReviewsResponse>> PrepareAsyncGetProductReviews(::grpc::ClientContext* context, const ::oteldemo::GetProductReviewsRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::oteldemo::GetProductReviewsResponse>>(PrepareAsyncGetProductReviewsRaw(context, request, cq)); + } + ::grpc::Status GetAverageProductReviewScore(::grpc::ClientContext* context, const ::oteldemo::GetAverageProductReviewScoreRequest& request, ::oteldemo::GetAverageProductReviewScoreResponse* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::oteldemo::GetAverageProductReviewScoreResponse>> AsyncGetAverageProductReviewScore(::grpc::ClientContext* context, const ::oteldemo::GetAverageProductReviewScoreRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::oteldemo::GetAverageProductReviewScoreResponse>>(AsyncGetAverageProductReviewScoreRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::oteldemo::GetAverageProductReviewScoreResponse>> PrepareAsyncGetAverageProductReviewScore(::grpc::ClientContext* context, const ::oteldemo::GetAverageProductReviewScoreRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::oteldemo::GetAverageProductReviewScoreResponse>>(PrepareAsyncGetAverageProductReviewScoreRaw(context, request, cq)); + } + ::grpc::Status AskProductAIAssistant(::grpc::ClientContext* context, const ::oteldemo::AskProductAIAssistantRequest& request, ::oteldemo::AskProductAIAssistantResponse* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::oteldemo::AskProductAIAssistantResponse>> AsyncAskProductAIAssistant(::grpc::ClientContext* context, const ::oteldemo::AskProductAIAssistantRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::oteldemo::AskProductAIAssistantResponse>>(AsyncAskProductAIAssistantRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::oteldemo::AskProductAIAssistantResponse>> PrepareAsyncAskProductAIAssistant(::grpc::ClientContext* context, const ::oteldemo::AskProductAIAssistantRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::oteldemo::AskProductAIAssistantResponse>>(PrepareAsyncAskProductAIAssistantRaw(context, request, cq)); + } + class async final : + public StubInterface::async_interface { + public: + void GetProductReviews(::grpc::ClientContext* context, const ::oteldemo::GetProductReviewsRequest* request, ::oteldemo::GetProductReviewsResponse* response, std::function) override; + void GetProductReviews(::grpc::ClientContext* context, const ::oteldemo::GetProductReviewsRequest* request, ::oteldemo::GetProductReviewsResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + void GetAverageProductReviewScore(::grpc::ClientContext* context, const ::oteldemo::GetAverageProductReviewScoreRequest* request, ::oteldemo::GetAverageProductReviewScoreResponse* response, std::function) override; + void GetAverageProductReviewScore(::grpc::ClientContext* context, const ::oteldemo::GetAverageProductReviewScoreRequest* request, ::oteldemo::GetAverageProductReviewScoreResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + void AskProductAIAssistant(::grpc::ClientContext* context, const ::oteldemo::AskProductAIAssistantRequest* request, ::oteldemo::AskProductAIAssistantResponse* response, std::function) override; + void AskProductAIAssistant(::grpc::ClientContext* context, const ::oteldemo::AskProductAIAssistantRequest* request, ::oteldemo::AskProductAIAssistantResponse* 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::GetProductReviewsResponse>* AsyncGetProductReviewsRaw(::grpc::ClientContext* context, const ::oteldemo::GetProductReviewsRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::oteldemo::GetProductReviewsResponse>* PrepareAsyncGetProductReviewsRaw(::grpc::ClientContext* context, const ::oteldemo::GetProductReviewsRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::oteldemo::GetAverageProductReviewScoreResponse>* AsyncGetAverageProductReviewScoreRaw(::grpc::ClientContext* context, const ::oteldemo::GetAverageProductReviewScoreRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::oteldemo::GetAverageProductReviewScoreResponse>* PrepareAsyncGetAverageProductReviewScoreRaw(::grpc::ClientContext* context, const ::oteldemo::GetAverageProductReviewScoreRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::oteldemo::AskProductAIAssistantResponse>* AsyncAskProductAIAssistantRaw(::grpc::ClientContext* context, const ::oteldemo::AskProductAIAssistantRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::oteldemo::AskProductAIAssistantResponse>* PrepareAsyncAskProductAIAssistantRaw(::grpc::ClientContext* context, const ::oteldemo::AskProductAIAssistantRequest& request, ::grpc::CompletionQueue* cq) override; + const ::grpc::internal::RpcMethod rpcmethod_GetProductReviews_; + const ::grpc::internal::RpcMethod rpcmethod_GetAverageProductReviewScore_; + const ::grpc::internal::RpcMethod rpcmethod_AskProductAIAssistant_; + }; + 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 GetProductReviews(::grpc::ServerContext* context, const ::oteldemo::GetProductReviewsRequest* request, ::oteldemo::GetProductReviewsResponse* response); + virtual ::grpc::Status GetAverageProductReviewScore(::grpc::ServerContext* context, const ::oteldemo::GetAverageProductReviewScoreRequest* request, ::oteldemo::GetAverageProductReviewScoreResponse* response); + virtual ::grpc::Status AskProductAIAssistant(::grpc::ServerContext* context, const ::oteldemo::AskProductAIAssistantRequest* request, ::oteldemo::AskProductAIAssistantResponse* response); + }; + template + class WithAsyncMethod_GetProductReviews : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_GetProductReviews() { + ::grpc::Service::MarkMethodAsync(0); + } + ~WithAsyncMethod_GetProductReviews() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status GetProductReviews(::grpc::ServerContext* /*context*/, const ::oteldemo::GetProductReviewsRequest* /*request*/, ::oteldemo::GetProductReviewsResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestGetProductReviews(::grpc::ServerContext* context, ::oteldemo::GetProductReviewsRequest* request, ::grpc::ServerAsyncResponseWriter< ::oteldemo::GetProductReviewsResponse>* 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_GetAverageProductReviewScore : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_GetAverageProductReviewScore() { + ::grpc::Service::MarkMethodAsync(1); + } + ~WithAsyncMethod_GetAverageProductReviewScore() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status GetAverageProductReviewScore(::grpc::ServerContext* /*context*/, const ::oteldemo::GetAverageProductReviewScoreRequest* /*request*/, ::oteldemo::GetAverageProductReviewScoreResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestGetAverageProductReviewScore(::grpc::ServerContext* context, ::oteldemo::GetAverageProductReviewScoreRequest* request, ::grpc::ServerAsyncResponseWriter< ::oteldemo::GetAverageProductReviewScoreResponse>* 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_AskProductAIAssistant : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_AskProductAIAssistant() { + ::grpc::Service::MarkMethodAsync(2); + } + ~WithAsyncMethod_AskProductAIAssistant() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status AskProductAIAssistant(::grpc::ServerContext* /*context*/, const ::oteldemo::AskProductAIAssistantRequest* /*request*/, ::oteldemo::AskProductAIAssistantResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestAskProductAIAssistant(::grpc::ServerContext* context, ::oteldemo::AskProductAIAssistantRequest* request, ::grpc::ServerAsyncResponseWriter< ::oteldemo::AskProductAIAssistantResponse>* 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_GetProductReviews > > AsyncService; + template + class WithCallbackMethod_GetProductReviews : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithCallbackMethod_GetProductReviews() { + ::grpc::Service::MarkMethodCallback(0, + new ::grpc::internal::CallbackUnaryHandler< ::oteldemo::GetProductReviewsRequest, ::oteldemo::GetProductReviewsResponse>( + [this]( + ::grpc::CallbackServerContext* context, const ::oteldemo::GetProductReviewsRequest* request, ::oteldemo::GetProductReviewsResponse* response) { return this->GetProductReviews(context, request, response); }));} + void SetMessageAllocatorFor_GetProductReviews( + ::grpc::MessageAllocator< ::oteldemo::GetProductReviewsRequest, ::oteldemo::GetProductReviewsResponse>* allocator) { + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(0); + static_cast<::grpc::internal::CallbackUnaryHandler< ::oteldemo::GetProductReviewsRequest, ::oteldemo::GetProductReviewsResponse>*>(handler) + ->SetMessageAllocator(allocator); + } + ~WithCallbackMethod_GetProductReviews() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status GetProductReviews(::grpc::ServerContext* /*context*/, const ::oteldemo::GetProductReviewsRequest* /*request*/, ::oteldemo::GetProductReviewsResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* GetProductReviews( + ::grpc::CallbackServerContext* /*context*/, const ::oteldemo::GetProductReviewsRequest* /*request*/, ::oteldemo::GetProductReviewsResponse* /*response*/) { return nullptr; } + }; + template + class WithCallbackMethod_GetAverageProductReviewScore : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithCallbackMethod_GetAverageProductReviewScore() { + ::grpc::Service::MarkMethodCallback(1, + new ::grpc::internal::CallbackUnaryHandler< ::oteldemo::GetAverageProductReviewScoreRequest, ::oteldemo::GetAverageProductReviewScoreResponse>( + [this]( + ::grpc::CallbackServerContext* context, const ::oteldemo::GetAverageProductReviewScoreRequest* request, ::oteldemo::GetAverageProductReviewScoreResponse* response) { return this->GetAverageProductReviewScore(context, request, response); }));} + void SetMessageAllocatorFor_GetAverageProductReviewScore( + ::grpc::MessageAllocator< ::oteldemo::GetAverageProductReviewScoreRequest, ::oteldemo::GetAverageProductReviewScoreResponse>* allocator) { + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(1); + static_cast<::grpc::internal::CallbackUnaryHandler< ::oteldemo::GetAverageProductReviewScoreRequest, ::oteldemo::GetAverageProductReviewScoreResponse>*>(handler) + ->SetMessageAllocator(allocator); + } + ~WithCallbackMethod_GetAverageProductReviewScore() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status GetAverageProductReviewScore(::grpc::ServerContext* /*context*/, const ::oteldemo::GetAverageProductReviewScoreRequest* /*request*/, ::oteldemo::GetAverageProductReviewScoreResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* GetAverageProductReviewScore( + ::grpc::CallbackServerContext* /*context*/, const ::oteldemo::GetAverageProductReviewScoreRequest* /*request*/, ::oteldemo::GetAverageProductReviewScoreResponse* /*response*/) { return nullptr; } + }; + template + class WithCallbackMethod_AskProductAIAssistant : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithCallbackMethod_AskProductAIAssistant() { + ::grpc::Service::MarkMethodCallback(2, + new ::grpc::internal::CallbackUnaryHandler< ::oteldemo::AskProductAIAssistantRequest, ::oteldemo::AskProductAIAssistantResponse>( + [this]( + ::grpc::CallbackServerContext* context, const ::oteldemo::AskProductAIAssistantRequest* request, ::oteldemo::AskProductAIAssistantResponse* response) { return this->AskProductAIAssistant(context, request, response); }));} + void SetMessageAllocatorFor_AskProductAIAssistant( + ::grpc::MessageAllocator< ::oteldemo::AskProductAIAssistantRequest, ::oteldemo::AskProductAIAssistantResponse>* allocator) { + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(2); + static_cast<::grpc::internal::CallbackUnaryHandler< ::oteldemo::AskProductAIAssistantRequest, ::oteldemo::AskProductAIAssistantResponse>*>(handler) + ->SetMessageAllocator(allocator); + } + ~WithCallbackMethod_AskProductAIAssistant() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status AskProductAIAssistant(::grpc::ServerContext* /*context*/, const ::oteldemo::AskProductAIAssistantRequest* /*request*/, ::oteldemo::AskProductAIAssistantResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* AskProductAIAssistant( + ::grpc::CallbackServerContext* /*context*/, const ::oteldemo::AskProductAIAssistantRequest* /*request*/, ::oteldemo::AskProductAIAssistantResponse* /*response*/) { return nullptr; } + }; + typedef WithCallbackMethod_GetProductReviews > > CallbackService; + typedef CallbackService ExperimentalCallbackService; + template + class WithGenericMethod_GetProductReviews : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_GetProductReviews() { + ::grpc::Service::MarkMethodGeneric(0); + } + ~WithGenericMethod_GetProductReviews() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status GetProductReviews(::grpc::ServerContext* /*context*/, const ::oteldemo::GetProductReviewsRequest* /*request*/, ::oteldemo::GetProductReviewsResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_GetAverageProductReviewScore : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_GetAverageProductReviewScore() { + ::grpc::Service::MarkMethodGeneric(1); + } + ~WithGenericMethod_GetAverageProductReviewScore() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status GetAverageProductReviewScore(::grpc::ServerContext* /*context*/, const ::oteldemo::GetAverageProductReviewScoreRequest* /*request*/, ::oteldemo::GetAverageProductReviewScoreResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_AskProductAIAssistant : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_AskProductAIAssistant() { + ::grpc::Service::MarkMethodGeneric(2); + } + ~WithGenericMethod_AskProductAIAssistant() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status AskProductAIAssistant(::grpc::ServerContext* /*context*/, const ::oteldemo::AskProductAIAssistantRequest* /*request*/, ::oteldemo::AskProductAIAssistantResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithRawMethod_GetProductReviews : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_GetProductReviews() { + ::grpc::Service::MarkMethodRaw(0); + } + ~WithRawMethod_GetProductReviews() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status GetProductReviews(::grpc::ServerContext* /*context*/, const ::oteldemo::GetProductReviewsRequest* /*request*/, ::oteldemo::GetProductReviewsResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestGetProductReviews(::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_GetAverageProductReviewScore : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_GetAverageProductReviewScore() { + ::grpc::Service::MarkMethodRaw(1); + } + ~WithRawMethod_GetAverageProductReviewScore() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status GetAverageProductReviewScore(::grpc::ServerContext* /*context*/, const ::oteldemo::GetAverageProductReviewScoreRequest* /*request*/, ::oteldemo::GetAverageProductReviewScoreResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestGetAverageProductReviewScore(::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_AskProductAIAssistant : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_AskProductAIAssistant() { + ::grpc::Service::MarkMethodRaw(2); + } + ~WithRawMethod_AskProductAIAssistant() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status AskProductAIAssistant(::grpc::ServerContext* /*context*/, const ::oteldemo::AskProductAIAssistantRequest* /*request*/, ::oteldemo::AskProductAIAssistantResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestAskProductAIAssistant(::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_GetProductReviews : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawCallbackMethod_GetProductReviews() { + ::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->GetProductReviews(context, request, response); })); + } + ~WithRawCallbackMethod_GetProductReviews() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status GetProductReviews(::grpc::ServerContext* /*context*/, const ::oteldemo::GetProductReviewsRequest* /*request*/, ::oteldemo::GetProductReviewsResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* GetProductReviews( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } + }; + template + class WithRawCallbackMethod_GetAverageProductReviewScore : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawCallbackMethod_GetAverageProductReviewScore() { + ::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->GetAverageProductReviewScore(context, request, response); })); + } + ~WithRawCallbackMethod_GetAverageProductReviewScore() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status GetAverageProductReviewScore(::grpc::ServerContext* /*context*/, const ::oteldemo::GetAverageProductReviewScoreRequest* /*request*/, ::oteldemo::GetAverageProductReviewScoreResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* GetAverageProductReviewScore( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } + }; + template + class WithRawCallbackMethod_AskProductAIAssistant : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawCallbackMethod_AskProductAIAssistant() { + ::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->AskProductAIAssistant(context, request, response); })); + } + ~WithRawCallbackMethod_AskProductAIAssistant() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status AskProductAIAssistant(::grpc::ServerContext* /*context*/, const ::oteldemo::AskProductAIAssistantRequest* /*request*/, ::oteldemo::AskProductAIAssistantResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* AskProductAIAssistant( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } + }; + template + class WithStreamedUnaryMethod_GetProductReviews : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_GetProductReviews() { + ::grpc::Service::MarkMethodStreamed(0, + new ::grpc::internal::StreamedUnaryHandler< + ::oteldemo::GetProductReviewsRequest, ::oteldemo::GetProductReviewsResponse>( + [this](::grpc::ServerContext* context, + ::grpc::ServerUnaryStreamer< + ::oteldemo::GetProductReviewsRequest, ::oteldemo::GetProductReviewsResponse>* streamer) { + return this->StreamedGetProductReviews(context, + streamer); + })); + } + ~WithStreamedUnaryMethod_GetProductReviews() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status GetProductReviews(::grpc::ServerContext* /*context*/, const ::oteldemo::GetProductReviewsRequest* /*request*/, ::oteldemo::GetProductReviewsResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedGetProductReviews(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::oteldemo::GetProductReviewsRequest,::oteldemo::GetProductReviewsResponse>* server_unary_streamer) = 0; + }; + template + class WithStreamedUnaryMethod_GetAverageProductReviewScore : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_GetAverageProductReviewScore() { + ::grpc::Service::MarkMethodStreamed(1, + new ::grpc::internal::StreamedUnaryHandler< + ::oteldemo::GetAverageProductReviewScoreRequest, ::oteldemo::GetAverageProductReviewScoreResponse>( + [this](::grpc::ServerContext* context, + ::grpc::ServerUnaryStreamer< + ::oteldemo::GetAverageProductReviewScoreRequest, ::oteldemo::GetAverageProductReviewScoreResponse>* streamer) { + return this->StreamedGetAverageProductReviewScore(context, + streamer); + })); + } + ~WithStreamedUnaryMethod_GetAverageProductReviewScore() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status GetAverageProductReviewScore(::grpc::ServerContext* /*context*/, const ::oteldemo::GetAverageProductReviewScoreRequest* /*request*/, ::oteldemo::GetAverageProductReviewScoreResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedGetAverageProductReviewScore(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::oteldemo::GetAverageProductReviewScoreRequest,::oteldemo::GetAverageProductReviewScoreResponse>* server_unary_streamer) = 0; + }; + template + class WithStreamedUnaryMethod_AskProductAIAssistant : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_AskProductAIAssistant() { + ::grpc::Service::MarkMethodStreamed(2, + new ::grpc::internal::StreamedUnaryHandler< + ::oteldemo::AskProductAIAssistantRequest, ::oteldemo::AskProductAIAssistantResponse>( + [this](::grpc::ServerContext* context, + ::grpc::ServerUnaryStreamer< + ::oteldemo::AskProductAIAssistantRequest, ::oteldemo::AskProductAIAssistantResponse>* streamer) { + return this->StreamedAskProductAIAssistant(context, + streamer); + })); + } + ~WithStreamedUnaryMethod_AskProductAIAssistant() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status AskProductAIAssistant(::grpc::ServerContext* /*context*/, const ::oteldemo::AskProductAIAssistantRequest* /*request*/, ::oteldemo::AskProductAIAssistantResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedAskProductAIAssistant(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::oteldemo::AskProductAIAssistantRequest,::oteldemo::AskProductAIAssistantResponse>* server_unary_streamer) = 0; + }; + typedef WithStreamedUnaryMethod_GetProductReviews > > StreamedUnaryService; + typedef Service SplitStreamedService; + typedef WithStreamedUnaryMethod_GetProductReviews > > StreamedService; +}; + // ---------------Shipping Service---------- // class ShippingService final { diff --git a/src/currency/build/generated/proto/demo.pb.cc b/src/currency/build/generated/proto/demo.pb.cc index 3d81620f2f..27293660a6 100644 --- a/src/currency/build/generated/proto/demo.pb.cc +++ b/src/currency/build/generated/proto/demo.pb.cc @@ -273,6 +273,148 @@ struct SearchProductsResponseDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SearchProductsResponseDefaultTypeInternal _SearchProductsResponse_default_instance_; template +PROTOBUF_CONSTEXPR ProductReview::ProductReview(::_pbi::ConstantInitialized) + : _impl_{ + /*decltype(_impl_.username_)*/ { + &::_pbi::fixed_address_empty_string, + ::_pbi::ConstantInitialized{}, + }, + /*decltype(_impl_.description_)*/ { + &::_pbi::fixed_address_empty_string, + ::_pbi::ConstantInitialized{}, + }, + /*decltype(_impl_.score_)*/ { + &::_pbi::fixed_address_empty_string, + ::_pbi::ConstantInitialized{}, + }, + /*decltype(_impl_._cached_size_)*/ {}, + } {} +struct ProductReviewDefaultTypeInternal { + PROTOBUF_CONSTEXPR ProductReviewDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~ProductReviewDefaultTypeInternal() {} + union { + ProductReview _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ProductReviewDefaultTypeInternal _ProductReview_default_instance_; + template +PROTOBUF_CONSTEXPR GetProductReviewsRequest::GetProductReviewsRequest(::_pbi::ConstantInitialized) + : _impl_{ + /*decltype(_impl_.product_id_)*/ { + &::_pbi::fixed_address_empty_string, + ::_pbi::ConstantInitialized{}, + }, + /*decltype(_impl_._cached_size_)*/ {}, + } {} +struct GetProductReviewsRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR GetProductReviewsRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~GetProductReviewsRequestDefaultTypeInternal() {} + union { + GetProductReviewsRequest _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetProductReviewsRequestDefaultTypeInternal _GetProductReviewsRequest_default_instance_; + template +PROTOBUF_CONSTEXPR GetProductReviewsResponse::GetProductReviewsResponse(::_pbi::ConstantInitialized) + : _impl_{ + /*decltype(_impl_.product_reviews_)*/ {}, + /*decltype(_impl_._cached_size_)*/ {}, + } {} +struct GetProductReviewsResponseDefaultTypeInternal { + PROTOBUF_CONSTEXPR GetProductReviewsResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~GetProductReviewsResponseDefaultTypeInternal() {} + union { + GetProductReviewsResponse _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetProductReviewsResponseDefaultTypeInternal _GetProductReviewsResponse_default_instance_; + template +PROTOBUF_CONSTEXPR GetAverageProductReviewScoreRequest::GetAverageProductReviewScoreRequest(::_pbi::ConstantInitialized) + : _impl_{ + /*decltype(_impl_.product_id_)*/ { + &::_pbi::fixed_address_empty_string, + ::_pbi::ConstantInitialized{}, + }, + /*decltype(_impl_._cached_size_)*/ {}, + } {} +struct GetAverageProductReviewScoreRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR GetAverageProductReviewScoreRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~GetAverageProductReviewScoreRequestDefaultTypeInternal() {} + union { + GetAverageProductReviewScoreRequest _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetAverageProductReviewScoreRequestDefaultTypeInternal _GetAverageProductReviewScoreRequest_default_instance_; + template +PROTOBUF_CONSTEXPR GetAverageProductReviewScoreResponse::GetAverageProductReviewScoreResponse(::_pbi::ConstantInitialized) + : _impl_{ + /*decltype(_impl_.average_score_)*/ { + &::_pbi::fixed_address_empty_string, + ::_pbi::ConstantInitialized{}, + }, + /*decltype(_impl_._cached_size_)*/ {}, + } {} +struct GetAverageProductReviewScoreResponseDefaultTypeInternal { + PROTOBUF_CONSTEXPR GetAverageProductReviewScoreResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~GetAverageProductReviewScoreResponseDefaultTypeInternal() {} + union { + GetAverageProductReviewScoreResponse _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetAverageProductReviewScoreResponseDefaultTypeInternal _GetAverageProductReviewScoreResponse_default_instance_; + template +PROTOBUF_CONSTEXPR AskProductAIAssistantRequest::AskProductAIAssistantRequest(::_pbi::ConstantInitialized) + : _impl_{ + /*decltype(_impl_.product_id_)*/ { + &::_pbi::fixed_address_empty_string, + ::_pbi::ConstantInitialized{}, + }, + /*decltype(_impl_.question_)*/ { + &::_pbi::fixed_address_empty_string, + ::_pbi::ConstantInitialized{}, + }, + /*decltype(_impl_._cached_size_)*/ {}, + } {} +struct AskProductAIAssistantRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR AskProductAIAssistantRequestDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~AskProductAIAssistantRequestDefaultTypeInternal() {} + union { + AskProductAIAssistantRequest _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 AskProductAIAssistantRequestDefaultTypeInternal _AskProductAIAssistantRequest_default_instance_; + template +PROTOBUF_CONSTEXPR AskProductAIAssistantResponse::AskProductAIAssistantResponse(::_pbi::ConstantInitialized) + : _impl_{ + /*decltype(_impl_.response_)*/ { + &::_pbi::fixed_address_empty_string, + ::_pbi::ConstantInitialized{}, + }, + /*decltype(_impl_._cached_size_)*/ {}, + } {} +struct AskProductAIAssistantResponseDefaultTypeInternal { + PROTOBUF_CONSTEXPR AskProductAIAssistantResponseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~AskProductAIAssistantResponseDefaultTypeInternal() {} + union { + AskProductAIAssistantResponse _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 AskProductAIAssistantResponseDefaultTypeInternal _AskProductAIAssistantResponse_default_instance_; + template PROTOBUF_CONSTEXPR GetQuoteRequest::GetQuoteRequest(::_pbi::ConstantInitialized) : _impl_{ /*decltype(_impl_._has_bits_)*/ {}, @@ -857,7 +999,7 @@ struct DeleteFlagResponseDefaultTypeInternal { PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DeleteFlagResponseDefaultTypeInternal _DeleteFlagResponse_default_instance_; } // namespace oteldemo -static ::_pb::Metadata file_level_metadata_demo_2eproto[43]; +static ::_pb::Metadata file_level_metadata_demo_2eproto[50]; static constexpr const ::_pb::EnumDescriptor** file_level_enum_descriptors_demo_2eproto = nullptr; static constexpr const ::_pb::ServiceDescriptor** @@ -997,6 +1139,72 @@ const ::uint32_t TableStruct_demo_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE( ~0u, // no _split_ ~0u, // no sizeof(Split) PROTOBUF_FIELD_OFFSET(::oteldemo::SearchProductsResponse, _impl_.results_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::oteldemo::ProductReview, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _split_ + ~0u, // no sizeof(Split) + PROTOBUF_FIELD_OFFSET(::oteldemo::ProductReview, _impl_.username_), + PROTOBUF_FIELD_OFFSET(::oteldemo::ProductReview, _impl_.description_), + PROTOBUF_FIELD_OFFSET(::oteldemo::ProductReview, _impl_.score_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::oteldemo::GetProductReviewsRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _split_ + ~0u, // no sizeof(Split) + PROTOBUF_FIELD_OFFSET(::oteldemo::GetProductReviewsRequest, _impl_.product_id_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::oteldemo::GetProductReviewsResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _split_ + ~0u, // no sizeof(Split) + PROTOBUF_FIELD_OFFSET(::oteldemo::GetProductReviewsResponse, _impl_.product_reviews_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::oteldemo::GetAverageProductReviewScoreRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _split_ + ~0u, // no sizeof(Split) + PROTOBUF_FIELD_OFFSET(::oteldemo::GetAverageProductReviewScoreRequest, _impl_.product_id_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::oteldemo::GetAverageProductReviewScoreResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _split_ + ~0u, // no sizeof(Split) + PROTOBUF_FIELD_OFFSET(::oteldemo::GetAverageProductReviewScoreResponse, _impl_.average_score_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::oteldemo::AskProductAIAssistantRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _split_ + ~0u, // no sizeof(Split) + PROTOBUF_FIELD_OFFSET(::oteldemo::AskProductAIAssistantRequest, _impl_.product_id_), + PROTOBUF_FIELD_OFFSET(::oteldemo::AskProductAIAssistantRequest, _impl_.question_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::oteldemo::AskProductAIAssistantResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _split_ + ~0u, // no sizeof(Split) + PROTOBUF_FIELD_OFFSET(::oteldemo::AskProductAIAssistantResponse, _impl_.response_), PROTOBUF_FIELD_OFFSET(::oteldemo::GetQuoteRequest, _impl_._has_bits_), PROTOBUF_FIELD_OFFSET(::oteldemo::GetQuoteRequest, _internal_metadata_), ~0u, // no _extensions_ @@ -1336,36 +1544,43 @@ static const ::_pbi::MigrationSchema {106, -1, -1, sizeof(::oteldemo::GetProductRequest)}, {115, -1, -1, sizeof(::oteldemo::SearchProductsRequest)}, {124, -1, -1, sizeof(::oteldemo::SearchProductsResponse)}, - {133, 143, -1, sizeof(::oteldemo::GetQuoteRequest)}, - {145, 154, -1, sizeof(::oteldemo::GetQuoteResponse)}, - {155, 165, -1, sizeof(::oteldemo::ShipOrderRequest)}, - {167, -1, -1, sizeof(::oteldemo::ShipOrderResponse)}, - {176, -1, -1, sizeof(::oteldemo::Address)}, - {189, -1, -1, sizeof(::oteldemo::Money)}, - {200, -1, -1, sizeof(::oteldemo::GetSupportedCurrenciesResponse)}, - {209, 219, -1, sizeof(::oteldemo::CurrencyConversionRequest)}, - {221, -1, -1, sizeof(::oteldemo::CreditCardInfo)}, - {233, 243, -1, sizeof(::oteldemo::ChargeRequest)}, - {245, -1, -1, sizeof(::oteldemo::ChargeResponse)}, - {254, 264, -1, sizeof(::oteldemo::OrderItem)}, - {266, 279, -1, sizeof(::oteldemo::OrderResult)}, - {284, 294, -1, sizeof(::oteldemo::SendOrderConfirmationRequest)}, - {296, 309, -1, sizeof(::oteldemo::PlaceOrderRequest)}, - {314, 323, -1, sizeof(::oteldemo::PlaceOrderResponse)}, - {324, -1, -1, sizeof(::oteldemo::AdRequest)}, - {333, -1, -1, sizeof(::oteldemo::AdResponse)}, - {342, -1, -1, sizeof(::oteldemo::Ad)}, - {352, -1, -1, sizeof(::oteldemo::Flag)}, - {363, -1, -1, sizeof(::oteldemo::GetFlagRequest)}, - {372, 381, -1, sizeof(::oteldemo::GetFlagResponse)}, - {382, -1, -1, sizeof(::oteldemo::CreateFlagRequest)}, - {393, 402, -1, sizeof(::oteldemo::CreateFlagResponse)}, - {403, -1, -1, sizeof(::oteldemo::UpdateFlagRequest)}, - {413, -1, -1, sizeof(::oteldemo::UpdateFlagResponse)}, - {421, -1, -1, sizeof(::oteldemo::ListFlagsRequest)}, - {429, -1, -1, sizeof(::oteldemo::ListFlagsResponse)}, - {438, -1, -1, sizeof(::oteldemo::DeleteFlagRequest)}, - {447, -1, -1, sizeof(::oteldemo::DeleteFlagResponse)}, + {133, -1, -1, sizeof(::oteldemo::ProductReview)}, + {144, -1, -1, sizeof(::oteldemo::GetProductReviewsRequest)}, + {153, -1, -1, sizeof(::oteldemo::GetProductReviewsResponse)}, + {162, -1, -1, sizeof(::oteldemo::GetAverageProductReviewScoreRequest)}, + {171, -1, -1, sizeof(::oteldemo::GetAverageProductReviewScoreResponse)}, + {180, -1, -1, sizeof(::oteldemo::AskProductAIAssistantRequest)}, + {190, -1, -1, sizeof(::oteldemo::AskProductAIAssistantResponse)}, + {199, 209, -1, sizeof(::oteldemo::GetQuoteRequest)}, + {211, 220, -1, sizeof(::oteldemo::GetQuoteResponse)}, + {221, 231, -1, sizeof(::oteldemo::ShipOrderRequest)}, + {233, -1, -1, sizeof(::oteldemo::ShipOrderResponse)}, + {242, -1, -1, sizeof(::oteldemo::Address)}, + {255, -1, -1, sizeof(::oteldemo::Money)}, + {266, -1, -1, sizeof(::oteldemo::GetSupportedCurrenciesResponse)}, + {275, 285, -1, sizeof(::oteldemo::CurrencyConversionRequest)}, + {287, -1, -1, sizeof(::oteldemo::CreditCardInfo)}, + {299, 309, -1, sizeof(::oteldemo::ChargeRequest)}, + {311, -1, -1, sizeof(::oteldemo::ChargeResponse)}, + {320, 330, -1, sizeof(::oteldemo::OrderItem)}, + {332, 345, -1, sizeof(::oteldemo::OrderResult)}, + {350, 360, -1, sizeof(::oteldemo::SendOrderConfirmationRequest)}, + {362, 375, -1, sizeof(::oteldemo::PlaceOrderRequest)}, + {380, 389, -1, sizeof(::oteldemo::PlaceOrderResponse)}, + {390, -1, -1, sizeof(::oteldemo::AdRequest)}, + {399, -1, -1, sizeof(::oteldemo::AdResponse)}, + {408, -1, -1, sizeof(::oteldemo::Ad)}, + {418, -1, -1, sizeof(::oteldemo::Flag)}, + {429, -1, -1, sizeof(::oteldemo::GetFlagRequest)}, + {438, 447, -1, sizeof(::oteldemo::GetFlagResponse)}, + {448, -1, -1, sizeof(::oteldemo::CreateFlagRequest)}, + {459, 468, -1, sizeof(::oteldemo::CreateFlagResponse)}, + {469, -1, -1, sizeof(::oteldemo::UpdateFlagRequest)}, + {479, -1, -1, sizeof(::oteldemo::UpdateFlagResponse)}, + {487, -1, -1, sizeof(::oteldemo::ListFlagsRequest)}, + {495, -1, -1, sizeof(::oteldemo::ListFlagsResponse)}, + {504, -1, -1, sizeof(::oteldemo::DeleteFlagRequest)}, + {513, -1, -1, sizeof(::oteldemo::DeleteFlagResponse)}, }; static const ::_pb::Message* const file_default_instances[] = { @@ -1382,6 +1597,13 @@ static const ::_pb::Message* const file_default_instances[] = { &::oteldemo::_GetProductRequest_default_instance_._instance, &::oteldemo::_SearchProductsRequest_default_instance_._instance, &::oteldemo::_SearchProductsResponse_default_instance_._instance, + &::oteldemo::_ProductReview_default_instance_._instance, + &::oteldemo::_GetProductReviewsRequest_default_instance_._instance, + &::oteldemo::_GetProductReviewsResponse_default_instance_._instance, + &::oteldemo::_GetAverageProductReviewScoreRequest_default_instance_._instance, + &::oteldemo::_GetAverageProductReviewScoreResponse_default_instance_._instance, + &::oteldemo::_AskProductAIAssistantRequest_default_instance_._instance, + &::oteldemo::_AskProductAIAssistantResponse_default_instance_._instance, &::oteldemo::_GetQuoteRequest_default_instance_._instance, &::oteldemo::_GetQuoteResponse_default_instance_._instance, &::oteldemo::_ShipOrderRequest_default_instance_._instance, @@ -1432,110 +1654,130 @@ const char descriptor_table_protodef_demo_2eproto[] PROTOBUF_SECTION_VARIABLE(pr "etProductRequest\022\n\n\002id\030\001 \001(\t\"&\n\025SearchPr" "oductsRequest\022\r\n\005query\030\001 \001(\t\"<\n\026SearchPr" "oductsResponse\022\"\n\007results\030\001 \003(\0132\021.otelde" - "mo.Product\"X\n\017GetQuoteRequest\022\"\n\007address" - "\030\001 \001(\0132\021.oteldemo.Address\022!\n\005items\030\002 \003(\013" - "2\022.oteldemo.CartItem\"5\n\020GetQuoteResponse" - "\022!\n\010cost_usd\030\001 \001(\0132\017.oteldemo.Money\"Y\n\020S" - "hipOrderRequest\022\"\n\007address\030\001 \001(\0132\021.oteld" - "emo.Address\022!\n\005items\030\002 \003(\0132\022.oteldemo.Ca" - "rtItem\"(\n\021ShipOrderResponse\022\023\n\013tracking_" - "id\030\001 \001(\t\"a\n\007Address\022\026\n\016street_address\030\001 " - "\001(\t\022\014\n\004city\030\002 \001(\t\022\r\n\005state\030\003 \001(\t\022\017\n\007coun" - "try\030\004 \001(\t\022\020\n\010zip_code\030\005 \001(\t\"<\n\005Money\022\025\n\r" - "currency_code\030\001 \001(\t\022\r\n\005units\030\002 \001(\003\022\r\n\005na" - "nos\030\003 \001(\005\"8\n\036GetSupportedCurrenciesRespo" - "nse\022\026\n\016currency_codes\030\001 \003(\t\"K\n\031CurrencyC" - "onversionRequest\022\035\n\004from\030\001 \001(\0132\017.oteldem" - "o.Money\022\017\n\007to_code\030\002 \001(\t\"\220\001\n\016CreditCardI" - "nfo\022\032\n\022credit_card_number\030\001 \001(\t\022\027\n\017credi" - "t_card_cvv\030\002 \001(\005\022#\n\033credit_card_expirati" - "on_year\030\003 \001(\005\022$\n\034credit_card_expiration_" - "month\030\004 \001(\005\"_\n\rChargeRequest\022\037\n\006amount\030\001" - " \001(\0132\017.oteldemo.Money\022-\n\013credit_card\030\002 \001" - "(\0132\030.oteldemo.CreditCardInfo\"(\n\016ChargeRe" - "sponse\022\026\n\016transaction_id\030\001 \001(\t\"L\n\tOrderI" - "tem\022 \n\004item\030\001 \001(\0132\022.oteldemo.CartItem\022\035\n" - "\004cost\030\002 \001(\0132\017.oteldemo.Money\"\266\001\n\013OrderRe" - "sult\022\020\n\010order_id\030\001 \001(\t\022\034\n\024shipping_track" - "ing_id\030\002 \001(\t\022&\n\rshipping_cost\030\003 \001(\0132\017.ot" - "eldemo.Money\022+\n\020shipping_address\030\004 \001(\0132\021" - ".oteldemo.Address\022\"\n\005items\030\005 \003(\0132\023.oteld" - "emo.OrderItem\"S\n\034SendOrderConfirmationRe" - "quest\022\r\n\005email\030\001 \001(\t\022$\n\005order\030\002 \001(\0132\025.ot" - "eldemo.OrderResult\"\235\001\n\021PlaceOrderRequest" - "\022\017\n\007user_id\030\001 \001(\t\022\025\n\ruser_currency\030\002 \001(\t" - "\022\"\n\007address\030\003 \001(\0132\021.oteldemo.Address\022\r\n\005" - "email\030\005 \001(\t\022-\n\013credit_card\030\006 \001(\0132\030.oteld" - "emo.CreditCardInfo\":\n\022PlaceOrderResponse" - "\022$\n\005order\030\001 \001(\0132\025.oteldemo.OrderResult\"!" - "\n\tAdRequest\022\024\n\014context_keys\030\001 \003(\t\"\'\n\nAdR" - "esponse\022\031\n\003ads\030\001 \003(\0132\014.oteldemo.Ad\"(\n\002Ad" - "\022\024\n\014redirect_url\030\001 \001(\t\022\014\n\004text\030\002 \001(\t\":\n\004" - "Flag\022\014\n\004name\030\001 \001(\t\022\023\n\013description\030\002 \001(\t\022" - "\017\n\007enabled\030\003 \001(\010\"\036\n\016GetFlagRequest\022\014\n\004na" - "me\030\001 \001(\t\"/\n\017GetFlagResponse\022\034\n\004flag\030\001 \001(" - "\0132\016.oteldemo.Flag\"G\n\021CreateFlagRequest\022\014" - "\n\004name\030\001 \001(\t\022\023\n\013description\030\002 \001(\t\022\017\n\007ena" - "bled\030\003 \001(\010\"2\n\022CreateFlagResponse\022\034\n\004flag" - "\030\001 \001(\0132\016.oteldemo.Flag\"2\n\021UpdateFlagRequ" - "est\022\014\n\004name\030\001 \001(\t\022\017\n\007enabled\030\002 \001(\010\"\024\n\022Up" - "dateFlagResponse\"\022\n\020ListFlagsRequest\"1\n\021" - "ListFlagsResponse\022\034\n\004flag\030\001 \003(\0132\016.otelde" - "mo.Flag\"!\n\021DeleteFlagRequest\022\014\n\004name\030\001 \001" - "(\t\"\024\n\022DeleteFlagResponse2\270\001\n\013CartService" - "\0226\n\007AddItem\022\030.oteldemo.AddItemRequest\032\017." - "oteldemo.Empty\"\000\0225\n\007GetCart\022\030.oteldemo.G" - "etCartRequest\032\016.oteldemo.Cart\"\000\022:\n\tEmpty" - "Cart\022\032.oteldemo.EmptyCartRequest\032\017.oteld" - "emo.Empty\"\0002}\n\025RecommendationService\022d\n\023" - "ListRecommendations\022$.oteldemo.ListRecom" - "mendationsRequest\032%.oteldemo.ListRecomme" - "ndationsResponse\"\0002\361\001\n\025ProductCatalogSer" - "vice\022A\n\014ListProducts\022\017.oteldemo.Empty\032\036." - "oteldemo.ListProductsResponse\"\000\022>\n\nGetPr" - "oduct\022\033.oteldemo.GetProductRequest\032\021.ote" - "ldemo.Product\"\000\022U\n\016SearchProducts\022\037.otel" - "demo.SearchProductsRequest\032 .oteldemo.Se" - "archProductsResponse\"\0002\236\001\n\017ShippingServi" - "ce\022C\n\010GetQuote\022\031.oteldemo.GetQuoteReques" - "t\032\032.oteldemo.GetQuoteResponse\"\000\022F\n\tShipO" - "rder\022\032.oteldemo.ShipOrderRequest\032\033.oteld" - "emo.ShipOrderResponse\"\0002\253\001\n\017CurrencyServ" - "ice\022U\n\026GetSupportedCurrencies\022\017.oteldemo" - ".Empty\032(.oteldemo.GetSupportedCurrencies" - "Response\"\000\022A\n\007Convert\022#.oteldemo.Currenc" - "yConversionRequest\032\017.oteldemo.Money\"\0002O\n" - "\016PaymentService\022=\n\006Charge\022\027.oteldemo.Cha" - "rgeRequest\032\030.oteldemo.ChargeResponse\"\0002b" - "\n\014EmailService\022R\n\025SendOrderConfirmation\022" - "&.oteldemo.SendOrderConfirmationRequest\032" - "\017.oteldemo.Empty\"\0002\\\n\017CheckoutService\022I\n" - "\nPlaceOrder\022\033.oteldemo.PlaceOrderRequest" - "\032\034.oteldemo.PlaceOrderResponse\"\0002B\n\tAdSe" - "rvice\0225\n\006GetAds\022\023.oteldemo.AdRequest\032\024.o" - "teldemo.AdResponse\"\0002\377\002\n\022FeatureFlagServ" - "ice\022@\n\007GetFlag\022\030.oteldemo.GetFlagRequest" - "\032\031.oteldemo.GetFlagResponse\"\000\022I\n\nCreateF" - "lag\022\033.oteldemo.CreateFlagRequest\032\034.oteld" - "emo.CreateFlagResponse\"\000\022I\n\nUpdateFlag\022\033" - ".oteldemo.UpdateFlagRequest\032\034.oteldemo.U" - "pdateFlagResponse\"\000\022F\n\tListFlags\022\032.oteld" - "emo.ListFlagsRequest\032\033.oteldemo.ListFlag" - "sResponse\"\000\022I\n\nDeleteFlag\022\033.oteldemo.Del" - "eteFlagRequest\032\034.oteldemo.DeleteFlagResp" - "onse\"\000B\023Z\021genproto/oteldemob\006proto3" + "mo.Product\"E\n\rProductReview\022\020\n\010username\030" + "\001 \001(\t\022\023\n\013description\030\002 \001(\t\022\r\n\005score\030\003 \001(" + "\t\".\n\030GetProductReviewsRequest\022\022\n\nproduct" + "_id\030\001 \001(\t\"M\n\031GetProductReviewsResponse\0220" + "\n\017product_reviews\030\001 \003(\0132\027.oteldemo.Produ" + "ctReview\"9\n#GetAverageProductReviewScore" + "Request\022\022\n\nproduct_id\030\001 \001(\t\"=\n$GetAverag" + "eProductReviewScoreResponse\022\025\n\raverage_s" + "core\030\001 \001(\t\"D\n\034AskProductAIAssistantReque" + "st\022\022\n\nproduct_id\030\001 \001(\t\022\020\n\010question\030\002 \001(\t" + "\"1\n\035AskProductAIAssistantResponse\022\020\n\010res" + "ponse\030\001 \001(\t\"X\n\017GetQuoteRequest\022\"\n\007addres" + "s\030\001 \001(\0132\021.oteldemo.Address\022!\n\005items\030\002 \003(" + "\0132\022.oteldemo.CartItem\"5\n\020GetQuoteRespons" + "e\022!\n\010cost_usd\030\001 \001(\0132\017.oteldemo.Money\"Y\n\020" + "ShipOrderRequest\022\"\n\007address\030\001 \001(\0132\021.otel" + "demo.Address\022!\n\005items\030\002 \003(\0132\022.oteldemo.C" + "artItem\"(\n\021ShipOrderResponse\022\023\n\013tracking" + "_id\030\001 \001(\t\"a\n\007Address\022\026\n\016street_address\030\001" + " \001(\t\022\014\n\004city\030\002 \001(\t\022\r\n\005state\030\003 \001(\t\022\017\n\007cou" + "ntry\030\004 \001(\t\022\020\n\010zip_code\030\005 \001(\t\"<\n\005Money\022\025\n" + "\rcurrency_code\030\001 \001(\t\022\r\n\005units\030\002 \001(\003\022\r\n\005n" + "anos\030\003 \001(\005\"8\n\036GetSupportedCurrenciesResp" + "onse\022\026\n\016currency_codes\030\001 \003(\t\"K\n\031Currency" + "ConversionRequest\022\035\n\004from\030\001 \001(\0132\017.otelde" + "mo.Money\022\017\n\007to_code\030\002 \001(\t\"\220\001\n\016CreditCard" + "Info\022\032\n\022credit_card_number\030\001 \001(\t\022\027\n\017cred" + "it_card_cvv\030\002 \001(\005\022#\n\033credit_card_expirat" + "ion_year\030\003 \001(\005\022$\n\034credit_card_expiration" + "_month\030\004 \001(\005\"_\n\rChargeRequest\022\037\n\006amount\030" + "\001 \001(\0132\017.oteldemo.Money\022-\n\013credit_card\030\002 " + "\001(\0132\030.oteldemo.CreditCardInfo\"(\n\016ChargeR" + "esponse\022\026\n\016transaction_id\030\001 \001(\t\"L\n\tOrder" + "Item\022 \n\004item\030\001 \001(\0132\022.oteldemo.CartItem\022\035" + "\n\004cost\030\002 \001(\0132\017.oteldemo.Money\"\266\001\n\013OrderR" + "esult\022\020\n\010order_id\030\001 \001(\t\022\034\n\024shipping_trac" + "king_id\030\002 \001(\t\022&\n\rshipping_cost\030\003 \001(\0132\017.o" + "teldemo.Money\022+\n\020shipping_address\030\004 \001(\0132" + "\021.oteldemo.Address\022\"\n\005items\030\005 \003(\0132\023.otel" + "demo.OrderItem\"S\n\034SendOrderConfirmationR" + "equest\022\r\n\005email\030\001 \001(\t\022$\n\005order\030\002 \001(\0132\025.o" + "teldemo.OrderResult\"\235\001\n\021PlaceOrderReques" + "t\022\017\n\007user_id\030\001 \001(\t\022\025\n\ruser_currency\030\002 \001(" + "\t\022\"\n\007address\030\003 \001(\0132\021.oteldemo.Address\022\r\n" + "\005email\030\005 \001(\t\022-\n\013credit_card\030\006 \001(\0132\030.otel" + "demo.CreditCardInfo\":\n\022PlaceOrderRespons" + "e\022$\n\005order\030\001 \001(\0132\025.oteldemo.OrderResult\"" + "!\n\tAdRequest\022\024\n\014context_keys\030\001 \003(\t\"\'\n\nAd" + "Response\022\031\n\003ads\030\001 \003(\0132\014.oteldemo.Ad\"(\n\002A" + "d\022\024\n\014redirect_url\030\001 \001(\t\022\014\n\004text\030\002 \001(\t\":\n" + "\004Flag\022\014\n\004name\030\001 \001(\t\022\023\n\013description\030\002 \001(\t" + "\022\017\n\007enabled\030\003 \001(\010\"\036\n\016GetFlagRequest\022\014\n\004n" + "ame\030\001 \001(\t\"/\n\017GetFlagResponse\022\034\n\004flag\030\001 \001" + "(\0132\016.oteldemo.Flag\"G\n\021CreateFlagRequest\022" + "\014\n\004name\030\001 \001(\t\022\023\n\013description\030\002 \001(\t\022\017\n\007en" + "abled\030\003 \001(\010\"2\n\022CreateFlagResponse\022\034\n\004fla" + "g\030\001 \001(\0132\016.oteldemo.Flag\"2\n\021UpdateFlagReq" + "uest\022\014\n\004name\030\001 \001(\t\022\017\n\007enabled\030\002 \001(\010\"\024\n\022U" + "pdateFlagResponse\"\022\n\020ListFlagsRequest\"1\n" + "\021ListFlagsResponse\022\034\n\004flag\030\001 \003(\0132\016.oteld" + "emo.Flag\"!\n\021DeleteFlagRequest\022\014\n\004name\030\001 " + "\001(\t\"\024\n\022DeleteFlagResponse2\270\001\n\013CartServic" + "e\0226\n\007AddItem\022\030.oteldemo.AddItemRequest\032\017" + ".oteldemo.Empty\"\000\0225\n\007GetCart\022\030.oteldemo." + "GetCartRequest\032\016.oteldemo.Cart\"\000\022:\n\tEmpt" + "yCart\022\032.oteldemo.EmptyCartRequest\032\017.otel" + "demo.Empty\"\0002}\n\025RecommendationService\022d\n" + "\023ListRecommendations\022$.oteldemo.ListReco" + "mmendationsRequest\032%.oteldemo.ListRecomm" + "endationsResponse\"\0002\361\001\n\025ProductCatalogSe" + "rvice\022A\n\014ListProducts\022\017.oteldemo.Empty\032\036" + ".oteldemo.ListProductsResponse\"\000\022>\n\nGetP" + "roduct\022\033.oteldemo.GetProductRequest\032\021.ot" + "eldemo.Product\"\000\022U\n\016SearchProducts\022\037.ote" + "ldemo.SearchProductsRequest\032 .oteldemo.S" + "earchProductsResponse\"\0002\343\002\n\024ProductRevie" + "wService\022^\n\021GetProductReviews\022\".oteldemo" + ".GetProductReviewsRequest\032#.oteldemo.Get" + "ProductReviewsResponse\"\000\022\177\n\034GetAveragePr" + "oductReviewScore\022-.oteldemo.GetAveragePr" + "oductReviewScoreRequest\032..oteldemo.GetAv" + "erageProductReviewScoreResponse\"\000\022j\n\025Ask" + "ProductAIAssistant\022&.oteldemo.AskProduct" + "AIAssistantRequest\032\'.oteldemo.AskProduct" + "AIAssistantResponse\"\0002\236\001\n\017ShippingServic" + "e\022C\n\010GetQuote\022\031.oteldemo.GetQuoteRequest" + "\032\032.oteldemo.GetQuoteResponse\"\000\022F\n\tShipOr" + "der\022\032.oteldemo.ShipOrderRequest\032\033.otelde" + "mo.ShipOrderResponse\"\0002\253\001\n\017CurrencyServi" + "ce\022U\n\026GetSupportedCurrencies\022\017.oteldemo." + "Empty\032(.oteldemo.GetSupportedCurrenciesR" + "esponse\"\000\022A\n\007Convert\022#.oteldemo.Currency" + "ConversionRequest\032\017.oteldemo.Money\"\0002O\n\016" + "PaymentService\022=\n\006Charge\022\027.oteldemo.Char" + "geRequest\032\030.oteldemo.ChargeResponse\"\0002b\n" + "\014EmailService\022R\n\025SendOrderConfirmation\022&" + ".oteldemo.SendOrderConfirmationRequest\032\017" + ".oteldemo.Empty\"\0002\\\n\017CheckoutService\022I\n\n" + "PlaceOrder\022\033.oteldemo.PlaceOrderRequest\032" + "\034.oteldemo.PlaceOrderResponse\"\0002B\n\tAdSer" + "vice\0225\n\006GetAds\022\023.oteldemo.AdRequest\032\024.ot" + "eldemo.AdResponse\"\0002\377\002\n\022FeatureFlagServi" + "ce\022@\n\007GetFlag\022\030.oteldemo.GetFlagRequest\032" + "\031.oteldemo.GetFlagResponse\"\000\022I\n\nCreateFl" + "ag\022\033.oteldemo.CreateFlagRequest\032\034.otelde" + "mo.CreateFlagResponse\"\000\022I\n\nUpdateFlag\022\033." + "oteldemo.UpdateFlagRequest\032\034.oteldemo.Up" + "dateFlagResponse\"\000\022F\n\tListFlags\022\032.otelde" + "mo.ListFlagsRequest\032\033.oteldemo.ListFlags" + "Response\"\000\022I\n\nDeleteFlag\022\033.oteldemo.Dele" + "teFlagRequest\032\034.oteldemo.DeleteFlagRespo" + "nse\"\000B\023Z\021genproto/oteldemob\006proto3" }; static ::absl::once_flag descriptor_table_demo_2eproto_once; const ::_pbi::DescriptorTable descriptor_table_demo_2eproto = { false, false, - 4395, + 5194, descriptor_table_protodef_demo_2eproto, "demo.proto", &descriptor_table_demo_2eproto_once, nullptr, 0, - 43, + 50, schemas, file_default_instances, TableStruct_demo_2eproto::offsets, @@ -3781,102 +4023,1499 @@ void GetProductRequest::MergeImpl(::google::protobuf::Message& to_msg, const ::g ::uint32_t cached_has_bits = 0; (void) cached_has_bits; - if (!from._internal_id().empty()) { - _this->_internal_set_id(from._internal_id()); + if (!from._internal_id().empty()) { + _this->_internal_set_id(from._internal_id()); + } + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); +} + +void GetProductRequest::CopyFrom(const GetProductRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:oteldemo.GetProductRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +PROTOBUF_NOINLINE bool GetProductRequest::IsInitialized() const { + return true; +} + +void GetProductRequest::InternalSwap(GetProductRequest* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.id_, lhs_arena, + &other->_impl_.id_, rhs_arena); +} + +::google::protobuf::Metadata GetProductRequest::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_demo_2eproto_getter, &descriptor_table_demo_2eproto_once, + file_level_metadata_demo_2eproto[10]); +} +// =================================================================== + +class SearchProductsRequest::_Internal { + public: +}; + +SearchProductsRequest::SearchProductsRequest(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(arena) { + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:oteldemo.SearchProductsRequest) +} +SearchProductsRequest::SearchProductsRequest(const SearchProductsRequest& from) : ::google::protobuf::Message() { + SearchProductsRequest* const _this = this; + (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.query_){}, + /*decltype(_impl_._cached_size_)*/ {}, + }; + _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); + _impl_.query_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.query_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_query().empty()) { + _this->_impl_.query_.Set(from._internal_query(), _this->GetArenaForAllocation()); + } + + // @@protoc_insertion_point(copy_constructor:oteldemo.SearchProductsRequest) +} +inline void SearchProductsRequest::SharedCtor(::_pb::Arena* arena) { + (void)arena; + new (&_impl_) Impl_{ + decltype(_impl_.query_){}, + /*decltype(_impl_._cached_size_)*/ {}, + }; + _impl_.query_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.query_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} +SearchProductsRequest::~SearchProductsRequest() { + // @@protoc_insertion_point(destructor:oteldemo.SearchProductsRequest) + _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); + SharedDtor(); +} +inline void SearchProductsRequest::SharedDtor() { + ABSL_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.query_.Destroy(); +} +void SearchProductsRequest::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +PROTOBUF_NOINLINE void SearchProductsRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:oteldemo.SearchProductsRequest) + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.query_.ClearToEmpty(); + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +const char* SearchProductsRequest::_InternalParse( + const char* ptr, ::_pbi::ParseContext* ctx) { + ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header); + return ptr; +} + + +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<0, 1, 0, 44, 2> SearchProductsRequest::_table_ = { + { + 0, // no _has_bits_ + 0, // no _extensions_ + 1, 0, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967294, // skipmap + offsetof(decltype(_table_), field_entries), + 1, // num_field_entries + 0, // num_aux_entries + offsetof(decltype(_table_), field_names), // no aux_entries + &_SearchProductsRequest_default_instance_._instance, + ::_pbi::TcParser::GenericFallback, // fallback + }, {{ + // string query = 1; + {::_pbi::TcParser::FastUS1, + {10, 63, 0, PROTOBUF_FIELD_OFFSET(SearchProductsRequest, _impl_.query_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // string query = 1; + {PROTOBUF_FIELD_OFFSET(SearchProductsRequest, _impl_.query_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)}, + }}, + // no aux_entries + {{ + "\36\5\0\0\0\0\0\0" + "oteldemo.SearchProductsRequest" + "query" + }}, +}; + +::uint8_t* SearchProductsRequest::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:oteldemo.SearchProductsRequest) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + // string query = 1; + if (!this->_internal_query().empty()) { + const std::string& _s = this->_internal_query(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "oteldemo.SearchProductsRequest.query"); + target = stream->WriteStringMaybeAliased(1, _s, target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:oteldemo.SearchProductsRequest) + return target; +} + +::size_t SearchProductsRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:oteldemo.SearchProductsRequest) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // string query = 1; + if (!this->_internal_query().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this->_internal_query()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::google::protobuf::Message::ClassData SearchProductsRequest::_class_data_ = { + ::google::protobuf::Message::CopyWithSourceCheck, + SearchProductsRequest::MergeImpl +}; +const ::google::protobuf::Message::ClassData*SearchProductsRequest::GetClassData() const { return &_class_data_; } + + +void SearchProductsRequest::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:oteldemo.SearchProductsRequest) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (!from._internal_query().empty()) { + _this->_internal_set_query(from._internal_query()); + } + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); +} + +void SearchProductsRequest::CopyFrom(const SearchProductsRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:oteldemo.SearchProductsRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +PROTOBUF_NOINLINE bool SearchProductsRequest::IsInitialized() const { + return true; +} + +void SearchProductsRequest::InternalSwap(SearchProductsRequest* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.query_, lhs_arena, + &other->_impl_.query_, rhs_arena); +} + +::google::protobuf::Metadata SearchProductsRequest::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_demo_2eproto_getter, &descriptor_table_demo_2eproto_once, + file_level_metadata_demo_2eproto[11]); +} +// =================================================================== + +class SearchProductsResponse::_Internal { + public: +}; + +SearchProductsResponse::SearchProductsResponse(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(arena) { + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:oteldemo.SearchProductsResponse) +} +SearchProductsResponse::SearchProductsResponse(const SearchProductsResponse& from) : ::google::protobuf::Message() { + SearchProductsResponse* const _this = this; + (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.results_){from._impl_.results_}, + /*decltype(_impl_._cached_size_)*/ {}, + }; + _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); + + // @@protoc_insertion_point(copy_constructor:oteldemo.SearchProductsResponse) +} +inline void SearchProductsResponse::SharedCtor(::_pb::Arena* arena) { + (void)arena; + new (&_impl_) Impl_{ + decltype(_impl_.results_){arena}, + /*decltype(_impl_._cached_size_)*/ {}, + }; +} +SearchProductsResponse::~SearchProductsResponse() { + // @@protoc_insertion_point(destructor:oteldemo.SearchProductsResponse) + _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); + SharedDtor(); +} +inline void SearchProductsResponse::SharedDtor() { + ABSL_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.results_.~RepeatedPtrField(); +} +void SearchProductsResponse::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +PROTOBUF_NOINLINE void SearchProductsResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:oteldemo.SearchProductsResponse) + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _internal_mutable_results()->Clear(); + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +const char* SearchProductsResponse::_InternalParse( + const char* ptr, ::_pbi::ParseContext* ctx) { + ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header); + return ptr; +} + + +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<0, 1, 1, 0, 2> SearchProductsResponse::_table_ = { + { + 0, // no _has_bits_ + 0, // no _extensions_ + 1, 0, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967294, // skipmap + offsetof(decltype(_table_), field_entries), + 1, // num_field_entries + 1, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + &_SearchProductsResponse_default_instance_._instance, + ::_pbi::TcParser::GenericFallback, // fallback + }, {{ + // repeated .oteldemo.Product results = 1; + {::_pbi::TcParser::FastMtR1, + {10, 63, 0, PROTOBUF_FIELD_OFFSET(SearchProductsResponse, _impl_.results_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // repeated .oteldemo.Product results = 1; + {PROTOBUF_FIELD_OFFSET(SearchProductsResponse, _impl_.results_), 0, 0, + (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + }}, {{ + {::_pbi::TcParser::GetTable<::oteldemo::Product>()}, + }}, {{ + }}, +}; + +::uint8_t* SearchProductsResponse::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:oteldemo.SearchProductsResponse) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + // repeated .oteldemo.Product results = 1; + for (unsigned i = 0, + n = static_cast(this->_internal_results_size()); i < n; i++) { + const auto& repfield = this->_internal_results().Get(i); + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessage(1, repfield, repfield.GetCachedSize(), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:oteldemo.SearchProductsResponse) + return target; +} + +::size_t SearchProductsResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:oteldemo.SearchProductsResponse) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated .oteldemo.Product results = 1; + total_size += 1UL * this->_internal_results_size(); + for (const auto& msg : this->_internal_results()) { + total_size += + ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::google::protobuf::Message::ClassData SearchProductsResponse::_class_data_ = { + ::google::protobuf::Message::CopyWithSourceCheck, + SearchProductsResponse::MergeImpl +}; +const ::google::protobuf::Message::ClassData*SearchProductsResponse::GetClassData() const { return &_class_data_; } + + +void SearchProductsResponse::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:oteldemo.SearchProductsResponse) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + _this->_internal_mutable_results()->MergeFrom(from._internal_results()); + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); +} + +void SearchProductsResponse::CopyFrom(const SearchProductsResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:oteldemo.SearchProductsResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +PROTOBUF_NOINLINE bool SearchProductsResponse::IsInitialized() const { + return true; +} + +void SearchProductsResponse::InternalSwap(SearchProductsResponse* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + _impl_.results_.InternalSwap(&other->_impl_.results_); +} + +::google::protobuf::Metadata SearchProductsResponse::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_demo_2eproto_getter, &descriptor_table_demo_2eproto_once, + file_level_metadata_demo_2eproto[12]); +} +// =================================================================== + +class ProductReview::_Internal { + public: +}; + +ProductReview::ProductReview(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(arena) { + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:oteldemo.ProductReview) +} +ProductReview::ProductReview(const ProductReview& from) : ::google::protobuf::Message() { + ProductReview* const _this = this; + (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.username_){}, + decltype(_impl_.description_){}, + decltype(_impl_.score_){}, + /*decltype(_impl_._cached_size_)*/ {}, + }; + _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); + _impl_.username_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.username_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_username().empty()) { + _this->_impl_.username_.Set(from._internal_username(), _this->GetArenaForAllocation()); + } + _impl_.description_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.description_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_description().empty()) { + _this->_impl_.description_.Set(from._internal_description(), _this->GetArenaForAllocation()); + } + _impl_.score_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.score_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_score().empty()) { + _this->_impl_.score_.Set(from._internal_score(), _this->GetArenaForAllocation()); + } + + // @@protoc_insertion_point(copy_constructor:oteldemo.ProductReview) +} +inline void ProductReview::SharedCtor(::_pb::Arena* arena) { + (void)arena; + new (&_impl_) Impl_{ + decltype(_impl_.username_){}, + decltype(_impl_.description_){}, + decltype(_impl_.score_){}, + /*decltype(_impl_._cached_size_)*/ {}, + }; + _impl_.username_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.username_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.description_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.description_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.score_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.score_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} +ProductReview::~ProductReview() { + // @@protoc_insertion_point(destructor:oteldemo.ProductReview) + _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); + SharedDtor(); +} +inline void ProductReview::SharedDtor() { + ABSL_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.username_.Destroy(); + _impl_.description_.Destroy(); + _impl_.score_.Destroy(); +} +void ProductReview::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +PROTOBUF_NOINLINE void ProductReview::Clear() { +// @@protoc_insertion_point(message_clear_start:oteldemo.ProductReview) + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.username_.ClearToEmpty(); + _impl_.description_.ClearToEmpty(); + _impl_.score_.ClearToEmpty(); + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +const char* ProductReview::_InternalParse( + const char* ptr, ::_pbi::ParseContext* ctx) { + ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header); + return ptr; +} + + +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<2, 3, 0, 55, 2> ProductReview::_table_ = { + { + 0, // no _has_bits_ + 0, // no _extensions_ + 3, 24, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967288, // skipmap + offsetof(decltype(_table_), field_entries), + 3, // num_field_entries + 0, // num_aux_entries + offsetof(decltype(_table_), field_names), // no aux_entries + &_ProductReview_default_instance_._instance, + ::_pbi::TcParser::GenericFallback, // fallback + }, {{ + {::_pbi::TcParser::MiniParse, {}}, + // string username = 1; + {::_pbi::TcParser::FastUS1, + {10, 63, 0, PROTOBUF_FIELD_OFFSET(ProductReview, _impl_.username_)}}, + // string description = 2; + {::_pbi::TcParser::FastUS1, + {18, 63, 0, PROTOBUF_FIELD_OFFSET(ProductReview, _impl_.description_)}}, + // string score = 3; + {::_pbi::TcParser::FastUS1, + {26, 63, 0, PROTOBUF_FIELD_OFFSET(ProductReview, _impl_.score_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // string username = 1; + {PROTOBUF_FIELD_OFFSET(ProductReview, _impl_.username_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)}, + // string description = 2; + {PROTOBUF_FIELD_OFFSET(ProductReview, _impl_.description_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)}, + // string score = 3; + {PROTOBUF_FIELD_OFFSET(ProductReview, _impl_.score_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)}, + }}, + // no aux_entries + {{ + "\26\10\13\5\0\0\0\0" + "oteldemo.ProductReview" + "username" + "description" + "score" + }}, +}; + +::uint8_t* ProductReview::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:oteldemo.ProductReview) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + // string username = 1; + if (!this->_internal_username().empty()) { + const std::string& _s = this->_internal_username(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "oteldemo.ProductReview.username"); + target = stream->WriteStringMaybeAliased(1, _s, target); + } + + // string description = 2; + if (!this->_internal_description().empty()) { + const std::string& _s = this->_internal_description(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "oteldemo.ProductReview.description"); + target = stream->WriteStringMaybeAliased(2, _s, target); + } + + // string score = 3; + if (!this->_internal_score().empty()) { + const std::string& _s = this->_internal_score(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "oteldemo.ProductReview.score"); + target = stream->WriteStringMaybeAliased(3, _s, target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:oteldemo.ProductReview) + return target; +} + +::size_t ProductReview::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:oteldemo.ProductReview) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // string username = 1; + if (!this->_internal_username().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this->_internal_username()); + } + + // string description = 2; + if (!this->_internal_description().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this->_internal_description()); + } + + // string score = 3; + if (!this->_internal_score().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this->_internal_score()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::google::protobuf::Message::ClassData ProductReview::_class_data_ = { + ::google::protobuf::Message::CopyWithSourceCheck, + ProductReview::MergeImpl +}; +const ::google::protobuf::Message::ClassData*ProductReview::GetClassData() const { return &_class_data_; } + + +void ProductReview::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:oteldemo.ProductReview) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (!from._internal_username().empty()) { + _this->_internal_set_username(from._internal_username()); + } + if (!from._internal_description().empty()) { + _this->_internal_set_description(from._internal_description()); + } + if (!from._internal_score().empty()) { + _this->_internal_set_score(from._internal_score()); + } + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); +} + +void ProductReview::CopyFrom(const ProductReview& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:oteldemo.ProductReview) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +PROTOBUF_NOINLINE bool ProductReview::IsInitialized() const { + return true; +} + +void ProductReview::InternalSwap(ProductReview* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.username_, lhs_arena, + &other->_impl_.username_, rhs_arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.description_, lhs_arena, + &other->_impl_.description_, rhs_arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.score_, lhs_arena, + &other->_impl_.score_, rhs_arena); +} + +::google::protobuf::Metadata ProductReview::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_demo_2eproto_getter, &descriptor_table_demo_2eproto_once, + file_level_metadata_demo_2eproto[13]); +} +// =================================================================== + +class GetProductReviewsRequest::_Internal { + public: +}; + +GetProductReviewsRequest::GetProductReviewsRequest(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(arena) { + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:oteldemo.GetProductReviewsRequest) +} +GetProductReviewsRequest::GetProductReviewsRequest(const GetProductReviewsRequest& from) : ::google::protobuf::Message() { + GetProductReviewsRequest* const _this = this; + (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.product_id_){}, + /*decltype(_impl_._cached_size_)*/ {}, + }; + _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); + _impl_.product_id_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.product_id_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_product_id().empty()) { + _this->_impl_.product_id_.Set(from._internal_product_id(), _this->GetArenaForAllocation()); + } + + // @@protoc_insertion_point(copy_constructor:oteldemo.GetProductReviewsRequest) +} +inline void GetProductReviewsRequest::SharedCtor(::_pb::Arena* arena) { + (void)arena; + new (&_impl_) Impl_{ + decltype(_impl_.product_id_){}, + /*decltype(_impl_._cached_size_)*/ {}, + }; + _impl_.product_id_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.product_id_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} +GetProductReviewsRequest::~GetProductReviewsRequest() { + // @@protoc_insertion_point(destructor:oteldemo.GetProductReviewsRequest) + _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); + SharedDtor(); +} +inline void GetProductReviewsRequest::SharedDtor() { + ABSL_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.product_id_.Destroy(); +} +void GetProductReviewsRequest::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +PROTOBUF_NOINLINE void GetProductReviewsRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:oteldemo.GetProductReviewsRequest) + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.product_id_.ClearToEmpty(); + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +const char* GetProductReviewsRequest::_InternalParse( + const char* ptr, ::_pbi::ParseContext* ctx) { + ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header); + return ptr; +} + + +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<0, 1, 0, 52, 2> GetProductReviewsRequest::_table_ = { + { + 0, // no _has_bits_ + 0, // no _extensions_ + 1, 0, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967294, // skipmap + offsetof(decltype(_table_), field_entries), + 1, // num_field_entries + 0, // num_aux_entries + offsetof(decltype(_table_), field_names), // no aux_entries + &_GetProductReviewsRequest_default_instance_._instance, + ::_pbi::TcParser::GenericFallback, // fallback + }, {{ + // string product_id = 1; + {::_pbi::TcParser::FastUS1, + {10, 63, 0, PROTOBUF_FIELD_OFFSET(GetProductReviewsRequest, _impl_.product_id_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // string product_id = 1; + {PROTOBUF_FIELD_OFFSET(GetProductReviewsRequest, _impl_.product_id_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)}, + }}, + // no aux_entries + {{ + "\41\12\0\0\0\0\0\0" + "oteldemo.GetProductReviewsRequest" + "product_id" + }}, +}; + +::uint8_t* GetProductReviewsRequest::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:oteldemo.GetProductReviewsRequest) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + // string product_id = 1; + if (!this->_internal_product_id().empty()) { + const std::string& _s = this->_internal_product_id(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "oteldemo.GetProductReviewsRequest.product_id"); + target = stream->WriteStringMaybeAliased(1, _s, target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:oteldemo.GetProductReviewsRequest) + return target; +} + +::size_t GetProductReviewsRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:oteldemo.GetProductReviewsRequest) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // string product_id = 1; + if (!this->_internal_product_id().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this->_internal_product_id()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::google::protobuf::Message::ClassData GetProductReviewsRequest::_class_data_ = { + ::google::protobuf::Message::CopyWithSourceCheck, + GetProductReviewsRequest::MergeImpl +}; +const ::google::protobuf::Message::ClassData*GetProductReviewsRequest::GetClassData() const { return &_class_data_; } + + +void GetProductReviewsRequest::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:oteldemo.GetProductReviewsRequest) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (!from._internal_product_id().empty()) { + _this->_internal_set_product_id(from._internal_product_id()); + } + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); +} + +void GetProductReviewsRequest::CopyFrom(const GetProductReviewsRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:oteldemo.GetProductReviewsRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +PROTOBUF_NOINLINE bool GetProductReviewsRequest::IsInitialized() const { + return true; +} + +void GetProductReviewsRequest::InternalSwap(GetProductReviewsRequest* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.product_id_, lhs_arena, + &other->_impl_.product_id_, rhs_arena); +} + +::google::protobuf::Metadata GetProductReviewsRequest::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_demo_2eproto_getter, &descriptor_table_demo_2eproto_once, + file_level_metadata_demo_2eproto[14]); +} +// =================================================================== + +class GetProductReviewsResponse::_Internal { + public: +}; + +GetProductReviewsResponse::GetProductReviewsResponse(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(arena) { + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:oteldemo.GetProductReviewsResponse) +} +GetProductReviewsResponse::GetProductReviewsResponse(const GetProductReviewsResponse& from) : ::google::protobuf::Message() { + GetProductReviewsResponse* const _this = this; + (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.product_reviews_){from._impl_.product_reviews_}, + /*decltype(_impl_._cached_size_)*/ {}, + }; + _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); + + // @@protoc_insertion_point(copy_constructor:oteldemo.GetProductReviewsResponse) +} +inline void GetProductReviewsResponse::SharedCtor(::_pb::Arena* arena) { + (void)arena; + new (&_impl_) Impl_{ + decltype(_impl_.product_reviews_){arena}, + /*decltype(_impl_._cached_size_)*/ {}, + }; +} +GetProductReviewsResponse::~GetProductReviewsResponse() { + // @@protoc_insertion_point(destructor:oteldemo.GetProductReviewsResponse) + _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); + SharedDtor(); +} +inline void GetProductReviewsResponse::SharedDtor() { + ABSL_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.product_reviews_.~RepeatedPtrField(); +} +void GetProductReviewsResponse::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +PROTOBUF_NOINLINE void GetProductReviewsResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:oteldemo.GetProductReviewsResponse) + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _internal_mutable_product_reviews()->Clear(); + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +const char* GetProductReviewsResponse::_InternalParse( + const char* ptr, ::_pbi::ParseContext* ctx) { + ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header); + return ptr; +} + + +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<0, 1, 1, 0, 2> GetProductReviewsResponse::_table_ = { + { + 0, // no _has_bits_ + 0, // no _extensions_ + 1, 0, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967294, // skipmap + offsetof(decltype(_table_), field_entries), + 1, // num_field_entries + 1, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + &_GetProductReviewsResponse_default_instance_._instance, + ::_pbi::TcParser::GenericFallback, // fallback + }, {{ + // repeated .oteldemo.ProductReview product_reviews = 1; + {::_pbi::TcParser::FastMtR1, + {10, 63, 0, PROTOBUF_FIELD_OFFSET(GetProductReviewsResponse, _impl_.product_reviews_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // repeated .oteldemo.ProductReview product_reviews = 1; + {PROTOBUF_FIELD_OFFSET(GetProductReviewsResponse, _impl_.product_reviews_), 0, 0, + (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + }}, {{ + {::_pbi::TcParser::GetTable<::oteldemo::ProductReview>()}, + }}, {{ + }}, +}; + +::uint8_t* GetProductReviewsResponse::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:oteldemo.GetProductReviewsResponse) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + // repeated .oteldemo.ProductReview product_reviews = 1; + for (unsigned i = 0, + n = static_cast(this->_internal_product_reviews_size()); i < n; i++) { + const auto& repfield = this->_internal_product_reviews().Get(i); + target = ::google::protobuf::internal::WireFormatLite:: + InternalWriteMessage(1, repfield, repfield.GetCachedSize(), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:oteldemo.GetProductReviewsResponse) + return target; +} + +::size_t GetProductReviewsResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:oteldemo.GetProductReviewsResponse) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated .oteldemo.ProductReview product_reviews = 1; + total_size += 1UL * this->_internal_product_reviews_size(); + for (const auto& msg : this->_internal_product_reviews()) { + total_size += + ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::google::protobuf::Message::ClassData GetProductReviewsResponse::_class_data_ = { + ::google::protobuf::Message::CopyWithSourceCheck, + GetProductReviewsResponse::MergeImpl +}; +const ::google::protobuf::Message::ClassData*GetProductReviewsResponse::GetClassData() const { return &_class_data_; } + + +void GetProductReviewsResponse::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:oteldemo.GetProductReviewsResponse) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + _this->_internal_mutable_product_reviews()->MergeFrom(from._internal_product_reviews()); + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); +} + +void GetProductReviewsResponse::CopyFrom(const GetProductReviewsResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:oteldemo.GetProductReviewsResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +PROTOBUF_NOINLINE bool GetProductReviewsResponse::IsInitialized() const { + return true; +} + +void GetProductReviewsResponse::InternalSwap(GetProductReviewsResponse* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + _impl_.product_reviews_.InternalSwap(&other->_impl_.product_reviews_); +} + +::google::protobuf::Metadata GetProductReviewsResponse::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_demo_2eproto_getter, &descriptor_table_demo_2eproto_once, + file_level_metadata_demo_2eproto[15]); +} +// =================================================================== + +class GetAverageProductReviewScoreRequest::_Internal { + public: +}; + +GetAverageProductReviewScoreRequest::GetAverageProductReviewScoreRequest(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(arena) { + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:oteldemo.GetAverageProductReviewScoreRequest) +} +GetAverageProductReviewScoreRequest::GetAverageProductReviewScoreRequest(const GetAverageProductReviewScoreRequest& from) : ::google::protobuf::Message() { + GetAverageProductReviewScoreRequest* const _this = this; + (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.product_id_){}, + /*decltype(_impl_._cached_size_)*/ {}, + }; + _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); + _impl_.product_id_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.product_id_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_product_id().empty()) { + _this->_impl_.product_id_.Set(from._internal_product_id(), _this->GetArenaForAllocation()); + } + + // @@protoc_insertion_point(copy_constructor:oteldemo.GetAverageProductReviewScoreRequest) +} +inline void GetAverageProductReviewScoreRequest::SharedCtor(::_pb::Arena* arena) { + (void)arena; + new (&_impl_) Impl_{ + decltype(_impl_.product_id_){}, + /*decltype(_impl_._cached_size_)*/ {}, + }; + _impl_.product_id_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.product_id_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} +GetAverageProductReviewScoreRequest::~GetAverageProductReviewScoreRequest() { + // @@protoc_insertion_point(destructor:oteldemo.GetAverageProductReviewScoreRequest) + _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); + SharedDtor(); +} +inline void GetAverageProductReviewScoreRequest::SharedDtor() { + ABSL_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.product_id_.Destroy(); +} +void GetAverageProductReviewScoreRequest::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +PROTOBUF_NOINLINE void GetAverageProductReviewScoreRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:oteldemo.GetAverageProductReviewScoreRequest) + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.product_id_.ClearToEmpty(); + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +const char* GetAverageProductReviewScoreRequest::_InternalParse( + const char* ptr, ::_pbi::ParseContext* ctx) { + ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header); + return ptr; +} + + +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<0, 1, 0, 63, 2> GetAverageProductReviewScoreRequest::_table_ = { + { + 0, // no _has_bits_ + 0, // no _extensions_ + 1, 0, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967294, // skipmap + offsetof(decltype(_table_), field_entries), + 1, // num_field_entries + 0, // num_aux_entries + offsetof(decltype(_table_), field_names), // no aux_entries + &_GetAverageProductReviewScoreRequest_default_instance_._instance, + ::_pbi::TcParser::GenericFallback, // fallback + }, {{ + // string product_id = 1; + {::_pbi::TcParser::FastUS1, + {10, 63, 0, PROTOBUF_FIELD_OFFSET(GetAverageProductReviewScoreRequest, _impl_.product_id_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // string product_id = 1; + {PROTOBUF_FIELD_OFFSET(GetAverageProductReviewScoreRequest, _impl_.product_id_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)}, + }}, + // no aux_entries + {{ + "\54\12\0\0\0\0\0\0" + "oteldemo.GetAverageProductReviewScoreRequest" + "product_id" + }}, +}; + +::uint8_t* GetAverageProductReviewScoreRequest::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:oteldemo.GetAverageProductReviewScoreRequest) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + // string product_id = 1; + if (!this->_internal_product_id().empty()) { + const std::string& _s = this->_internal_product_id(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "oteldemo.GetAverageProductReviewScoreRequest.product_id"); + target = stream->WriteStringMaybeAliased(1, _s, target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:oteldemo.GetAverageProductReviewScoreRequest) + return target; +} + +::size_t GetAverageProductReviewScoreRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:oteldemo.GetAverageProductReviewScoreRequest) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // string product_id = 1; + if (!this->_internal_product_id().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this->_internal_product_id()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::google::protobuf::Message::ClassData GetAverageProductReviewScoreRequest::_class_data_ = { + ::google::protobuf::Message::CopyWithSourceCheck, + GetAverageProductReviewScoreRequest::MergeImpl +}; +const ::google::protobuf::Message::ClassData*GetAverageProductReviewScoreRequest::GetClassData() const { return &_class_data_; } + + +void GetAverageProductReviewScoreRequest::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:oteldemo.GetAverageProductReviewScoreRequest) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (!from._internal_product_id().empty()) { + _this->_internal_set_product_id(from._internal_product_id()); + } + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); +} + +void GetAverageProductReviewScoreRequest::CopyFrom(const GetAverageProductReviewScoreRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:oteldemo.GetAverageProductReviewScoreRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +PROTOBUF_NOINLINE bool GetAverageProductReviewScoreRequest::IsInitialized() const { + return true; +} + +void GetAverageProductReviewScoreRequest::InternalSwap(GetAverageProductReviewScoreRequest* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.product_id_, lhs_arena, + &other->_impl_.product_id_, rhs_arena); +} + +::google::protobuf::Metadata GetAverageProductReviewScoreRequest::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_demo_2eproto_getter, &descriptor_table_demo_2eproto_once, + file_level_metadata_demo_2eproto[16]); +} +// =================================================================== + +class GetAverageProductReviewScoreResponse::_Internal { + public: +}; + +GetAverageProductReviewScoreResponse::GetAverageProductReviewScoreResponse(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(arena) { + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:oteldemo.GetAverageProductReviewScoreResponse) +} +GetAverageProductReviewScoreResponse::GetAverageProductReviewScoreResponse(const GetAverageProductReviewScoreResponse& from) : ::google::protobuf::Message() { + GetAverageProductReviewScoreResponse* const _this = this; + (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_.average_score_){}, + /*decltype(_impl_._cached_size_)*/ {}, + }; + _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); + _impl_.average_score_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.average_score_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_average_score().empty()) { + _this->_impl_.average_score_.Set(from._internal_average_score(), _this->GetArenaForAllocation()); + } + + // @@protoc_insertion_point(copy_constructor:oteldemo.GetAverageProductReviewScoreResponse) +} +inline void GetAverageProductReviewScoreResponse::SharedCtor(::_pb::Arena* arena) { + (void)arena; + new (&_impl_) Impl_{ + decltype(_impl_.average_score_){}, + /*decltype(_impl_._cached_size_)*/ {}, + }; + _impl_.average_score_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.average_score_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} +GetAverageProductReviewScoreResponse::~GetAverageProductReviewScoreResponse() { + // @@protoc_insertion_point(destructor:oteldemo.GetAverageProductReviewScoreResponse) + _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); + SharedDtor(); +} +inline void GetAverageProductReviewScoreResponse::SharedDtor() { + ABSL_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.average_score_.Destroy(); +} +void GetAverageProductReviewScoreResponse::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +PROTOBUF_NOINLINE void GetAverageProductReviewScoreResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:oteldemo.GetAverageProductReviewScoreResponse) + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.average_score_.ClearToEmpty(); + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +const char* GetAverageProductReviewScoreResponse::_InternalParse( + const char* ptr, ::_pbi::ParseContext* ctx) { + ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header); + return ptr; +} + + +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<0, 1, 0, 67, 2> GetAverageProductReviewScoreResponse::_table_ = { + { + 0, // no _has_bits_ + 0, // no _extensions_ + 1, 0, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967294, // skipmap + offsetof(decltype(_table_), field_entries), + 1, // num_field_entries + 0, // num_aux_entries + offsetof(decltype(_table_), field_names), // no aux_entries + &_GetAverageProductReviewScoreResponse_default_instance_._instance, + ::_pbi::TcParser::GenericFallback, // fallback + }, {{ + // string average_score = 1; + {::_pbi::TcParser::FastUS1, + {10, 63, 0, PROTOBUF_FIELD_OFFSET(GetAverageProductReviewScoreResponse, _impl_.average_score_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // string average_score = 1; + {PROTOBUF_FIELD_OFFSET(GetAverageProductReviewScoreResponse, _impl_.average_score_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)}, + }}, + // no aux_entries + {{ + "\55\15\0\0\0\0\0\0" + "oteldemo.GetAverageProductReviewScoreResponse" + "average_score" + }}, +}; + +::uint8_t* GetAverageProductReviewScoreResponse::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:oteldemo.GetAverageProductReviewScoreResponse) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + // string average_score = 1; + if (!this->_internal_average_score().empty()) { + const std::string& _s = this->_internal_average_score(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "oteldemo.GetAverageProductReviewScoreResponse.average_score"); + target = stream->WriteStringMaybeAliased(1, _s, target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:oteldemo.GetAverageProductReviewScoreResponse) + return target; +} + +::size_t GetAverageProductReviewScoreResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:oteldemo.GetAverageProductReviewScoreResponse) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // string average_score = 1; + if (!this->_internal_average_score().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this->_internal_average_score()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::google::protobuf::Message::ClassData GetAverageProductReviewScoreResponse::_class_data_ = { + ::google::protobuf::Message::CopyWithSourceCheck, + GetAverageProductReviewScoreResponse::MergeImpl +}; +const ::google::protobuf::Message::ClassData*GetAverageProductReviewScoreResponse::GetClassData() const { return &_class_data_; } + + +void GetAverageProductReviewScoreResponse::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:oteldemo.GetAverageProductReviewScoreResponse) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (!from._internal_average_score().empty()) { + _this->_internal_set_average_score(from._internal_average_score()); } _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); } -void GetProductRequest::CopyFrom(const GetProductRequest& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:oteldemo.GetProductRequest) +void GetAverageProductReviewScoreResponse::CopyFrom(const GetAverageProductReviewScoreResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:oteldemo.GetAverageProductReviewScoreResponse) if (&from == this) return; Clear(); MergeFrom(from); } -PROTOBUF_NOINLINE bool GetProductRequest::IsInitialized() const { +PROTOBUF_NOINLINE bool GetAverageProductReviewScoreResponse::IsInitialized() const { return true; } -void GetProductRequest::InternalSwap(GetProductRequest* other) { +void GetAverageProductReviewScoreResponse::InternalSwap(GetAverageProductReviewScoreResponse* other) { using std::swap; auto* lhs_arena = GetArenaForAllocation(); auto* rhs_arena = other->GetArenaForAllocation(); _internal_metadata_.InternalSwap(&other->_internal_metadata_); - ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.id_, lhs_arena, - &other->_impl_.id_, rhs_arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.average_score_, lhs_arena, + &other->_impl_.average_score_, rhs_arena); } -::google::protobuf::Metadata GetProductRequest::GetMetadata() const { +::google::protobuf::Metadata GetAverageProductReviewScoreResponse::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_demo_2eproto_getter, &descriptor_table_demo_2eproto_once, - file_level_metadata_demo_2eproto[10]); + file_level_metadata_demo_2eproto[17]); } // =================================================================== -class SearchProductsRequest::_Internal { +class AskProductAIAssistantRequest::_Internal { public: }; -SearchProductsRequest::SearchProductsRequest(::google::protobuf::Arena* arena) +AskProductAIAssistantRequest::AskProductAIAssistantRequest(::google::protobuf::Arena* arena) : ::google::protobuf::Message(arena) { SharedCtor(arena); - // @@protoc_insertion_point(arena_constructor:oteldemo.SearchProductsRequest) + // @@protoc_insertion_point(arena_constructor:oteldemo.AskProductAIAssistantRequest) } -SearchProductsRequest::SearchProductsRequest(const SearchProductsRequest& from) : ::google::protobuf::Message() { - SearchProductsRequest* const _this = this; +AskProductAIAssistantRequest::AskProductAIAssistantRequest(const AskProductAIAssistantRequest& from) : ::google::protobuf::Message() { + AskProductAIAssistantRequest* const _this = this; (void)_this; new (&_impl_) Impl_{ - decltype(_impl_.query_){}, + decltype(_impl_.product_id_){}, + decltype(_impl_.question_){}, /*decltype(_impl_._cached_size_)*/ {}, }; _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( from._internal_metadata_); - _impl_.query_.InitDefault(); + _impl_.product_id_.InitDefault(); #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.query_.Set("", GetArenaForAllocation()); + _impl_.product_id_.Set("", GetArenaForAllocation()); #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (!from._internal_query().empty()) { - _this->_impl_.query_.Set(from._internal_query(), _this->GetArenaForAllocation()); + if (!from._internal_product_id().empty()) { + _this->_impl_.product_id_.Set(from._internal_product_id(), _this->GetArenaForAllocation()); + } + _impl_.question_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.question_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_question().empty()) { + _this->_impl_.question_.Set(from._internal_question(), _this->GetArenaForAllocation()); } - // @@protoc_insertion_point(copy_constructor:oteldemo.SearchProductsRequest) + // @@protoc_insertion_point(copy_constructor:oteldemo.AskProductAIAssistantRequest) } -inline void SearchProductsRequest::SharedCtor(::_pb::Arena* arena) { +inline void AskProductAIAssistantRequest::SharedCtor(::_pb::Arena* arena) { (void)arena; new (&_impl_) Impl_{ - decltype(_impl_.query_){}, + decltype(_impl_.product_id_){}, + decltype(_impl_.question_){}, /*decltype(_impl_._cached_size_)*/ {}, }; - _impl_.query_.InitDefault(); + _impl_.product_id_.InitDefault(); #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - _impl_.query_.Set("", GetArenaForAllocation()); + _impl_.product_id_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.question_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.question_.Set("", GetArenaForAllocation()); #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING } -SearchProductsRequest::~SearchProductsRequest() { - // @@protoc_insertion_point(destructor:oteldemo.SearchProductsRequest) +AskProductAIAssistantRequest::~AskProductAIAssistantRequest() { + // @@protoc_insertion_point(destructor:oteldemo.AskProductAIAssistantRequest) _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); SharedDtor(); } -inline void SearchProductsRequest::SharedDtor() { +inline void AskProductAIAssistantRequest::SharedDtor() { ABSL_DCHECK(GetArenaForAllocation() == nullptr); - _impl_.query_.Destroy(); + _impl_.product_id_.Destroy(); + _impl_.question_.Destroy(); } -void SearchProductsRequest::SetCachedSize(int size) const { +void AskProductAIAssistantRequest::SetCachedSize(int size) const { _impl_._cached_size_.Set(size); } -PROTOBUF_NOINLINE void SearchProductsRequest::Clear() { -// @@protoc_insertion_point(message_clear_start:oteldemo.SearchProductsRequest) +PROTOBUF_NOINLINE void AskProductAIAssistantRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:oteldemo.AskProductAIAssistantRequest) ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - _impl_.query_.ClearToEmpty(); + _impl_.product_id_.ClearToEmpty(); + _impl_.question_.ClearToEmpty(); _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); } -const char* SearchProductsRequest::_InternalParse( +const char* AskProductAIAssistantRequest::_InternalParse( const char* ptr, ::_pbi::ParseContext* ctx) { ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header); return ptr; @@ -3884,179 +5523,216 @@ const char* SearchProductsRequest::_InternalParse( PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 -const ::_pbi::TcParseTable<0, 1, 0, 44, 2> SearchProductsRequest::_table_ = { +const ::_pbi::TcParseTable<1, 2, 0, 64, 2> AskProductAIAssistantRequest::_table_ = { { 0, // no _has_bits_ 0, // no _extensions_ - 1, 0, // max_field_number, fast_idx_mask + 2, 8, // max_field_number, fast_idx_mask offsetof(decltype(_table_), field_lookup_table), - 4294967294, // skipmap + 4294967292, // skipmap offsetof(decltype(_table_), field_entries), - 1, // num_field_entries + 2, // num_field_entries 0, // num_aux_entries offsetof(decltype(_table_), field_names), // no aux_entries - &_SearchProductsRequest_default_instance_._instance, + &_AskProductAIAssistantRequest_default_instance_._instance, ::_pbi::TcParser::GenericFallback, // fallback }, {{ - // string query = 1; + // string question = 2; {::_pbi::TcParser::FastUS1, - {10, 63, 0, PROTOBUF_FIELD_OFFSET(SearchProductsRequest, _impl_.query_)}}, + {18, 63, 0, PROTOBUF_FIELD_OFFSET(AskProductAIAssistantRequest, _impl_.question_)}}, + // string product_id = 1; + {::_pbi::TcParser::FastUS1, + {10, 63, 0, PROTOBUF_FIELD_OFFSET(AskProductAIAssistantRequest, _impl_.product_id_)}}, }}, {{ 65535, 65535 }}, {{ - // string query = 1; - {PROTOBUF_FIELD_OFFSET(SearchProductsRequest, _impl_.query_), 0, 0, + // string product_id = 1; + {PROTOBUF_FIELD_OFFSET(AskProductAIAssistantRequest, _impl_.product_id_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)}, + // string question = 2; + {PROTOBUF_FIELD_OFFSET(AskProductAIAssistantRequest, _impl_.question_), 0, 0, (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)}, }}, // no aux_entries {{ - "\36\5\0\0\0\0\0\0" - "oteldemo.SearchProductsRequest" - "query" + "\45\12\10\0\0\0\0\0" + "oteldemo.AskProductAIAssistantRequest" + "product_id" + "question" }}, }; -::uint8_t* SearchProductsRequest::_InternalSerialize( +::uint8_t* AskProductAIAssistantRequest::_InternalSerialize( ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:oteldemo.SearchProductsRequest) + // @@protoc_insertion_point(serialize_to_array_start:oteldemo.AskProductAIAssistantRequest) ::uint32_t cached_has_bits = 0; (void)cached_has_bits; - // string query = 1; - if (!this->_internal_query().empty()) { - const std::string& _s = this->_internal_query(); + // string product_id = 1; + if (!this->_internal_product_id().empty()) { + const std::string& _s = this->_internal_product_id(); ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "oteldemo.SearchProductsRequest.query"); + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "oteldemo.AskProductAIAssistantRequest.product_id"); target = stream->WriteStringMaybeAliased(1, _s, target); } + // string question = 2; + if (!this->_internal_question().empty()) { + const std::string& _s = this->_internal_question(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "oteldemo.AskProductAIAssistantRequest.question"); + target = stream->WriteStringMaybeAliased(2, _s, target); + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); } - // @@protoc_insertion_point(serialize_to_array_end:oteldemo.SearchProductsRequest) + // @@protoc_insertion_point(serialize_to_array_end:oteldemo.AskProductAIAssistantRequest) return target; } -::size_t SearchProductsRequest::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:oteldemo.SearchProductsRequest) +::size_t AskProductAIAssistantRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:oteldemo.AskProductAIAssistantRequest) ::size_t total_size = 0; ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - // string query = 1; - if (!this->_internal_query().empty()) { + // string product_id = 1; + if (!this->_internal_product_id().empty()) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( - this->_internal_query()); + this->_internal_product_id()); + } + + // string question = 2; + if (!this->_internal_question().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this->_internal_question()); } return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); } -const ::google::protobuf::Message::ClassData SearchProductsRequest::_class_data_ = { +const ::google::protobuf::Message::ClassData AskProductAIAssistantRequest::_class_data_ = { ::google::protobuf::Message::CopyWithSourceCheck, - SearchProductsRequest::MergeImpl + AskProductAIAssistantRequest::MergeImpl }; -const ::google::protobuf::Message::ClassData*SearchProductsRequest::GetClassData() const { return &_class_data_; } +const ::google::protobuf::Message::ClassData*AskProductAIAssistantRequest::GetClassData() const { return &_class_data_; } -void SearchProductsRequest::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - // @@protoc_insertion_point(class_specific_merge_from_start:oteldemo.SearchProductsRequest) +void AskProductAIAssistantRequest::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:oteldemo.AskProductAIAssistantRequest) ABSL_DCHECK_NE(&from, _this); ::uint32_t cached_has_bits = 0; (void) cached_has_bits; - if (!from._internal_query().empty()) { - _this->_internal_set_query(from._internal_query()); + if (!from._internal_product_id().empty()) { + _this->_internal_set_product_id(from._internal_product_id()); + } + if (!from._internal_question().empty()) { + _this->_internal_set_question(from._internal_question()); } _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); } -void SearchProductsRequest::CopyFrom(const SearchProductsRequest& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:oteldemo.SearchProductsRequest) +void AskProductAIAssistantRequest::CopyFrom(const AskProductAIAssistantRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:oteldemo.AskProductAIAssistantRequest) if (&from == this) return; Clear(); MergeFrom(from); } -PROTOBUF_NOINLINE bool SearchProductsRequest::IsInitialized() const { +PROTOBUF_NOINLINE bool AskProductAIAssistantRequest::IsInitialized() const { return true; } -void SearchProductsRequest::InternalSwap(SearchProductsRequest* other) { +void AskProductAIAssistantRequest::InternalSwap(AskProductAIAssistantRequest* other) { using std::swap; auto* lhs_arena = GetArenaForAllocation(); auto* rhs_arena = other->GetArenaForAllocation(); _internal_metadata_.InternalSwap(&other->_internal_metadata_); - ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.query_, lhs_arena, - &other->_impl_.query_, rhs_arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.product_id_, lhs_arena, + &other->_impl_.product_id_, rhs_arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.question_, lhs_arena, + &other->_impl_.question_, rhs_arena); } -::google::protobuf::Metadata SearchProductsRequest::GetMetadata() const { +::google::protobuf::Metadata AskProductAIAssistantRequest::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_demo_2eproto_getter, &descriptor_table_demo_2eproto_once, - file_level_metadata_demo_2eproto[11]); + file_level_metadata_demo_2eproto[18]); } // =================================================================== -class SearchProductsResponse::_Internal { +class AskProductAIAssistantResponse::_Internal { public: }; -SearchProductsResponse::SearchProductsResponse(::google::protobuf::Arena* arena) +AskProductAIAssistantResponse::AskProductAIAssistantResponse(::google::protobuf::Arena* arena) : ::google::protobuf::Message(arena) { SharedCtor(arena); - // @@protoc_insertion_point(arena_constructor:oteldemo.SearchProductsResponse) + // @@protoc_insertion_point(arena_constructor:oteldemo.AskProductAIAssistantResponse) } -SearchProductsResponse::SearchProductsResponse(const SearchProductsResponse& from) : ::google::protobuf::Message() { - SearchProductsResponse* const _this = this; +AskProductAIAssistantResponse::AskProductAIAssistantResponse(const AskProductAIAssistantResponse& from) : ::google::protobuf::Message() { + AskProductAIAssistantResponse* const _this = this; (void)_this; new (&_impl_) Impl_{ - decltype(_impl_.results_){from._impl_.results_}, + decltype(_impl_.response_){}, /*decltype(_impl_._cached_size_)*/ {}, }; _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( from._internal_metadata_); + _impl_.response_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.response_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (!from._internal_response().empty()) { + _this->_impl_.response_.Set(from._internal_response(), _this->GetArenaForAllocation()); + } - // @@protoc_insertion_point(copy_constructor:oteldemo.SearchProductsResponse) + // @@protoc_insertion_point(copy_constructor:oteldemo.AskProductAIAssistantResponse) } -inline void SearchProductsResponse::SharedCtor(::_pb::Arena* arena) { +inline void AskProductAIAssistantResponse::SharedCtor(::_pb::Arena* arena) { (void)arena; new (&_impl_) Impl_{ - decltype(_impl_.results_){arena}, + decltype(_impl_.response_){}, /*decltype(_impl_._cached_size_)*/ {}, }; + _impl_.response_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.response_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING } -SearchProductsResponse::~SearchProductsResponse() { - // @@protoc_insertion_point(destructor:oteldemo.SearchProductsResponse) +AskProductAIAssistantResponse::~AskProductAIAssistantResponse() { + // @@protoc_insertion_point(destructor:oteldemo.AskProductAIAssistantResponse) _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); SharedDtor(); } -inline void SearchProductsResponse::SharedDtor() { +inline void AskProductAIAssistantResponse::SharedDtor() { ABSL_DCHECK(GetArenaForAllocation() == nullptr); - _impl_.results_.~RepeatedPtrField(); + _impl_.response_.Destroy(); } -void SearchProductsResponse::SetCachedSize(int size) const { +void AskProductAIAssistantResponse::SetCachedSize(int size) const { _impl_._cached_size_.Set(size); } -PROTOBUF_NOINLINE void SearchProductsResponse::Clear() { -// @@protoc_insertion_point(message_clear_start:oteldemo.SearchProductsResponse) +PROTOBUF_NOINLINE void AskProductAIAssistantResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:oteldemo.AskProductAIAssistantResponse) ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - _internal_mutable_results()->Clear(); + _impl_.response_.ClearToEmpty(); _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); } -const char* SearchProductsResponse::_InternalParse( +const char* AskProductAIAssistantResponse::_InternalParse( const char* ptr, ::_pbi::ParseContext* ctx) { ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header); return ptr; @@ -4064,7 +5740,7 @@ const char* SearchProductsResponse::_InternalParse( PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 -const ::_pbi::TcParseTable<0, 1, 1, 0, 2> SearchProductsResponse::_table_ = { +const ::_pbi::TcParseTable<0, 1, 0, 55, 2> AskProductAIAssistantResponse::_table_ = { { 0, // no _has_bits_ 0, // no _extensions_ @@ -4073,39 +5749,42 @@ const ::_pbi::TcParseTable<0, 1, 1, 0, 2> SearchProductsResponse::_table_ = { 4294967294, // skipmap offsetof(decltype(_table_), field_entries), 1, // num_field_entries - 1, // num_aux_entries - offsetof(decltype(_table_), aux_entries), - &_SearchProductsResponse_default_instance_._instance, + 0, // num_aux_entries + offsetof(decltype(_table_), field_names), // no aux_entries + &_AskProductAIAssistantResponse_default_instance_._instance, ::_pbi::TcParser::GenericFallback, // fallback }, {{ - // repeated .oteldemo.Product results = 1; - {::_pbi::TcParser::FastMtR1, - {10, 63, 0, PROTOBUF_FIELD_OFFSET(SearchProductsResponse, _impl_.results_)}}, + // string response = 1; + {::_pbi::TcParser::FastUS1, + {10, 63, 0, PROTOBUF_FIELD_OFFSET(AskProductAIAssistantResponse, _impl_.response_)}}, }}, {{ 65535, 65535 }}, {{ - // repeated .oteldemo.Product results = 1; - {PROTOBUF_FIELD_OFFSET(SearchProductsResponse, _impl_.results_), 0, 0, - (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, - }}, {{ - {::_pbi::TcParser::GetTable<::oteldemo::Product>()}, - }}, {{ + // string response = 1; + {PROTOBUF_FIELD_OFFSET(AskProductAIAssistantResponse, _impl_.response_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)}, + }}, + // no aux_entries + {{ + "\46\10\0\0\0\0\0\0" + "oteldemo.AskProductAIAssistantResponse" + "response" }}, }; -::uint8_t* SearchProductsResponse::_InternalSerialize( +::uint8_t* AskProductAIAssistantResponse::_InternalSerialize( ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:oteldemo.SearchProductsResponse) + // @@protoc_insertion_point(serialize_to_array_start:oteldemo.AskProductAIAssistantResponse) ::uint32_t cached_has_bits = 0; (void)cached_has_bits; - // repeated .oteldemo.Product results = 1; - for (unsigned i = 0, - n = static_cast(this->_internal_results_size()); i < n; i++) { - const auto& repfield = this->_internal_results().Get(i); - target = ::google::protobuf::internal::WireFormatLite:: - InternalWriteMessage(1, repfield, repfield.GetCachedSize(), target, stream); + // string response = 1; + if (!this->_internal_response().empty()) { + const std::string& _s = this->_internal_response(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "oteldemo.AskProductAIAssistantResponse.response"); + target = stream->WriteStringMaybeAliased(1, _s, target); } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { @@ -4113,67 +5792,72 @@ ::uint8_t* SearchProductsResponse::_InternalSerialize( ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); } - // @@protoc_insertion_point(serialize_to_array_end:oteldemo.SearchProductsResponse) + // @@protoc_insertion_point(serialize_to_array_end:oteldemo.AskProductAIAssistantResponse) return target; } -::size_t SearchProductsResponse::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:oteldemo.SearchProductsResponse) +::size_t AskProductAIAssistantResponse::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:oteldemo.AskProductAIAssistantResponse) ::size_t total_size = 0; ::uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - // repeated .oteldemo.Product results = 1; - total_size += 1UL * this->_internal_results_size(); - for (const auto& msg : this->_internal_results()) { - total_size += - ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + // string response = 1; + if (!this->_internal_response().empty()) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this->_internal_response()); } + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); } -const ::google::protobuf::Message::ClassData SearchProductsResponse::_class_data_ = { +const ::google::protobuf::Message::ClassData AskProductAIAssistantResponse::_class_data_ = { ::google::protobuf::Message::CopyWithSourceCheck, - SearchProductsResponse::MergeImpl + AskProductAIAssistantResponse::MergeImpl }; -const ::google::protobuf::Message::ClassData*SearchProductsResponse::GetClassData() const { return &_class_data_; } +const ::google::protobuf::Message::ClassData*AskProductAIAssistantResponse::GetClassData() const { return &_class_data_; } -void SearchProductsResponse::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) { - auto* const _this = static_cast(&to_msg); - auto& from = static_cast(from_msg); - // @@protoc_insertion_point(class_specific_merge_from_start:oteldemo.SearchProductsResponse) +void AskProductAIAssistantResponse::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:oteldemo.AskProductAIAssistantResponse) ABSL_DCHECK_NE(&from, _this); ::uint32_t cached_has_bits = 0; (void) cached_has_bits; - _this->_internal_mutable_results()->MergeFrom(from._internal_results()); + if (!from._internal_response().empty()) { + _this->_internal_set_response(from._internal_response()); + } _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); } -void SearchProductsResponse::CopyFrom(const SearchProductsResponse& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:oteldemo.SearchProductsResponse) +void AskProductAIAssistantResponse::CopyFrom(const AskProductAIAssistantResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:oteldemo.AskProductAIAssistantResponse) if (&from == this) return; Clear(); MergeFrom(from); } -PROTOBUF_NOINLINE bool SearchProductsResponse::IsInitialized() const { +PROTOBUF_NOINLINE bool AskProductAIAssistantResponse::IsInitialized() const { return true; } -void SearchProductsResponse::InternalSwap(SearchProductsResponse* other) { +void AskProductAIAssistantResponse::InternalSwap(AskProductAIAssistantResponse* other) { using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); _internal_metadata_.InternalSwap(&other->_internal_metadata_); - _impl_.results_.InternalSwap(&other->_impl_.results_); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.response_, lhs_arena, + &other->_impl_.response_, rhs_arena); } -::google::protobuf::Metadata SearchProductsResponse::GetMetadata() const { +::google::protobuf::Metadata AskProductAIAssistantResponse::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_demo_2eproto_getter, &descriptor_table_demo_2eproto_once, - file_level_metadata_demo_2eproto[12]); + file_level_metadata_demo_2eproto[19]); } // =================================================================== @@ -4398,7 +6082,7 @@ void GetQuoteRequest::InternalSwap(GetQuoteRequest* other) { ::google::protobuf::Metadata GetQuoteRequest::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_demo_2eproto_getter, &descriptor_table_demo_2eproto_once, - file_level_metadata_demo_2eproto[13]); + file_level_metadata_demo_2eproto[20]); } // =================================================================== @@ -4596,7 +6280,7 @@ void GetQuoteResponse::InternalSwap(GetQuoteResponse* other) { ::google::protobuf::Metadata GetQuoteResponse::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_demo_2eproto_getter, &descriptor_table_demo_2eproto_once, - file_level_metadata_demo_2eproto[14]); + file_level_metadata_demo_2eproto[21]); } // =================================================================== @@ -4821,7 +6505,7 @@ void ShipOrderRequest::InternalSwap(ShipOrderRequest* other) { ::google::protobuf::Metadata ShipOrderRequest::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_demo_2eproto_getter, &descriptor_table_demo_2eproto_once, - file_level_metadata_demo_2eproto[15]); + file_level_metadata_demo_2eproto[22]); } // =================================================================== @@ -5012,7 +6696,7 @@ void ShipOrderResponse::InternalSwap(ShipOrderResponse* other) { ::google::protobuf::Metadata ShipOrderResponse::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_demo_2eproto_getter, &descriptor_table_demo_2eproto_once, - file_level_metadata_demo_2eproto[16]); + file_level_metadata_demo_2eproto[23]); } // =================================================================== @@ -5370,7 +7054,7 @@ void Address::InternalSwap(Address* other) { ::google::protobuf::Metadata Address::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_demo_2eproto_getter, &descriptor_table_demo_2eproto_once, - file_level_metadata_demo_2eproto[17]); + file_level_metadata_demo_2eproto[24]); } // =================================================================== @@ -5622,7 +7306,7 @@ void Money::InternalSwap(Money* other) { ::google::protobuf::Metadata Money::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_demo_2eproto_getter, &descriptor_table_demo_2eproto_once, - file_level_metadata_demo_2eproto[18]); + file_level_metadata_demo_2eproto[25]); } // =================================================================== @@ -5797,7 +7481,7 @@ void GetSupportedCurrenciesResponse::InternalSwap(GetSupportedCurrenciesResponse ::google::protobuf::Metadata GetSupportedCurrenciesResponse::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_demo_2eproto_getter, &descriptor_table_demo_2eproto_once, - file_level_metadata_demo_2eproto[19]); + file_level_metadata_demo_2eproto[26]); } // =================================================================== @@ -6040,7 +7724,7 @@ void CurrencyConversionRequest::InternalSwap(CurrencyConversionRequest* other) { ::google::protobuf::Metadata CurrencyConversionRequest::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_demo_2eproto_getter, &descriptor_table_demo_2eproto_once, - file_level_metadata_demo_2eproto[20]); + file_level_metadata_demo_2eproto[27]); } // =================================================================== @@ -6315,7 +7999,7 @@ void CreditCardInfo::InternalSwap(CreditCardInfo* other) { ::google::protobuf::Metadata CreditCardInfo::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_demo_2eproto_getter, &descriptor_table_demo_2eproto_once, - file_level_metadata_demo_2eproto[21]); + file_level_metadata_demo_2eproto[28]); } // =================================================================== @@ -6567,7 +8251,7 @@ void ChargeRequest::InternalSwap(ChargeRequest* other) { ::google::protobuf::Metadata ChargeRequest::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_demo_2eproto_getter, &descriptor_table_demo_2eproto_once, - file_level_metadata_demo_2eproto[22]); + file_level_metadata_demo_2eproto[29]); } // =================================================================== @@ -6758,7 +8442,7 @@ void ChargeResponse::InternalSwap(ChargeResponse* other) { ::google::protobuf::Metadata ChargeResponse::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_demo_2eproto_getter, &descriptor_table_demo_2eproto_once, - file_level_metadata_demo_2eproto[23]); + file_level_metadata_demo_2eproto[30]); } // =================================================================== @@ -7010,7 +8694,7 @@ void OrderItem::InternalSwap(OrderItem* other) { ::google::protobuf::Metadata OrderItem::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_demo_2eproto_getter, &descriptor_table_demo_2eproto_once, - file_level_metadata_demo_2eproto[24]); + file_level_metadata_demo_2eproto[31]); } // =================================================================== @@ -7378,7 +9062,7 @@ void OrderResult::InternalSwap(OrderResult* other) { ::google::protobuf::Metadata OrderResult::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_demo_2eproto_getter, &descriptor_table_demo_2eproto_once, - file_level_metadata_demo_2eproto[25]); + file_level_metadata_demo_2eproto[32]); } // =================================================================== @@ -7621,7 +9305,7 @@ void SendOrderConfirmationRequest::InternalSwap(SendOrderConfirmationRequest* ot ::google::protobuf::Metadata SendOrderConfirmationRequest::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_demo_2eproto_getter, &descriptor_table_demo_2eproto_once, - file_level_metadata_demo_2eproto[26]); + file_level_metadata_demo_2eproto[33]); } // =================================================================== @@ -8003,7 +9687,7 @@ void PlaceOrderRequest::InternalSwap(PlaceOrderRequest* other) { ::google::protobuf::Metadata PlaceOrderRequest::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_demo_2eproto_getter, &descriptor_table_demo_2eproto_once, - file_level_metadata_demo_2eproto[27]); + file_level_metadata_demo_2eproto[34]); } // =================================================================== @@ -8201,7 +9885,7 @@ void PlaceOrderResponse::InternalSwap(PlaceOrderResponse* other) { ::google::protobuf::Metadata PlaceOrderResponse::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_demo_2eproto_getter, &descriptor_table_demo_2eproto_once, - file_level_metadata_demo_2eproto[28]); + file_level_metadata_demo_2eproto[35]); } // =================================================================== @@ -8376,7 +10060,7 @@ void AdRequest::InternalSwap(AdRequest* other) { ::google::protobuf::Metadata AdRequest::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_demo_2eproto_getter, &descriptor_table_demo_2eproto_once, - file_level_metadata_demo_2eproto[29]); + file_level_metadata_demo_2eproto[36]); } // =================================================================== @@ -8548,7 +10232,7 @@ void AdResponse::InternalSwap(AdResponse* other) { ::google::protobuf::Metadata AdResponse::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_demo_2eproto_getter, &descriptor_table_demo_2eproto_once, - file_level_metadata_demo_2eproto[30]); + file_level_metadata_demo_2eproto[37]); } // =================================================================== @@ -8780,7 +10464,7 @@ void Ad::InternalSwap(Ad* other) { ::google::protobuf::Metadata Ad::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_demo_2eproto_getter, &descriptor_table_demo_2eproto_once, - file_level_metadata_demo_2eproto[31]); + file_level_metadata_demo_2eproto[38]); } // =================================================================== @@ -9039,7 +10723,7 @@ void Flag::InternalSwap(Flag* other) { ::google::protobuf::Metadata Flag::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_demo_2eproto_getter, &descriptor_table_demo_2eproto_once, - file_level_metadata_demo_2eproto[32]); + file_level_metadata_demo_2eproto[39]); } // =================================================================== @@ -9230,7 +10914,7 @@ void GetFlagRequest::InternalSwap(GetFlagRequest* other) { ::google::protobuf::Metadata GetFlagRequest::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_demo_2eproto_getter, &descriptor_table_demo_2eproto_once, - file_level_metadata_demo_2eproto[33]); + file_level_metadata_demo_2eproto[40]); } // =================================================================== @@ -9428,7 +11112,7 @@ void GetFlagResponse::InternalSwap(GetFlagResponse* other) { ::google::protobuf::Metadata GetFlagResponse::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_demo_2eproto_getter, &descriptor_table_demo_2eproto_once, - file_level_metadata_demo_2eproto[34]); + file_level_metadata_demo_2eproto[41]); } // =================================================================== @@ -9687,7 +11371,7 @@ void CreateFlagRequest::InternalSwap(CreateFlagRequest* other) { ::google::protobuf::Metadata CreateFlagRequest::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_demo_2eproto_getter, &descriptor_table_demo_2eproto_once, - file_level_metadata_demo_2eproto[35]); + file_level_metadata_demo_2eproto[42]); } // =================================================================== @@ -9885,7 +11569,7 @@ void CreateFlagResponse::InternalSwap(CreateFlagResponse* other) { ::google::protobuf::Metadata CreateFlagResponse::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_demo_2eproto_getter, &descriptor_table_demo_2eproto_once, - file_level_metadata_demo_2eproto[36]); + file_level_metadata_demo_2eproto[43]); } // =================================================================== @@ -10102,7 +11786,7 @@ void UpdateFlagRequest::InternalSwap(UpdateFlagRequest* other) { ::google::protobuf::Metadata UpdateFlagRequest::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_demo_2eproto_getter, &descriptor_table_demo_2eproto_once, - file_level_metadata_demo_2eproto[37]); + file_level_metadata_demo_2eproto[44]); } // =================================================================== @@ -10141,7 +11825,7 @@ const ::google::protobuf::Message::ClassData*UpdateFlagResponse::GetClassData() ::google::protobuf::Metadata UpdateFlagResponse::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_demo_2eproto_getter, &descriptor_table_demo_2eproto_once, - file_level_metadata_demo_2eproto[38]); + file_level_metadata_demo_2eproto[45]); } // =================================================================== @@ -10180,7 +11864,7 @@ const ::google::protobuf::Message::ClassData*ListFlagsRequest::GetClassData() co ::google::protobuf::Metadata ListFlagsRequest::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_demo_2eproto_getter, &descriptor_table_demo_2eproto_once, - file_level_metadata_demo_2eproto[39]); + file_level_metadata_demo_2eproto[46]); } // =================================================================== @@ -10352,7 +12036,7 @@ void ListFlagsResponse::InternalSwap(ListFlagsResponse* other) { ::google::protobuf::Metadata ListFlagsResponse::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_demo_2eproto_getter, &descriptor_table_demo_2eproto_once, - file_level_metadata_demo_2eproto[40]); + file_level_metadata_demo_2eproto[47]); } // =================================================================== @@ -10543,7 +12227,7 @@ void DeleteFlagRequest::InternalSwap(DeleteFlagRequest* other) { ::google::protobuf::Metadata DeleteFlagRequest::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_demo_2eproto_getter, &descriptor_table_demo_2eproto_once, - file_level_metadata_demo_2eproto[41]); + file_level_metadata_demo_2eproto[48]); } // =================================================================== @@ -10582,7 +12266,7 @@ const ::google::protobuf::Message::ClassData*DeleteFlagResponse::GetClassData() ::google::protobuf::Metadata DeleteFlagResponse::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_demo_2eproto_getter, &descriptor_table_demo_2eproto_once, - file_level_metadata_demo_2eproto[42]); + file_level_metadata_demo_2eproto[49]); } // @@protoc_insertion_point(namespace_scope) } // namespace oteldemo diff --git a/src/currency/build/generated/proto/demo.pb.h b/src/currency/build/generated/proto/demo.pb.h index c7174c17a6..46c5e62eb1 100644 --- a/src/currency/build/generated/proto/demo.pb.h +++ b/src/currency/build/generated/proto/demo.pb.h @@ -70,6 +70,12 @@ extern AddItemRequestDefaultTypeInternal _AddItemRequest_default_instance_; class Address; struct AddressDefaultTypeInternal; extern AddressDefaultTypeInternal _Address_default_instance_; +class AskProductAIAssistantRequest; +struct AskProductAIAssistantRequestDefaultTypeInternal; +extern AskProductAIAssistantRequestDefaultTypeInternal _AskProductAIAssistantRequest_default_instance_; +class AskProductAIAssistantResponse; +struct AskProductAIAssistantResponseDefaultTypeInternal; +extern AskProductAIAssistantResponseDefaultTypeInternal _AskProductAIAssistantResponse_default_instance_; class Cart; struct CartDefaultTypeInternal; extern CartDefaultTypeInternal _Cart_default_instance_; @@ -109,6 +115,12 @@ extern EmptyCartRequestDefaultTypeInternal _EmptyCartRequest_default_instance_; class Flag; struct FlagDefaultTypeInternal; extern FlagDefaultTypeInternal _Flag_default_instance_; +class GetAverageProductReviewScoreRequest; +struct GetAverageProductReviewScoreRequestDefaultTypeInternal; +extern GetAverageProductReviewScoreRequestDefaultTypeInternal _GetAverageProductReviewScoreRequest_default_instance_; +class GetAverageProductReviewScoreResponse; +struct GetAverageProductReviewScoreResponseDefaultTypeInternal; +extern GetAverageProductReviewScoreResponseDefaultTypeInternal _GetAverageProductReviewScoreResponse_default_instance_; class GetCartRequest; struct GetCartRequestDefaultTypeInternal; extern GetCartRequestDefaultTypeInternal _GetCartRequest_default_instance_; @@ -121,6 +133,12 @@ extern GetFlagResponseDefaultTypeInternal _GetFlagResponse_default_instance_; class GetProductRequest; struct GetProductRequestDefaultTypeInternal; extern GetProductRequestDefaultTypeInternal _GetProductRequest_default_instance_; +class GetProductReviewsRequest; +struct GetProductReviewsRequestDefaultTypeInternal; +extern GetProductReviewsRequestDefaultTypeInternal _GetProductReviewsRequest_default_instance_; +class GetProductReviewsResponse; +struct GetProductReviewsResponseDefaultTypeInternal; +extern GetProductReviewsResponseDefaultTypeInternal _GetProductReviewsResponse_default_instance_; class GetQuoteRequest; struct GetQuoteRequestDefaultTypeInternal; extern GetQuoteRequestDefaultTypeInternal _GetQuoteRequest_default_instance_; @@ -163,6 +181,9 @@ extern PlaceOrderResponseDefaultTypeInternal _PlaceOrderResponse_default_instanc class Product; struct ProductDefaultTypeInternal; extern ProductDefaultTypeInternal _Product_default_instance_; +class ProductReview; +struct ProductReviewDefaultTypeInternal; +extern ProductReviewDefaultTypeInternal _ProductReview_default_instance_; class SearchProductsRequest; struct SearchProductsRequestDefaultTypeInternal; extern SearchProductsRequestDefaultTypeInternal _SearchProductsRequest_default_instance_; @@ -2488,25 +2509,25 @@ class SearchProductsResponse final : friend struct ::TableStruct_demo_2eproto; };// ------------------------------------------------------------------- -class GetQuoteRequest final : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:oteldemo.GetQuoteRequest) */ { +class ProductReview final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:oteldemo.ProductReview) */ { public: - inline GetQuoteRequest() : GetQuoteRequest(nullptr) {} - ~GetQuoteRequest() override; + inline ProductReview() : ProductReview(nullptr) {} + ~ProductReview() override; template - explicit PROTOBUF_CONSTEXPR GetQuoteRequest(::google::protobuf::internal::ConstantInitialized); + explicit PROTOBUF_CONSTEXPR ProductReview(::google::protobuf::internal::ConstantInitialized); - GetQuoteRequest(const GetQuoteRequest& from); - GetQuoteRequest(GetQuoteRequest&& from) noexcept - : GetQuoteRequest() { + ProductReview(const ProductReview& from); + ProductReview(ProductReview&& from) noexcept + : ProductReview() { *this = ::std::move(from); } - inline GetQuoteRequest& operator=(const GetQuoteRequest& from) { + inline ProductReview& operator=(const ProductReview& from) { CopyFrom(from); return *this; } - inline GetQuoteRequest& operator=(GetQuoteRequest&& from) noexcept { + inline ProductReview& operator=(ProductReview&& from) noexcept { if (this == &from) return *this; if (GetOwningArena() == from.GetOwningArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE @@ -2536,20 +2557,20 @@ class GetQuoteRequest final : static const ::google::protobuf::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } - static const GetQuoteRequest& default_instance() { + static const ProductReview& default_instance() { return *internal_default_instance(); } - static inline const GetQuoteRequest* internal_default_instance() { - return reinterpret_cast( - &_GetQuoteRequest_default_instance_); + static inline const ProductReview* internal_default_instance() { + return reinterpret_cast( + &_ProductReview_default_instance_); } static constexpr int kIndexInFileMessages = 13; - friend void swap(GetQuoteRequest& a, GetQuoteRequest& b) { + friend void swap(ProductReview& a, ProductReview& b) { a.Swap(&b); } - inline void Swap(GetQuoteRequest* other) { + inline void Swap(ProductReview* other) { if (other == this) return; #ifdef PROTOBUF_FORCE_COPY_IN_SWAP if (GetOwningArena() != nullptr && @@ -2562,7 +2583,7 @@ class GetQuoteRequest final : ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(GetQuoteRequest* other) { + void UnsafeArenaSwap(ProductReview* other) { if (other == this) return; ABSL_DCHECK(GetOwningArena() == other->GetOwningArena()); InternalSwap(other); @@ -2570,14 +2591,14 @@ class GetQuoteRequest final : // implements Message ---------------------------------------------- - GetQuoteRequest* New(::google::protobuf::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); + ProductReview* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); } using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const GetQuoteRequest& from); + void CopyFrom(const ProductReview& from); using ::google::protobuf::Message::MergeFrom; - void MergeFrom( const GetQuoteRequest& from) { - GetQuoteRequest::MergeImpl(*this, from); + void MergeFrom( const ProductReview& from) { + ProductReview::MergeImpl(*this, from); } private: static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg); @@ -2595,15 +2616,15 @@ class GetQuoteRequest final : void SharedCtor(::google::protobuf::Arena* arena); void SharedDtor(); void SetCachedSize(int size) const final; - void InternalSwap(GetQuoteRequest* other); + void InternalSwap(ProductReview* other); private: friend class ::google::protobuf::internal::AnyMetadata; static ::absl::string_view FullMessageName() { - return "oteldemo.GetQuoteRequest"; + return "oteldemo.ProductReview"; } protected: - explicit GetQuoteRequest(::google::protobuf::Arena* arena); + explicit ProductReview(::google::protobuf::Arena* arena); public: static const ClassData _class_data_; @@ -2616,81 +2637,97 @@ class GetQuoteRequest final : // accessors ------------------------------------------------------- enum : int { - kItemsFieldNumber = 2, - kAddressFieldNumber = 1, + kUsernameFieldNumber = 1, + kDescriptionFieldNumber = 2, + kScoreFieldNumber = 3, }; - // repeated .oteldemo.CartItem items = 2; - int items_size() const; + // string username = 1; + void clear_username() ; + const std::string& username() const; + template + void set_username(Arg_&& arg, Args_... args); + std::string* mutable_username(); + PROTOBUF_NODISCARD std::string* release_username(); + void set_allocated_username(std::string* ptr); + private: - int _internal_items_size() const; + const std::string& _internal_username() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_username( + const std::string& value); + std::string* _internal_mutable_username(); public: - void clear_items() ; - ::oteldemo::CartItem* mutable_items(int index); - ::google::protobuf::RepeatedPtrField< ::oteldemo::CartItem >* - mutable_items(); + // string description = 2; + void clear_description() ; + const std::string& description() const; + template + void set_description(Arg_&& arg, Args_... args); + std::string* mutable_description(); + PROTOBUF_NODISCARD std::string* release_description(); + void set_allocated_description(std::string* ptr); + private: - const ::google::protobuf::RepeatedPtrField<::oteldemo::CartItem>& _internal_items() const; - ::google::protobuf::RepeatedPtrField<::oteldemo::CartItem>* _internal_mutable_items(); + const std::string& _internal_description() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_description( + const std::string& value); + std::string* _internal_mutable_description(); + public: - const ::oteldemo::CartItem& items(int index) const; - ::oteldemo::CartItem* add_items(); - const ::google::protobuf::RepeatedPtrField< ::oteldemo::CartItem >& - items() const; - // .oteldemo.Address address = 1; - bool has_address() const; - void clear_address() ; - const ::oteldemo::Address& address() const; - PROTOBUF_NODISCARD ::oteldemo::Address* release_address(); - ::oteldemo::Address* mutable_address(); - void set_allocated_address(::oteldemo::Address* value); - void unsafe_arena_set_allocated_address(::oteldemo::Address* value); - ::oteldemo::Address* unsafe_arena_release_address(); + // string score = 3; + void clear_score() ; + const std::string& score() const; + template + void set_score(Arg_&& arg, Args_... args); + std::string* mutable_score(); + PROTOBUF_NODISCARD std::string* release_score(); + void set_allocated_score(std::string* ptr); private: - const ::oteldemo::Address& _internal_address() const; - ::oteldemo::Address* _internal_mutable_address(); + const std::string& _internal_score() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_score( + const std::string& value); + std::string* _internal_mutable_score(); public: - // @@protoc_insertion_point(class_scope:oteldemo.GetQuoteRequest) + // @@protoc_insertion_point(class_scope:oteldemo.ProductReview) private: class _Internal; friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<1, 2, 2, 0, 2> _table_; + static const ::google::protobuf::internal::TcParseTable<2, 3, 0, 55, 2> _table_; template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; struct Impl_ { - ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::ArenaStringPtr username_; + ::google::protobuf::internal::ArenaStringPtr description_; + ::google::protobuf::internal::ArenaStringPtr score_; mutable ::google::protobuf::internal::CachedSize _cached_size_; - ::google::protobuf::RepeatedPtrField< ::oteldemo::CartItem > items_; - ::oteldemo::Address* address_; PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_demo_2eproto; };// ------------------------------------------------------------------- -class GetQuoteResponse final : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:oteldemo.GetQuoteResponse) */ { +class GetProductReviewsRequest final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:oteldemo.GetProductReviewsRequest) */ { public: - inline GetQuoteResponse() : GetQuoteResponse(nullptr) {} - ~GetQuoteResponse() override; + inline GetProductReviewsRequest() : GetProductReviewsRequest(nullptr) {} + ~GetProductReviewsRequest() override; template - explicit PROTOBUF_CONSTEXPR GetQuoteResponse(::google::protobuf::internal::ConstantInitialized); + explicit PROTOBUF_CONSTEXPR GetProductReviewsRequest(::google::protobuf::internal::ConstantInitialized); - GetQuoteResponse(const GetQuoteResponse& from); - GetQuoteResponse(GetQuoteResponse&& from) noexcept - : GetQuoteResponse() { + GetProductReviewsRequest(const GetProductReviewsRequest& from); + GetProductReviewsRequest(GetProductReviewsRequest&& from) noexcept + : GetProductReviewsRequest() { *this = ::std::move(from); } - inline GetQuoteResponse& operator=(const GetQuoteResponse& from) { + inline GetProductReviewsRequest& operator=(const GetProductReviewsRequest& from) { CopyFrom(from); return *this; } - inline GetQuoteResponse& operator=(GetQuoteResponse&& from) noexcept { + inline GetProductReviewsRequest& operator=(GetProductReviewsRequest&& from) noexcept { if (this == &from) return *this; if (GetOwningArena() == from.GetOwningArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE @@ -2720,20 +2757,20 @@ class GetQuoteResponse final : static const ::google::protobuf::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } - static const GetQuoteResponse& default_instance() { + static const GetProductReviewsRequest& default_instance() { return *internal_default_instance(); } - static inline const GetQuoteResponse* internal_default_instance() { - return reinterpret_cast( - &_GetQuoteResponse_default_instance_); + static inline const GetProductReviewsRequest* internal_default_instance() { + return reinterpret_cast( + &_GetProductReviewsRequest_default_instance_); } static constexpr int kIndexInFileMessages = 14; - friend void swap(GetQuoteResponse& a, GetQuoteResponse& b) { + friend void swap(GetProductReviewsRequest& a, GetProductReviewsRequest& b) { a.Swap(&b); } - inline void Swap(GetQuoteResponse* other) { + inline void Swap(GetProductReviewsRequest* other) { if (other == this) return; #ifdef PROTOBUF_FORCE_COPY_IN_SWAP if (GetOwningArena() != nullptr && @@ -2746,7 +2783,7 @@ class GetQuoteResponse final : ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(GetQuoteResponse* other) { + void UnsafeArenaSwap(GetProductReviewsRequest* other) { if (other == this) return; ABSL_DCHECK(GetOwningArena() == other->GetOwningArena()); InternalSwap(other); @@ -2754,14 +2791,14 @@ class GetQuoteResponse final : // implements Message ---------------------------------------------- - GetQuoteResponse* New(::google::protobuf::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); + GetProductReviewsRequest* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); } using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const GetQuoteResponse& from); + void CopyFrom(const GetProductReviewsRequest& from); using ::google::protobuf::Message::MergeFrom; - void MergeFrom( const GetQuoteResponse& from) { - GetQuoteResponse::MergeImpl(*this, from); + void MergeFrom( const GetProductReviewsRequest& from) { + GetProductReviewsRequest::MergeImpl(*this, from); } private: static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg); @@ -2779,15 +2816,15 @@ class GetQuoteResponse final : void SharedCtor(::google::protobuf::Arena* arena); void SharedDtor(); void SetCachedSize(int size) const final; - void InternalSwap(GetQuoteResponse* other); + void InternalSwap(GetProductReviewsRequest* other); private: friend class ::google::protobuf::internal::AnyMetadata; static ::absl::string_view FullMessageName() { - return "oteldemo.GetQuoteResponse"; + return "oteldemo.GetProductReviewsRequest"; } protected: - explicit GetQuoteResponse(::google::protobuf::Arena* arena); + explicit GetProductReviewsRequest(::google::protobuf::Arena* arena); public: static const ClassData _class_data_; @@ -2800,61 +2837,61 @@ class GetQuoteResponse final : // accessors ------------------------------------------------------- enum : int { - kCostUsdFieldNumber = 1, + kProductIdFieldNumber = 1, }; - // .oteldemo.Money cost_usd = 1; - bool has_cost_usd() const; - void clear_cost_usd() ; - const ::oteldemo::Money& cost_usd() const; - PROTOBUF_NODISCARD ::oteldemo::Money* release_cost_usd(); - ::oteldemo::Money* mutable_cost_usd(); - void set_allocated_cost_usd(::oteldemo::Money* value); - void unsafe_arena_set_allocated_cost_usd(::oteldemo::Money* value); - ::oteldemo::Money* unsafe_arena_release_cost_usd(); + // string product_id = 1; + void clear_product_id() ; + const std::string& product_id() const; + template + void set_product_id(Arg_&& arg, Args_... args); + std::string* mutable_product_id(); + PROTOBUF_NODISCARD std::string* release_product_id(); + void set_allocated_product_id(std::string* ptr); private: - const ::oteldemo::Money& _internal_cost_usd() const; - ::oteldemo::Money* _internal_mutable_cost_usd(); + const std::string& _internal_product_id() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_product_id( + const std::string& value); + std::string* _internal_mutable_product_id(); public: - // @@protoc_insertion_point(class_scope:oteldemo.GetQuoteResponse) + // @@protoc_insertion_point(class_scope:oteldemo.GetProductReviewsRequest) private: class _Internal; friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<0, 1, 1, 0, 2> _table_; + static const ::google::protobuf::internal::TcParseTable<0, 1, 0, 52, 2> _table_; template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; struct Impl_ { - ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::ArenaStringPtr product_id_; mutable ::google::protobuf::internal::CachedSize _cached_size_; - ::oteldemo::Money* cost_usd_; PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_demo_2eproto; };// ------------------------------------------------------------------- -class ShipOrderRequest final : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:oteldemo.ShipOrderRequest) */ { +class GetProductReviewsResponse final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:oteldemo.GetProductReviewsResponse) */ { public: - inline ShipOrderRequest() : ShipOrderRequest(nullptr) {} - ~ShipOrderRequest() override; + inline GetProductReviewsResponse() : GetProductReviewsResponse(nullptr) {} + ~GetProductReviewsResponse() override; template - explicit PROTOBUF_CONSTEXPR ShipOrderRequest(::google::protobuf::internal::ConstantInitialized); + explicit PROTOBUF_CONSTEXPR GetProductReviewsResponse(::google::protobuf::internal::ConstantInitialized); - ShipOrderRequest(const ShipOrderRequest& from); - ShipOrderRequest(ShipOrderRequest&& from) noexcept - : ShipOrderRequest() { + GetProductReviewsResponse(const GetProductReviewsResponse& from); + GetProductReviewsResponse(GetProductReviewsResponse&& from) noexcept + : GetProductReviewsResponse() { *this = ::std::move(from); } - inline ShipOrderRequest& operator=(const ShipOrderRequest& from) { + inline GetProductReviewsResponse& operator=(const GetProductReviewsResponse& from) { CopyFrom(from); return *this; } - inline ShipOrderRequest& operator=(ShipOrderRequest&& from) noexcept { + inline GetProductReviewsResponse& operator=(GetProductReviewsResponse&& from) noexcept { if (this == &from) return *this; if (GetOwningArena() == from.GetOwningArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE @@ -2884,20 +2921,20 @@ class ShipOrderRequest final : static const ::google::protobuf::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } - static const ShipOrderRequest& default_instance() { + static const GetProductReviewsResponse& default_instance() { return *internal_default_instance(); } - static inline const ShipOrderRequest* internal_default_instance() { - return reinterpret_cast( - &_ShipOrderRequest_default_instance_); + static inline const GetProductReviewsResponse* internal_default_instance() { + return reinterpret_cast( + &_GetProductReviewsResponse_default_instance_); } static constexpr int kIndexInFileMessages = 15; - friend void swap(ShipOrderRequest& a, ShipOrderRequest& b) { + friend void swap(GetProductReviewsResponse& a, GetProductReviewsResponse& b) { a.Swap(&b); } - inline void Swap(ShipOrderRequest* other) { + inline void Swap(GetProductReviewsResponse* other) { if (other == this) return; #ifdef PROTOBUF_FORCE_COPY_IN_SWAP if (GetOwningArena() != nullptr && @@ -2910,7 +2947,7 @@ class ShipOrderRequest final : ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(ShipOrderRequest* other) { + void UnsafeArenaSwap(GetProductReviewsResponse* other) { if (other == this) return; ABSL_DCHECK(GetOwningArena() == other->GetOwningArena()); InternalSwap(other); @@ -2918,14 +2955,14 @@ class ShipOrderRequest final : // implements Message ---------------------------------------------- - ShipOrderRequest* New(::google::protobuf::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); + GetProductReviewsResponse* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); } using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const ShipOrderRequest& from); + void CopyFrom(const GetProductReviewsResponse& from); using ::google::protobuf::Message::MergeFrom; - void MergeFrom( const ShipOrderRequest& from) { - ShipOrderRequest::MergeImpl(*this, from); + void MergeFrom( const GetProductReviewsResponse& from) { + GetProductReviewsResponse::MergeImpl(*this, from); } private: static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg); @@ -2943,15 +2980,15 @@ class ShipOrderRequest final : void SharedCtor(::google::protobuf::Arena* arena); void SharedDtor(); void SetCachedSize(int size) const final; - void InternalSwap(ShipOrderRequest* other); + void InternalSwap(GetProductReviewsResponse* other); private: friend class ::google::protobuf::internal::AnyMetadata; static ::absl::string_view FullMessageName() { - return "oteldemo.ShipOrderRequest"; + return "oteldemo.GetProductReviewsResponse"; } protected: - explicit ShipOrderRequest(::google::protobuf::Arena* arena); + explicit GetProductReviewsResponse(::google::protobuf::Arena* arena); public: static const ClassData _class_data_; @@ -2964,81 +3001,63 @@ class ShipOrderRequest final : // accessors ------------------------------------------------------- enum : int { - kItemsFieldNumber = 2, - kAddressFieldNumber = 1, + kProductReviewsFieldNumber = 1, }; - // repeated .oteldemo.CartItem items = 2; - int items_size() const; + // repeated .oteldemo.ProductReview product_reviews = 1; + int product_reviews_size() const; private: - int _internal_items_size() const; + int _internal_product_reviews_size() const; public: - void clear_items() ; - ::oteldemo::CartItem* mutable_items(int index); - ::google::protobuf::RepeatedPtrField< ::oteldemo::CartItem >* - mutable_items(); - private: - const ::google::protobuf::RepeatedPtrField<::oteldemo::CartItem>& _internal_items() const; - ::google::protobuf::RepeatedPtrField<::oteldemo::CartItem>* _internal_mutable_items(); - public: - const ::oteldemo::CartItem& items(int index) const; - ::oteldemo::CartItem* add_items(); - const ::google::protobuf::RepeatedPtrField< ::oteldemo::CartItem >& - items() const; - // .oteldemo.Address address = 1; - bool has_address() const; - void clear_address() ; - const ::oteldemo::Address& address() const; - PROTOBUF_NODISCARD ::oteldemo::Address* release_address(); - ::oteldemo::Address* mutable_address(); - void set_allocated_address(::oteldemo::Address* value); - void unsafe_arena_set_allocated_address(::oteldemo::Address* value); - ::oteldemo::Address* unsafe_arena_release_address(); - + void clear_product_reviews() ; + ::oteldemo::ProductReview* mutable_product_reviews(int index); + ::google::protobuf::RepeatedPtrField< ::oteldemo::ProductReview >* + mutable_product_reviews(); private: - const ::oteldemo::Address& _internal_address() const; - ::oteldemo::Address* _internal_mutable_address(); - + const ::google::protobuf::RepeatedPtrField<::oteldemo::ProductReview>& _internal_product_reviews() const; + ::google::protobuf::RepeatedPtrField<::oteldemo::ProductReview>* _internal_mutable_product_reviews(); public: - // @@protoc_insertion_point(class_scope:oteldemo.ShipOrderRequest) + const ::oteldemo::ProductReview& product_reviews(int index) const; + ::oteldemo::ProductReview* add_product_reviews(); + const ::google::protobuf::RepeatedPtrField< ::oteldemo::ProductReview >& + product_reviews() const; + // @@protoc_insertion_point(class_scope:oteldemo.GetProductReviewsResponse) private: class _Internal; friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<1, 2, 2, 0, 2> _table_; + static const ::google::protobuf::internal::TcParseTable<0, 1, 1, 0, 2> _table_; template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; struct Impl_ { - ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::RepeatedPtrField< ::oteldemo::ProductReview > product_reviews_; mutable ::google::protobuf::internal::CachedSize _cached_size_; - ::google::protobuf::RepeatedPtrField< ::oteldemo::CartItem > items_; - ::oteldemo::Address* address_; PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_demo_2eproto; };// ------------------------------------------------------------------- -class ShipOrderResponse final : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:oteldemo.ShipOrderResponse) */ { +class GetAverageProductReviewScoreRequest final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:oteldemo.GetAverageProductReviewScoreRequest) */ { public: - inline ShipOrderResponse() : ShipOrderResponse(nullptr) {} - ~ShipOrderResponse() override; + inline GetAverageProductReviewScoreRequest() : GetAverageProductReviewScoreRequest(nullptr) {} + ~GetAverageProductReviewScoreRequest() override; template - explicit PROTOBUF_CONSTEXPR ShipOrderResponse(::google::protobuf::internal::ConstantInitialized); + explicit PROTOBUF_CONSTEXPR GetAverageProductReviewScoreRequest(::google::protobuf::internal::ConstantInitialized); - ShipOrderResponse(const ShipOrderResponse& from); - ShipOrderResponse(ShipOrderResponse&& from) noexcept - : ShipOrderResponse() { + GetAverageProductReviewScoreRequest(const GetAverageProductReviewScoreRequest& from); + GetAverageProductReviewScoreRequest(GetAverageProductReviewScoreRequest&& from) noexcept + : GetAverageProductReviewScoreRequest() { *this = ::std::move(from); } - inline ShipOrderResponse& operator=(const ShipOrderResponse& from) { + inline GetAverageProductReviewScoreRequest& operator=(const GetAverageProductReviewScoreRequest& from) { CopyFrom(from); return *this; } - inline ShipOrderResponse& operator=(ShipOrderResponse&& from) noexcept { + inline GetAverageProductReviewScoreRequest& operator=(GetAverageProductReviewScoreRequest&& from) noexcept { if (this == &from) return *this; if (GetOwningArena() == from.GetOwningArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE @@ -3068,20 +3087,20 @@ class ShipOrderResponse final : static const ::google::protobuf::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } - static const ShipOrderResponse& default_instance() { + static const GetAverageProductReviewScoreRequest& default_instance() { return *internal_default_instance(); } - static inline const ShipOrderResponse* internal_default_instance() { - return reinterpret_cast( - &_ShipOrderResponse_default_instance_); + static inline const GetAverageProductReviewScoreRequest* internal_default_instance() { + return reinterpret_cast( + &_GetAverageProductReviewScoreRequest_default_instance_); } static constexpr int kIndexInFileMessages = 16; - friend void swap(ShipOrderResponse& a, ShipOrderResponse& b) { + friend void swap(GetAverageProductReviewScoreRequest& a, GetAverageProductReviewScoreRequest& b) { a.Swap(&b); } - inline void Swap(ShipOrderResponse* other) { + inline void Swap(GetAverageProductReviewScoreRequest* other) { if (other == this) return; #ifdef PROTOBUF_FORCE_COPY_IN_SWAP if (GetOwningArena() != nullptr && @@ -3094,7 +3113,7 @@ class ShipOrderResponse final : ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(ShipOrderResponse* other) { + void UnsafeArenaSwap(GetAverageProductReviewScoreRequest* other) { if (other == this) return; ABSL_DCHECK(GetOwningArena() == other->GetOwningArena()); InternalSwap(other); @@ -3102,14 +3121,14 @@ class ShipOrderResponse final : // implements Message ---------------------------------------------- - ShipOrderResponse* New(::google::protobuf::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); + GetAverageProductReviewScoreRequest* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); } using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const ShipOrderResponse& from); + void CopyFrom(const GetAverageProductReviewScoreRequest& from); using ::google::protobuf::Message::MergeFrom; - void MergeFrom( const ShipOrderResponse& from) { - ShipOrderResponse::MergeImpl(*this, from); + void MergeFrom( const GetAverageProductReviewScoreRequest& from) { + GetAverageProductReviewScoreRequest::MergeImpl(*this, from); } private: static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg); @@ -3127,15 +3146,15 @@ class ShipOrderResponse final : void SharedCtor(::google::protobuf::Arena* arena); void SharedDtor(); void SetCachedSize(int size) const final; - void InternalSwap(ShipOrderResponse* other); + void InternalSwap(GetAverageProductReviewScoreRequest* other); private: friend class ::google::protobuf::internal::AnyMetadata; static ::absl::string_view FullMessageName() { - return "oteldemo.ShipOrderResponse"; + return "oteldemo.GetAverageProductReviewScoreRequest"; } protected: - explicit ShipOrderResponse(::google::protobuf::Arena* arena); + explicit GetAverageProductReviewScoreRequest(::google::protobuf::Arena* arena); public: static const ClassData _class_data_; @@ -3148,35 +3167,35 @@ class ShipOrderResponse final : // accessors ------------------------------------------------------- enum : int { - kTrackingIdFieldNumber = 1, + kProductIdFieldNumber = 1, }; - // string tracking_id = 1; - void clear_tracking_id() ; - const std::string& tracking_id() const; + // string product_id = 1; + void clear_product_id() ; + const std::string& product_id() const; template - void set_tracking_id(Arg_&& arg, Args_... args); - std::string* mutable_tracking_id(); - PROTOBUF_NODISCARD std::string* release_tracking_id(); - void set_allocated_tracking_id(std::string* ptr); + void set_product_id(Arg_&& arg, Args_... args); + std::string* mutable_product_id(); + PROTOBUF_NODISCARD std::string* release_product_id(); + void set_allocated_product_id(std::string* ptr); private: - const std::string& _internal_tracking_id() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_tracking_id( + const std::string& _internal_product_id() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_product_id( const std::string& value); - std::string* _internal_mutable_tracking_id(); + std::string* _internal_mutable_product_id(); public: - // @@protoc_insertion_point(class_scope:oteldemo.ShipOrderResponse) + // @@protoc_insertion_point(class_scope:oteldemo.GetAverageProductReviewScoreRequest) private: class _Internal; friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<0, 1, 0, 46, 2> _table_; + static const ::google::protobuf::internal::TcParseTable<0, 1, 0, 63, 2> _table_; template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; struct Impl_ { - ::google::protobuf::internal::ArenaStringPtr tracking_id_; + ::google::protobuf::internal::ArenaStringPtr product_id_; mutable ::google::protobuf::internal::CachedSize _cached_size_; PROTOBUF_TSAN_DECLARE_MEMBER }; @@ -3184,25 +3203,25 @@ class ShipOrderResponse final : friend struct ::TableStruct_demo_2eproto; };// ------------------------------------------------------------------- -class Address final : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:oteldemo.Address) */ { +class GetAverageProductReviewScoreResponse final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:oteldemo.GetAverageProductReviewScoreResponse) */ { public: - inline Address() : Address(nullptr) {} - ~Address() override; + inline GetAverageProductReviewScoreResponse() : GetAverageProductReviewScoreResponse(nullptr) {} + ~GetAverageProductReviewScoreResponse() override; template - explicit PROTOBUF_CONSTEXPR Address(::google::protobuf::internal::ConstantInitialized); + explicit PROTOBUF_CONSTEXPR GetAverageProductReviewScoreResponse(::google::protobuf::internal::ConstantInitialized); - Address(const Address& from); - Address(Address&& from) noexcept - : Address() { + GetAverageProductReviewScoreResponse(const GetAverageProductReviewScoreResponse& from); + GetAverageProductReviewScoreResponse(GetAverageProductReviewScoreResponse&& from) noexcept + : GetAverageProductReviewScoreResponse() { *this = ::std::move(from); } - inline Address& operator=(const Address& from) { + inline GetAverageProductReviewScoreResponse& operator=(const GetAverageProductReviewScoreResponse& from) { CopyFrom(from); return *this; } - inline Address& operator=(Address&& from) noexcept { + inline GetAverageProductReviewScoreResponse& operator=(GetAverageProductReviewScoreResponse&& from) noexcept { if (this == &from) return *this; if (GetOwningArena() == from.GetOwningArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE @@ -3232,20 +3251,20 @@ class Address final : static const ::google::protobuf::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } - static const Address& default_instance() { + static const GetAverageProductReviewScoreResponse& default_instance() { return *internal_default_instance(); } - static inline const Address* internal_default_instance() { - return reinterpret_cast( - &_Address_default_instance_); + static inline const GetAverageProductReviewScoreResponse* internal_default_instance() { + return reinterpret_cast( + &_GetAverageProductReviewScoreResponse_default_instance_); } static constexpr int kIndexInFileMessages = 17; - friend void swap(Address& a, Address& b) { + friend void swap(GetAverageProductReviewScoreResponse& a, GetAverageProductReviewScoreResponse& b) { a.Swap(&b); } - inline void Swap(Address* other) { + inline void Swap(GetAverageProductReviewScoreResponse* other) { if (other == this) return; #ifdef PROTOBUF_FORCE_COPY_IN_SWAP if (GetOwningArena() != nullptr && @@ -3258,7 +3277,7 @@ class Address final : ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(Address* other) { + void UnsafeArenaSwap(GetAverageProductReviewScoreResponse* other) { if (other == this) return; ABSL_DCHECK(GetOwningArena() == other->GetOwningArena()); InternalSwap(other); @@ -3266,14 +3285,14 @@ class Address final : // implements Message ---------------------------------------------- - Address* New(::google::protobuf::Arena* arena = nullptr) const final { - return CreateMaybeMessage
(arena); + GetAverageProductReviewScoreResponse* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); } using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const Address& from); + void CopyFrom(const GetAverageProductReviewScoreResponse& from); using ::google::protobuf::Message::MergeFrom; - void MergeFrom( const Address& from) { - Address::MergeImpl(*this, from); + void MergeFrom( const GetAverageProductReviewScoreResponse& from) { + GetAverageProductReviewScoreResponse::MergeImpl(*this, from); } private: static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg); @@ -3291,15 +3310,15 @@ class Address final : void SharedCtor(::google::protobuf::Arena* arena); void SharedDtor(); void SetCachedSize(int size) const final; - void InternalSwap(Address* other); + void InternalSwap(GetAverageProductReviewScoreResponse* other); private: friend class ::google::protobuf::internal::AnyMetadata; static ::absl::string_view FullMessageName() { - return "oteldemo.Address"; + return "oteldemo.GetAverageProductReviewScoreResponse"; } protected: - explicit Address(::google::protobuf::Arena* arena); + explicit GetAverageProductReviewScoreResponse(::google::protobuf::Arena* arena); public: static const ClassData _class_data_; @@ -3312,107 +3331,35 @@ class Address final : // accessors ------------------------------------------------------- enum : int { - kStreetAddressFieldNumber = 1, - kCityFieldNumber = 2, - kStateFieldNumber = 3, - kCountryFieldNumber = 4, - kZipCodeFieldNumber = 5, + kAverageScoreFieldNumber = 1, }; - // string street_address = 1; - void clear_street_address() ; - const std::string& street_address() const; - template - void set_street_address(Arg_&& arg, Args_... args); - std::string* mutable_street_address(); - PROTOBUF_NODISCARD std::string* release_street_address(); - void set_allocated_street_address(std::string* ptr); - - private: - const std::string& _internal_street_address() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_street_address( - const std::string& value); - std::string* _internal_mutable_street_address(); - - public: - // string city = 2; - void clear_city() ; - const std::string& city() const; - template - void set_city(Arg_&& arg, Args_... args); - std::string* mutable_city(); - PROTOBUF_NODISCARD std::string* release_city(); - void set_allocated_city(std::string* ptr); - - private: - const std::string& _internal_city() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_city( - const std::string& value); - std::string* _internal_mutable_city(); - - public: - // string state = 3; - void clear_state() ; - const std::string& state() const; - template - void set_state(Arg_&& arg, Args_... args); - std::string* mutable_state(); - PROTOBUF_NODISCARD std::string* release_state(); - void set_allocated_state(std::string* ptr); - - private: - const std::string& _internal_state() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_state( - const std::string& value); - std::string* _internal_mutable_state(); - - public: - // string country = 4; - void clear_country() ; - const std::string& country() const; - template - void set_country(Arg_&& arg, Args_... args); - std::string* mutable_country(); - PROTOBUF_NODISCARD std::string* release_country(); - void set_allocated_country(std::string* ptr); - - private: - const std::string& _internal_country() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_country( - const std::string& value); - std::string* _internal_mutable_country(); - - public: - // string zip_code = 5; - void clear_zip_code() ; - const std::string& zip_code() const; + // string average_score = 1; + void clear_average_score() ; + const std::string& average_score() const; template - void set_zip_code(Arg_&& arg, Args_... args); - std::string* mutable_zip_code(); - PROTOBUF_NODISCARD std::string* release_zip_code(); - void set_allocated_zip_code(std::string* ptr); + void set_average_score(Arg_&& arg, Args_... args); + std::string* mutable_average_score(); + PROTOBUF_NODISCARD std::string* release_average_score(); + void set_allocated_average_score(std::string* ptr); private: - const std::string& _internal_zip_code() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_zip_code( + const std::string& _internal_average_score() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_average_score( const std::string& value); - std::string* _internal_mutable_zip_code(); + std::string* _internal_mutable_average_score(); public: - // @@protoc_insertion_point(class_scope:oteldemo.Address) + // @@protoc_insertion_point(class_scope:oteldemo.GetAverageProductReviewScoreResponse) private: class _Internal; friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<3, 5, 0, 63, 2> _table_; + static const ::google::protobuf::internal::TcParseTable<0, 1, 0, 67, 2> _table_; template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; struct Impl_ { - ::google::protobuf::internal::ArenaStringPtr street_address_; - ::google::protobuf::internal::ArenaStringPtr city_; - ::google::protobuf::internal::ArenaStringPtr state_; - ::google::protobuf::internal::ArenaStringPtr country_; - ::google::protobuf::internal::ArenaStringPtr zip_code_; + ::google::protobuf::internal::ArenaStringPtr average_score_; mutable ::google::protobuf::internal::CachedSize _cached_size_; PROTOBUF_TSAN_DECLARE_MEMBER }; @@ -3420,25 +3367,25 @@ class Address final : friend struct ::TableStruct_demo_2eproto; };// ------------------------------------------------------------------- -class Money final : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:oteldemo.Money) */ { +class AskProductAIAssistantRequest final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:oteldemo.AskProductAIAssistantRequest) */ { public: - inline Money() : Money(nullptr) {} - ~Money() override; + inline AskProductAIAssistantRequest() : AskProductAIAssistantRequest(nullptr) {} + ~AskProductAIAssistantRequest() override; template - explicit PROTOBUF_CONSTEXPR Money(::google::protobuf::internal::ConstantInitialized); + explicit PROTOBUF_CONSTEXPR AskProductAIAssistantRequest(::google::protobuf::internal::ConstantInitialized); - Money(const Money& from); - Money(Money&& from) noexcept - : Money() { + AskProductAIAssistantRequest(const AskProductAIAssistantRequest& from); + AskProductAIAssistantRequest(AskProductAIAssistantRequest&& from) noexcept + : AskProductAIAssistantRequest() { *this = ::std::move(from); } - inline Money& operator=(const Money& from) { + inline AskProductAIAssistantRequest& operator=(const AskProductAIAssistantRequest& from) { CopyFrom(from); return *this; } - inline Money& operator=(Money&& from) noexcept { + inline AskProductAIAssistantRequest& operator=(AskProductAIAssistantRequest&& from) noexcept { if (this == &from) return *this; if (GetOwningArena() == from.GetOwningArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE @@ -3468,20 +3415,20 @@ class Money final : static const ::google::protobuf::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } - static const Money& default_instance() { + static const AskProductAIAssistantRequest& default_instance() { return *internal_default_instance(); } - static inline const Money* internal_default_instance() { - return reinterpret_cast( - &_Money_default_instance_); + static inline const AskProductAIAssistantRequest* internal_default_instance() { + return reinterpret_cast( + &_AskProductAIAssistantRequest_default_instance_); } static constexpr int kIndexInFileMessages = 18; - friend void swap(Money& a, Money& b) { + friend void swap(AskProductAIAssistantRequest& a, AskProductAIAssistantRequest& b) { a.Swap(&b); } - inline void Swap(Money* other) { + inline void Swap(AskProductAIAssistantRequest* other) { if (other == this) return; #ifdef PROTOBUF_FORCE_COPY_IN_SWAP if (GetOwningArena() != nullptr && @@ -3494,7 +3441,7 @@ class Money final : ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(Money* other) { + void UnsafeArenaSwap(AskProductAIAssistantRequest* other) { if (other == this) return; ABSL_DCHECK(GetOwningArena() == other->GetOwningArena()); InternalSwap(other); @@ -3502,14 +3449,14 @@ class Money final : // implements Message ---------------------------------------------- - Money* New(::google::protobuf::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); + AskProductAIAssistantRequest* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); } using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const Money& from); + void CopyFrom(const AskProductAIAssistantRequest& from); using ::google::protobuf::Message::MergeFrom; - void MergeFrom( const Money& from) { - Money::MergeImpl(*this, from); + void MergeFrom( const AskProductAIAssistantRequest& from) { + AskProductAIAssistantRequest::MergeImpl(*this, from); } private: static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg); @@ -3527,15 +3474,15 @@ class Money final : void SharedCtor(::google::protobuf::Arena* arena); void SharedDtor(); void SetCachedSize(int size) const final; - void InternalSwap(Money* other); + void InternalSwap(AskProductAIAssistantRequest* other); private: friend class ::google::protobuf::internal::AnyMetadata; static ::absl::string_view FullMessageName() { - return "oteldemo.Money"; + return "oteldemo.AskProductAIAssistantRequest"; } protected: - explicit Money(::google::protobuf::Arena* arena); + explicit AskProductAIAssistantRequest(::google::protobuf::Arena* arena); public: static const ClassData _class_data_; @@ -3548,59 +3495,53 @@ class Money final : // accessors ------------------------------------------------------- enum : int { - kCurrencyCodeFieldNumber = 1, - kUnitsFieldNumber = 2, - kNanosFieldNumber = 3, + kProductIdFieldNumber = 1, + kQuestionFieldNumber = 2, }; - // string currency_code = 1; - void clear_currency_code() ; - const std::string& currency_code() const; + // string product_id = 1; + void clear_product_id() ; + const std::string& product_id() const; template - void set_currency_code(Arg_&& arg, Args_... args); - std::string* mutable_currency_code(); - PROTOBUF_NODISCARD std::string* release_currency_code(); - void set_allocated_currency_code(std::string* ptr); + void set_product_id(Arg_&& arg, Args_... args); + std::string* mutable_product_id(); + PROTOBUF_NODISCARD std::string* release_product_id(); + void set_allocated_product_id(std::string* ptr); private: - const std::string& _internal_currency_code() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_currency_code( + const std::string& _internal_product_id() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_product_id( const std::string& value); - std::string* _internal_mutable_currency_code(); - - public: - // int64 units = 2; - void clear_units() ; - ::int64_t units() const; - void set_units(::int64_t value); - - private: - ::int64_t _internal_units() const; - void _internal_set_units(::int64_t value); + std::string* _internal_mutable_product_id(); public: - // int32 nanos = 3; - void clear_nanos() ; - ::int32_t nanos() const; - void set_nanos(::int32_t value); + // string question = 2; + void clear_question() ; + const std::string& question() const; + template + void set_question(Arg_&& arg, Args_... args); + std::string* mutable_question(); + PROTOBUF_NODISCARD std::string* release_question(); + void set_allocated_question(std::string* ptr); private: - ::int32_t _internal_nanos() const; - void _internal_set_nanos(::int32_t value); + const std::string& _internal_question() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_question( + const std::string& value); + std::string* _internal_mutable_question(); public: - // @@protoc_insertion_point(class_scope:oteldemo.Money) + // @@protoc_insertion_point(class_scope:oteldemo.AskProductAIAssistantRequest) private: class _Internal; friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<2, 3, 0, 36, 2> _table_; + static const ::google::protobuf::internal::TcParseTable<1, 2, 0, 64, 2> _table_; template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; struct Impl_ { - ::google::protobuf::internal::ArenaStringPtr currency_code_; - ::int64_t units_; - ::int32_t nanos_; + ::google::protobuf::internal::ArenaStringPtr product_id_; + ::google::protobuf::internal::ArenaStringPtr question_; mutable ::google::protobuf::internal::CachedSize _cached_size_; PROTOBUF_TSAN_DECLARE_MEMBER }; @@ -3608,25 +3549,25 @@ class Money final : friend struct ::TableStruct_demo_2eproto; };// ------------------------------------------------------------------- -class GetSupportedCurrenciesResponse final : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:oteldemo.GetSupportedCurrenciesResponse) */ { +class AskProductAIAssistantResponse final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:oteldemo.AskProductAIAssistantResponse) */ { public: - inline GetSupportedCurrenciesResponse() : GetSupportedCurrenciesResponse(nullptr) {} - ~GetSupportedCurrenciesResponse() override; + inline AskProductAIAssistantResponse() : AskProductAIAssistantResponse(nullptr) {} + ~AskProductAIAssistantResponse() override; template - explicit PROTOBUF_CONSTEXPR GetSupportedCurrenciesResponse(::google::protobuf::internal::ConstantInitialized); + explicit PROTOBUF_CONSTEXPR AskProductAIAssistantResponse(::google::protobuf::internal::ConstantInitialized); - GetSupportedCurrenciesResponse(const GetSupportedCurrenciesResponse& from); - GetSupportedCurrenciesResponse(GetSupportedCurrenciesResponse&& from) noexcept - : GetSupportedCurrenciesResponse() { + AskProductAIAssistantResponse(const AskProductAIAssistantResponse& from); + AskProductAIAssistantResponse(AskProductAIAssistantResponse&& from) noexcept + : AskProductAIAssistantResponse() { *this = ::std::move(from); } - inline GetSupportedCurrenciesResponse& operator=(const GetSupportedCurrenciesResponse& from) { + inline AskProductAIAssistantResponse& operator=(const AskProductAIAssistantResponse& from) { CopyFrom(from); return *this; } - inline GetSupportedCurrenciesResponse& operator=(GetSupportedCurrenciesResponse&& from) noexcept { + inline AskProductAIAssistantResponse& operator=(AskProductAIAssistantResponse&& from) noexcept { if (this == &from) return *this; if (GetOwningArena() == from.GetOwningArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE @@ -3656,20 +3597,20 @@ class GetSupportedCurrenciesResponse final : static const ::google::protobuf::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } - static const GetSupportedCurrenciesResponse& default_instance() { + static const AskProductAIAssistantResponse& default_instance() { return *internal_default_instance(); } - static inline const GetSupportedCurrenciesResponse* internal_default_instance() { - return reinterpret_cast( - &_GetSupportedCurrenciesResponse_default_instance_); + static inline const AskProductAIAssistantResponse* internal_default_instance() { + return reinterpret_cast( + &_AskProductAIAssistantResponse_default_instance_); } static constexpr int kIndexInFileMessages = 19; - friend void swap(GetSupportedCurrenciesResponse& a, GetSupportedCurrenciesResponse& b) { + friend void swap(AskProductAIAssistantResponse& a, AskProductAIAssistantResponse& b) { a.Swap(&b); } - inline void Swap(GetSupportedCurrenciesResponse* other) { + inline void Swap(AskProductAIAssistantResponse* other) { if (other == this) return; #ifdef PROTOBUF_FORCE_COPY_IN_SWAP if (GetOwningArena() != nullptr && @@ -3682,7 +3623,7 @@ class GetSupportedCurrenciesResponse final : ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(GetSupportedCurrenciesResponse* other) { + void UnsafeArenaSwap(AskProductAIAssistantResponse* other) { if (other == this) return; ABSL_DCHECK(GetOwningArena() == other->GetOwningArena()); InternalSwap(other); @@ -3690,14 +3631,14 @@ class GetSupportedCurrenciesResponse final : // implements Message ---------------------------------------------- - GetSupportedCurrenciesResponse* New(::google::protobuf::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); + AskProductAIAssistantResponse* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); } using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const GetSupportedCurrenciesResponse& from); + void CopyFrom(const AskProductAIAssistantResponse& from); using ::google::protobuf::Message::MergeFrom; - void MergeFrom( const GetSupportedCurrenciesResponse& from) { - GetSupportedCurrenciesResponse::MergeImpl(*this, from); + void MergeFrom( const AskProductAIAssistantResponse& from) { + AskProductAIAssistantResponse::MergeImpl(*this, from); } private: static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg); @@ -3715,15 +3656,15 @@ class GetSupportedCurrenciesResponse final : void SharedCtor(::google::protobuf::Arena* arena); void SharedDtor(); void SetCachedSize(int size) const final; - void InternalSwap(GetSupportedCurrenciesResponse* other); + void InternalSwap(AskProductAIAssistantResponse* other); private: friend class ::google::protobuf::internal::AnyMetadata; static ::absl::string_view FullMessageName() { - return "oteldemo.GetSupportedCurrenciesResponse"; + return "oteldemo.AskProductAIAssistantResponse"; } protected: - explicit GetSupportedCurrenciesResponse(::google::protobuf::Arena* arena); + explicit AskProductAIAssistantResponse(::google::protobuf::Arena* arena); public: static const ClassData _class_data_; @@ -3736,47 +3677,35 @@ class GetSupportedCurrenciesResponse final : // accessors ------------------------------------------------------- enum : int { - kCurrencyCodesFieldNumber = 1, + kResponseFieldNumber = 1, }; - // repeated string currency_codes = 1; - int currency_codes_size() const; - private: - int _internal_currency_codes_size() const; - - public: - void clear_currency_codes() ; - const std::string& currency_codes(int index) const; - std::string* mutable_currency_codes(int index); - void set_currency_codes(int index, const std::string& value); - void set_currency_codes(int index, std::string&& value); - void set_currency_codes(int index, const char* value); - void set_currency_codes(int index, const char* value, std::size_t size); - void set_currency_codes(int index, absl::string_view value); - std::string* add_currency_codes(); - void add_currency_codes(const std::string& value); - void add_currency_codes(std::string&& value); - void add_currency_codes(const char* value); - void add_currency_codes(const char* value, std::size_t size); - void add_currency_codes(absl::string_view value); - const ::google::protobuf::RepeatedPtrField& currency_codes() const; - ::google::protobuf::RepeatedPtrField* mutable_currency_codes(); + // string response = 1; + void clear_response() ; + const std::string& response() const; + template + void set_response(Arg_&& arg, Args_... args); + std::string* mutable_response(); + PROTOBUF_NODISCARD std::string* release_response(); + void set_allocated_response(std::string* ptr); private: - const ::google::protobuf::RepeatedPtrField& _internal_currency_codes() const; - ::google::protobuf::RepeatedPtrField* _internal_mutable_currency_codes(); + const std::string& _internal_response() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_response( + const std::string& value); + std::string* _internal_mutable_response(); public: - // @@protoc_insertion_point(class_scope:oteldemo.GetSupportedCurrenciesResponse) + // @@protoc_insertion_point(class_scope:oteldemo.AskProductAIAssistantResponse) private: class _Internal; friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<0, 1, 0, 62, 2> _table_; + static const ::google::protobuf::internal::TcParseTable<0, 1, 0, 55, 2> _table_; template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; struct Impl_ { - ::google::protobuf::RepeatedPtrField currency_codes_; + ::google::protobuf::internal::ArenaStringPtr response_; mutable ::google::protobuf::internal::CachedSize _cached_size_; PROTOBUF_TSAN_DECLARE_MEMBER }; @@ -3784,25 +3713,25 @@ class GetSupportedCurrenciesResponse final : friend struct ::TableStruct_demo_2eproto; };// ------------------------------------------------------------------- -class CurrencyConversionRequest final : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:oteldemo.CurrencyConversionRequest) */ { +class GetQuoteRequest final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:oteldemo.GetQuoteRequest) */ { public: - inline CurrencyConversionRequest() : CurrencyConversionRequest(nullptr) {} - ~CurrencyConversionRequest() override; + inline GetQuoteRequest() : GetQuoteRequest(nullptr) {} + ~GetQuoteRequest() override; template - explicit PROTOBUF_CONSTEXPR CurrencyConversionRequest(::google::protobuf::internal::ConstantInitialized); + explicit PROTOBUF_CONSTEXPR GetQuoteRequest(::google::protobuf::internal::ConstantInitialized); - CurrencyConversionRequest(const CurrencyConversionRequest& from); - CurrencyConversionRequest(CurrencyConversionRequest&& from) noexcept - : CurrencyConversionRequest() { + GetQuoteRequest(const GetQuoteRequest& from); + GetQuoteRequest(GetQuoteRequest&& from) noexcept + : GetQuoteRequest() { *this = ::std::move(from); } - inline CurrencyConversionRequest& operator=(const CurrencyConversionRequest& from) { + inline GetQuoteRequest& operator=(const GetQuoteRequest& from) { CopyFrom(from); return *this; } - inline CurrencyConversionRequest& operator=(CurrencyConversionRequest&& from) noexcept { + inline GetQuoteRequest& operator=(GetQuoteRequest&& from) noexcept { if (this == &from) return *this; if (GetOwningArena() == from.GetOwningArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE @@ -3832,20 +3761,20 @@ class CurrencyConversionRequest final : static const ::google::protobuf::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } - static const CurrencyConversionRequest& default_instance() { + static const GetQuoteRequest& default_instance() { return *internal_default_instance(); } - static inline const CurrencyConversionRequest* internal_default_instance() { - return reinterpret_cast( - &_CurrencyConversionRequest_default_instance_); + static inline const GetQuoteRequest* internal_default_instance() { + return reinterpret_cast( + &_GetQuoteRequest_default_instance_); } static constexpr int kIndexInFileMessages = 20; - friend void swap(CurrencyConversionRequest& a, CurrencyConversionRequest& b) { + friend void swap(GetQuoteRequest& a, GetQuoteRequest& b) { a.Swap(&b); } - inline void Swap(CurrencyConversionRequest* other) { + inline void Swap(GetQuoteRequest* other) { if (other == this) return; #ifdef PROTOBUF_FORCE_COPY_IN_SWAP if (GetOwningArena() != nullptr && @@ -3858,7 +3787,7 @@ class CurrencyConversionRequest final : ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(CurrencyConversionRequest* other) { + void UnsafeArenaSwap(GetQuoteRequest* other) { if (other == this) return; ABSL_DCHECK(GetOwningArena() == other->GetOwningArena()); InternalSwap(other); @@ -3866,14 +3795,14 @@ class CurrencyConversionRequest final : // implements Message ---------------------------------------------- - CurrencyConversionRequest* New(::google::protobuf::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); + GetQuoteRequest* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); } using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const CurrencyConversionRequest& from); + void CopyFrom(const GetQuoteRequest& from); using ::google::protobuf::Message::MergeFrom; - void MergeFrom( const CurrencyConversionRequest& from) { - CurrencyConversionRequest::MergeImpl(*this, from); + void MergeFrom( const GetQuoteRequest& from) { + GetQuoteRequest::MergeImpl(*this, from); } private: static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg); @@ -3891,15 +3820,15 @@ class CurrencyConversionRequest final : void SharedCtor(::google::protobuf::Arena* arena); void SharedDtor(); void SetCachedSize(int size) const final; - void InternalSwap(CurrencyConversionRequest* other); + void InternalSwap(GetQuoteRequest* other); private: friend class ::google::protobuf::internal::AnyMetadata; static ::absl::string_view FullMessageName() { - return "oteldemo.CurrencyConversionRequest"; + return "oteldemo.GetQuoteRequest"; } protected: - explicit CurrencyConversionRequest(::google::protobuf::Arena* arena); + explicit GetQuoteRequest(::google::protobuf::Arena* arena); public: static const ClassData _class_data_; @@ -3912,79 +3841,81 @@ class CurrencyConversionRequest final : // accessors ------------------------------------------------------- enum : int { - kToCodeFieldNumber = 2, - kFromFieldNumber = 1, + kItemsFieldNumber = 2, + kAddressFieldNumber = 1, }; - // string to_code = 2; - void clear_to_code() ; - const std::string& to_code() const; - template - void set_to_code(Arg_&& arg, Args_... args); - std::string* mutable_to_code(); - PROTOBUF_NODISCARD std::string* release_to_code(); - void set_allocated_to_code(std::string* ptr); - + // repeated .oteldemo.CartItem items = 2; + int items_size() const; private: - const std::string& _internal_to_code() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_to_code( - const std::string& value); - std::string* _internal_mutable_to_code(); + int _internal_items_size() const; public: - // .oteldemo.Money from = 1; - bool has_from() const; - void clear_from() ; - const ::oteldemo::Money& from() const; - PROTOBUF_NODISCARD ::oteldemo::Money* release_from(); - ::oteldemo::Money* mutable_from(); - void set_allocated_from(::oteldemo::Money* value); - void unsafe_arena_set_allocated_from(::oteldemo::Money* value); - ::oteldemo::Money* unsafe_arena_release_from(); + void clear_items() ; + ::oteldemo::CartItem* mutable_items(int index); + ::google::protobuf::RepeatedPtrField< ::oteldemo::CartItem >* + mutable_items(); + private: + const ::google::protobuf::RepeatedPtrField<::oteldemo::CartItem>& _internal_items() const; + ::google::protobuf::RepeatedPtrField<::oteldemo::CartItem>* _internal_mutable_items(); + public: + const ::oteldemo::CartItem& items(int index) const; + ::oteldemo::CartItem* add_items(); + const ::google::protobuf::RepeatedPtrField< ::oteldemo::CartItem >& + items() const; + // .oteldemo.Address address = 1; + bool has_address() const; + void clear_address() ; + const ::oteldemo::Address& address() const; + PROTOBUF_NODISCARD ::oteldemo::Address* release_address(); + ::oteldemo::Address* mutable_address(); + void set_allocated_address(::oteldemo::Address* value); + void unsafe_arena_set_allocated_address(::oteldemo::Address* value); + ::oteldemo::Address* unsafe_arena_release_address(); private: - const ::oteldemo::Money& _internal_from() const; - ::oteldemo::Money* _internal_mutable_from(); + const ::oteldemo::Address& _internal_address() const; + ::oteldemo::Address* _internal_mutable_address(); public: - // @@protoc_insertion_point(class_scope:oteldemo.CurrencyConversionRequest) + // @@protoc_insertion_point(class_scope:oteldemo.GetQuoteRequest) private: class _Internal; friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<1, 2, 1, 50, 2> _table_; + static const ::google::protobuf::internal::TcParseTable<1, 2, 2, 0, 2> _table_; template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; struct Impl_ { ::google::protobuf::internal::HasBits<1> _has_bits_; mutable ::google::protobuf::internal::CachedSize _cached_size_; - ::google::protobuf::internal::ArenaStringPtr to_code_; - ::oteldemo::Money* from_; + ::google::protobuf::RepeatedPtrField< ::oteldemo::CartItem > items_; + ::oteldemo::Address* address_; PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_demo_2eproto; };// ------------------------------------------------------------------- -class CreditCardInfo final : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:oteldemo.CreditCardInfo) */ { +class GetQuoteResponse final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:oteldemo.GetQuoteResponse) */ { public: - inline CreditCardInfo() : CreditCardInfo(nullptr) {} - ~CreditCardInfo() override; + inline GetQuoteResponse() : GetQuoteResponse(nullptr) {} + ~GetQuoteResponse() override; template - explicit PROTOBUF_CONSTEXPR CreditCardInfo(::google::protobuf::internal::ConstantInitialized); + explicit PROTOBUF_CONSTEXPR GetQuoteResponse(::google::protobuf::internal::ConstantInitialized); - CreditCardInfo(const CreditCardInfo& from); - CreditCardInfo(CreditCardInfo&& from) noexcept - : CreditCardInfo() { + GetQuoteResponse(const GetQuoteResponse& from); + GetQuoteResponse(GetQuoteResponse&& from) noexcept + : GetQuoteResponse() { *this = ::std::move(from); } - inline CreditCardInfo& operator=(const CreditCardInfo& from) { + inline GetQuoteResponse& operator=(const GetQuoteResponse& from) { CopyFrom(from); return *this; } - inline CreditCardInfo& operator=(CreditCardInfo&& from) noexcept { + inline GetQuoteResponse& operator=(GetQuoteResponse&& from) noexcept { if (this == &from) return *this; if (GetOwningArena() == from.GetOwningArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE @@ -4014,20 +3945,20 @@ class CreditCardInfo final : static const ::google::protobuf::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } - static const CreditCardInfo& default_instance() { + static const GetQuoteResponse& default_instance() { return *internal_default_instance(); } - static inline const CreditCardInfo* internal_default_instance() { - return reinterpret_cast( - &_CreditCardInfo_default_instance_); + static inline const GetQuoteResponse* internal_default_instance() { + return reinterpret_cast( + &_GetQuoteResponse_default_instance_); } static constexpr int kIndexInFileMessages = 21; - friend void swap(CreditCardInfo& a, CreditCardInfo& b) { + friend void swap(GetQuoteResponse& a, GetQuoteResponse& b) { a.Swap(&b); } - inline void Swap(CreditCardInfo* other) { + inline void Swap(GetQuoteResponse* other) { if (other == this) return; #ifdef PROTOBUF_FORCE_COPY_IN_SWAP if (GetOwningArena() != nullptr && @@ -4040,7 +3971,7 @@ class CreditCardInfo final : ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(CreditCardInfo* other) { + void UnsafeArenaSwap(GetQuoteResponse* other) { if (other == this) return; ABSL_DCHECK(GetOwningArena() == other->GetOwningArena()); InternalSwap(other); @@ -4048,14 +3979,14 @@ class CreditCardInfo final : // implements Message ---------------------------------------------- - CreditCardInfo* New(::google::protobuf::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); + GetQuoteResponse* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); } using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const CreditCardInfo& from); + void CopyFrom(const GetQuoteResponse& from); using ::google::protobuf::Message::MergeFrom; - void MergeFrom( const CreditCardInfo& from) { - CreditCardInfo::MergeImpl(*this, from); + void MergeFrom( const GetQuoteResponse& from) { + GetQuoteResponse::MergeImpl(*this, from); } private: static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg); @@ -4073,15 +4004,15 @@ class CreditCardInfo final : void SharedCtor(::google::protobuf::Arena* arena); void SharedDtor(); void SetCachedSize(int size) const final; - void InternalSwap(CreditCardInfo* other); + void InternalSwap(GetQuoteResponse* other); private: friend class ::google::protobuf::internal::AnyMetadata; static ::absl::string_view FullMessageName() { - return "oteldemo.CreditCardInfo"; + return "oteldemo.GetQuoteResponse"; } protected: - explicit CreditCardInfo(::google::protobuf::Arena* arena); + explicit GetQuoteResponse(::google::protobuf::Arena* arena); public: static const ClassData _class_data_; @@ -4094,97 +4025,61 @@ class CreditCardInfo final : // accessors ------------------------------------------------------- enum : int { - kCreditCardNumberFieldNumber = 1, - kCreditCardCvvFieldNumber = 2, - kCreditCardExpirationYearFieldNumber = 3, - kCreditCardExpirationMonthFieldNumber = 4, + kCostUsdFieldNumber = 1, }; - // string credit_card_number = 1; - void clear_credit_card_number() ; - const std::string& credit_card_number() const; - template - void set_credit_card_number(Arg_&& arg, Args_... args); - std::string* mutable_credit_card_number(); - PROTOBUF_NODISCARD std::string* release_credit_card_number(); - void set_allocated_credit_card_number(std::string* ptr); - - private: - const std::string& _internal_credit_card_number() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_credit_card_number( - const std::string& value); - std::string* _internal_mutable_credit_card_number(); - - public: - // int32 credit_card_cvv = 2; - void clear_credit_card_cvv() ; - ::int32_t credit_card_cvv() const; - void set_credit_card_cvv(::int32_t value); - - private: - ::int32_t _internal_credit_card_cvv() const; - void _internal_set_credit_card_cvv(::int32_t value); - - public: - // int32 credit_card_expiration_year = 3; - void clear_credit_card_expiration_year() ; - ::int32_t credit_card_expiration_year() const; - void set_credit_card_expiration_year(::int32_t value); - - private: - ::int32_t _internal_credit_card_expiration_year() const; - void _internal_set_credit_card_expiration_year(::int32_t value); - - public: - // int32 credit_card_expiration_month = 4; - void clear_credit_card_expiration_month() ; - ::int32_t credit_card_expiration_month() const; - void set_credit_card_expiration_month(::int32_t value); + // .oteldemo.Money cost_usd = 1; + bool has_cost_usd() const; + void clear_cost_usd() ; + const ::oteldemo::Money& cost_usd() const; + PROTOBUF_NODISCARD ::oteldemo::Money* release_cost_usd(); + ::oteldemo::Money* mutable_cost_usd(); + void set_allocated_cost_usd(::oteldemo::Money* value); + void unsafe_arena_set_allocated_cost_usd(::oteldemo::Money* value); + ::oteldemo::Money* unsafe_arena_release_cost_usd(); private: - ::int32_t _internal_credit_card_expiration_month() const; - void _internal_set_credit_card_expiration_month(::int32_t value); + const ::oteldemo::Money& _internal_cost_usd() const; + ::oteldemo::Money* _internal_mutable_cost_usd(); public: - // @@protoc_insertion_point(class_scope:oteldemo.CreditCardInfo) + // @@protoc_insertion_point(class_scope:oteldemo.GetQuoteResponse) private: class _Internal; friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<2, 4, 0, 50, 2> _table_; + static const ::google::protobuf::internal::TcParseTable<0, 1, 1, 0, 2> _table_; template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; struct Impl_ { - ::google::protobuf::internal::ArenaStringPtr credit_card_number_; - ::int32_t credit_card_cvv_; - ::int32_t credit_card_expiration_year_; - ::int32_t credit_card_expiration_month_; + ::google::protobuf::internal::HasBits<1> _has_bits_; mutable ::google::protobuf::internal::CachedSize _cached_size_; + ::oteldemo::Money* cost_usd_; PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_demo_2eproto; };// ------------------------------------------------------------------- -class ChargeRequest final : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:oteldemo.ChargeRequest) */ { +class ShipOrderRequest final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:oteldemo.ShipOrderRequest) */ { public: - inline ChargeRequest() : ChargeRequest(nullptr) {} - ~ChargeRequest() override; + inline ShipOrderRequest() : ShipOrderRequest(nullptr) {} + ~ShipOrderRequest() override; template - explicit PROTOBUF_CONSTEXPR ChargeRequest(::google::protobuf::internal::ConstantInitialized); + explicit PROTOBUF_CONSTEXPR ShipOrderRequest(::google::protobuf::internal::ConstantInitialized); - ChargeRequest(const ChargeRequest& from); - ChargeRequest(ChargeRequest&& from) noexcept - : ChargeRequest() { + ShipOrderRequest(const ShipOrderRequest& from); + ShipOrderRequest(ShipOrderRequest&& from) noexcept + : ShipOrderRequest() { *this = ::std::move(from); } - inline ChargeRequest& operator=(const ChargeRequest& from) { + inline ShipOrderRequest& operator=(const ShipOrderRequest& from) { CopyFrom(from); return *this; } - inline ChargeRequest& operator=(ChargeRequest&& from) noexcept { + inline ShipOrderRequest& operator=(ShipOrderRequest&& from) noexcept { if (this == &from) return *this; if (GetOwningArena() == from.GetOwningArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE @@ -4214,20 +4109,20 @@ class ChargeRequest final : static const ::google::protobuf::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } - static const ChargeRequest& default_instance() { + static const ShipOrderRequest& default_instance() { return *internal_default_instance(); } - static inline const ChargeRequest* internal_default_instance() { - return reinterpret_cast( - &_ChargeRequest_default_instance_); + static inline const ShipOrderRequest* internal_default_instance() { + return reinterpret_cast( + &_ShipOrderRequest_default_instance_); } static constexpr int kIndexInFileMessages = 22; - friend void swap(ChargeRequest& a, ChargeRequest& b) { + friend void swap(ShipOrderRequest& a, ShipOrderRequest& b) { a.Swap(&b); } - inline void Swap(ChargeRequest* other) { + inline void Swap(ShipOrderRequest* other) { if (other == this) return; #ifdef PROTOBUF_FORCE_COPY_IN_SWAP if (GetOwningArena() != nullptr && @@ -4240,7 +4135,7 @@ class ChargeRequest final : ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(ChargeRequest* other) { + void UnsafeArenaSwap(ShipOrderRequest* other) { if (other == this) return; ABSL_DCHECK(GetOwningArena() == other->GetOwningArena()); InternalSwap(other); @@ -4248,14 +4143,14 @@ class ChargeRequest final : // implements Message ---------------------------------------------- - ChargeRequest* New(::google::protobuf::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); + ShipOrderRequest* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); } using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const ChargeRequest& from); + void CopyFrom(const ShipOrderRequest& from); using ::google::protobuf::Message::MergeFrom; - void MergeFrom( const ChargeRequest& from) { - ChargeRequest::MergeImpl(*this, from); + void MergeFrom( const ShipOrderRequest& from) { + ShipOrderRequest::MergeImpl(*this, from); } private: static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg); @@ -4273,15 +4168,15 @@ class ChargeRequest final : void SharedCtor(::google::protobuf::Arena* arena); void SharedDtor(); void SetCachedSize(int size) const final; - void InternalSwap(ChargeRequest* other); + void InternalSwap(ShipOrderRequest* other); private: friend class ::google::protobuf::internal::AnyMetadata; static ::absl::string_view FullMessageName() { - return "oteldemo.ChargeRequest"; + return "oteldemo.ShipOrderRequest"; } protected: - explicit ChargeRequest(::google::protobuf::Arena* arena); + explicit ShipOrderRequest(::google::protobuf::Arena* arena); public: static const ClassData _class_data_; @@ -4294,40 +4189,43 @@ class ChargeRequest final : // accessors ------------------------------------------------------- enum : int { - kAmountFieldNumber = 1, - kCreditCardFieldNumber = 2, + kItemsFieldNumber = 2, + kAddressFieldNumber = 1, }; - // .oteldemo.Money amount = 1; - bool has_amount() const; - void clear_amount() ; - const ::oteldemo::Money& amount() const; - PROTOBUF_NODISCARD ::oteldemo::Money* release_amount(); - ::oteldemo::Money* mutable_amount(); - void set_allocated_amount(::oteldemo::Money* value); - void unsafe_arena_set_allocated_amount(::oteldemo::Money* value); - ::oteldemo::Money* unsafe_arena_release_amount(); - + // repeated .oteldemo.CartItem items = 2; + int items_size() const; private: - const ::oteldemo::Money& _internal_amount() const; - ::oteldemo::Money* _internal_mutable_amount(); + int _internal_items_size() const; public: - // .oteldemo.CreditCardInfo credit_card = 2; - bool has_credit_card() const; - void clear_credit_card() ; - const ::oteldemo::CreditCardInfo& credit_card() const; - PROTOBUF_NODISCARD ::oteldemo::CreditCardInfo* release_credit_card(); - ::oteldemo::CreditCardInfo* mutable_credit_card(); - void set_allocated_credit_card(::oteldemo::CreditCardInfo* value); - void unsafe_arena_set_allocated_credit_card(::oteldemo::CreditCardInfo* value); - ::oteldemo::CreditCardInfo* unsafe_arena_release_credit_card(); + void clear_items() ; + ::oteldemo::CartItem* mutable_items(int index); + ::google::protobuf::RepeatedPtrField< ::oteldemo::CartItem >* + mutable_items(); + private: + const ::google::protobuf::RepeatedPtrField<::oteldemo::CartItem>& _internal_items() const; + ::google::protobuf::RepeatedPtrField<::oteldemo::CartItem>* _internal_mutable_items(); + public: + const ::oteldemo::CartItem& items(int index) const; + ::oteldemo::CartItem* add_items(); + const ::google::protobuf::RepeatedPtrField< ::oteldemo::CartItem >& + items() const; + // .oteldemo.Address address = 1; + bool has_address() const; + void clear_address() ; + const ::oteldemo::Address& address() const; + PROTOBUF_NODISCARD ::oteldemo::Address* release_address(); + ::oteldemo::Address* mutable_address(); + void set_allocated_address(::oteldemo::Address* value); + void unsafe_arena_set_allocated_address(::oteldemo::Address* value); + ::oteldemo::Address* unsafe_arena_release_address(); private: - const ::oteldemo::CreditCardInfo& _internal_credit_card() const; - ::oteldemo::CreditCardInfo* _internal_mutable_credit_card(); + const ::oteldemo::Address& _internal_address() const; + ::oteldemo::Address* _internal_mutable_address(); public: - // @@protoc_insertion_point(class_scope:oteldemo.ChargeRequest) + // @@protoc_insertion_point(class_scope:oteldemo.ShipOrderRequest) private: class _Internal; @@ -4339,33 +4237,33 @@ class ChargeRequest final : struct Impl_ { ::google::protobuf::internal::HasBits<1> _has_bits_; mutable ::google::protobuf::internal::CachedSize _cached_size_; - ::oteldemo::Money* amount_; - ::oteldemo::CreditCardInfo* credit_card_; + ::google::protobuf::RepeatedPtrField< ::oteldemo::CartItem > items_; + ::oteldemo::Address* address_; PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_demo_2eproto; };// ------------------------------------------------------------------- -class ChargeResponse final : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:oteldemo.ChargeResponse) */ { +class ShipOrderResponse final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:oteldemo.ShipOrderResponse) */ { public: - inline ChargeResponse() : ChargeResponse(nullptr) {} - ~ChargeResponse() override; + inline ShipOrderResponse() : ShipOrderResponse(nullptr) {} + ~ShipOrderResponse() override; template - explicit PROTOBUF_CONSTEXPR ChargeResponse(::google::protobuf::internal::ConstantInitialized); + explicit PROTOBUF_CONSTEXPR ShipOrderResponse(::google::protobuf::internal::ConstantInitialized); - ChargeResponse(const ChargeResponse& from); - ChargeResponse(ChargeResponse&& from) noexcept - : ChargeResponse() { + ShipOrderResponse(const ShipOrderResponse& from); + ShipOrderResponse(ShipOrderResponse&& from) noexcept + : ShipOrderResponse() { *this = ::std::move(from); } - inline ChargeResponse& operator=(const ChargeResponse& from) { + inline ShipOrderResponse& operator=(const ShipOrderResponse& from) { CopyFrom(from); return *this; } - inline ChargeResponse& operator=(ChargeResponse&& from) noexcept { + inline ShipOrderResponse& operator=(ShipOrderResponse&& from) noexcept { if (this == &from) return *this; if (GetOwningArena() == from.GetOwningArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE @@ -4395,20 +4293,20 @@ class ChargeResponse final : static const ::google::protobuf::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } - static const ChargeResponse& default_instance() { + static const ShipOrderResponse& default_instance() { return *internal_default_instance(); } - static inline const ChargeResponse* internal_default_instance() { - return reinterpret_cast( - &_ChargeResponse_default_instance_); + static inline const ShipOrderResponse* internal_default_instance() { + return reinterpret_cast( + &_ShipOrderResponse_default_instance_); } static constexpr int kIndexInFileMessages = 23; - friend void swap(ChargeResponse& a, ChargeResponse& b) { + friend void swap(ShipOrderResponse& a, ShipOrderResponse& b) { a.Swap(&b); } - inline void Swap(ChargeResponse* other) { + inline void Swap(ShipOrderResponse* other) { if (other == this) return; #ifdef PROTOBUF_FORCE_COPY_IN_SWAP if (GetOwningArena() != nullptr && @@ -4421,7 +4319,7 @@ class ChargeResponse final : ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(ChargeResponse* other) { + void UnsafeArenaSwap(ShipOrderResponse* other) { if (other == this) return; ABSL_DCHECK(GetOwningArena() == other->GetOwningArena()); InternalSwap(other); @@ -4429,14 +4327,14 @@ class ChargeResponse final : // implements Message ---------------------------------------------- - ChargeResponse* New(::google::protobuf::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); + ShipOrderResponse* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); } using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const ChargeResponse& from); + void CopyFrom(const ShipOrderResponse& from); using ::google::protobuf::Message::MergeFrom; - void MergeFrom( const ChargeResponse& from) { - ChargeResponse::MergeImpl(*this, from); + void MergeFrom( const ShipOrderResponse& from) { + ShipOrderResponse::MergeImpl(*this, from); } private: static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg); @@ -4454,15 +4352,15 @@ class ChargeResponse final : void SharedCtor(::google::protobuf::Arena* arena); void SharedDtor(); void SetCachedSize(int size) const final; - void InternalSwap(ChargeResponse* other); + void InternalSwap(ShipOrderResponse* other); private: friend class ::google::protobuf::internal::AnyMetadata; static ::absl::string_view FullMessageName() { - return "oteldemo.ChargeResponse"; + return "oteldemo.ShipOrderResponse"; } protected: - explicit ChargeResponse(::google::protobuf::Arena* arena); + explicit ShipOrderResponse(::google::protobuf::Arena* arena); public: static const ClassData _class_data_; @@ -4475,25 +4373,25 @@ class ChargeResponse final : // accessors ------------------------------------------------------- enum : int { - kTransactionIdFieldNumber = 1, + kTrackingIdFieldNumber = 1, }; - // string transaction_id = 1; - void clear_transaction_id() ; - const std::string& transaction_id() const; + // string tracking_id = 1; + void clear_tracking_id() ; + const std::string& tracking_id() const; template - void set_transaction_id(Arg_&& arg, Args_... args); - std::string* mutable_transaction_id(); - PROTOBUF_NODISCARD std::string* release_transaction_id(); - void set_allocated_transaction_id(std::string* ptr); + void set_tracking_id(Arg_&& arg, Args_... args); + std::string* mutable_tracking_id(); + PROTOBUF_NODISCARD std::string* release_tracking_id(); + void set_allocated_tracking_id(std::string* ptr); private: - const std::string& _internal_transaction_id() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_transaction_id( + const std::string& _internal_tracking_id() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_tracking_id( const std::string& value); - std::string* _internal_mutable_transaction_id(); + std::string* _internal_mutable_tracking_id(); public: - // @@protoc_insertion_point(class_scope:oteldemo.ChargeResponse) + // @@protoc_insertion_point(class_scope:oteldemo.ShipOrderResponse) private: class _Internal; @@ -4503,7 +4401,7 @@ class ChargeResponse final : typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; struct Impl_ { - ::google::protobuf::internal::ArenaStringPtr transaction_id_; + ::google::protobuf::internal::ArenaStringPtr tracking_id_; mutable ::google::protobuf::internal::CachedSize _cached_size_; PROTOBUF_TSAN_DECLARE_MEMBER }; @@ -4511,25 +4409,25 @@ class ChargeResponse final : friend struct ::TableStruct_demo_2eproto; };// ------------------------------------------------------------------- -class OrderItem final : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:oteldemo.OrderItem) */ { +class Address final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:oteldemo.Address) */ { public: - inline OrderItem() : OrderItem(nullptr) {} - ~OrderItem() override; + inline Address() : Address(nullptr) {} + ~Address() override; template - explicit PROTOBUF_CONSTEXPR OrderItem(::google::protobuf::internal::ConstantInitialized); + explicit PROTOBUF_CONSTEXPR Address(::google::protobuf::internal::ConstantInitialized); - OrderItem(const OrderItem& from); - OrderItem(OrderItem&& from) noexcept - : OrderItem() { + Address(const Address& from); + Address(Address&& from) noexcept + : Address() { *this = ::std::move(from); } - inline OrderItem& operator=(const OrderItem& from) { + inline Address& operator=(const Address& from) { CopyFrom(from); return *this; } - inline OrderItem& operator=(OrderItem&& from) noexcept { + inline Address& operator=(Address&& from) noexcept { if (this == &from) return *this; if (GetOwningArena() == from.GetOwningArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE @@ -4559,20 +4457,20 @@ class OrderItem final : static const ::google::protobuf::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } - static const OrderItem& default_instance() { + static const Address& default_instance() { return *internal_default_instance(); } - static inline const OrderItem* internal_default_instance() { - return reinterpret_cast( - &_OrderItem_default_instance_); + static inline const Address* internal_default_instance() { + return reinterpret_cast( + &_Address_default_instance_); } static constexpr int kIndexInFileMessages = 24; - friend void swap(OrderItem& a, OrderItem& b) { + friend void swap(Address& a, Address& b) { a.Swap(&b); } - inline void Swap(OrderItem* other) { + inline void Swap(Address* other) { if (other == this) return; #ifdef PROTOBUF_FORCE_COPY_IN_SWAP if (GetOwningArena() != nullptr && @@ -4585,7 +4483,7 @@ class OrderItem final : ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(OrderItem* other) { + void UnsafeArenaSwap(Address* other) { if (other == this) return; ABSL_DCHECK(GetOwningArena() == other->GetOwningArena()); InternalSwap(other); @@ -4593,14 +4491,14 @@ class OrderItem final : // implements Message ---------------------------------------------- - OrderItem* New(::google::protobuf::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); + Address* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage
(arena); } using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const OrderItem& from); + void CopyFrom(const Address& from); using ::google::protobuf::Message::MergeFrom; - void MergeFrom( const OrderItem& from) { - OrderItem::MergeImpl(*this, from); + void MergeFrom( const Address& from) { + Address::MergeImpl(*this, from); } private: static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg); @@ -4618,15 +4516,15 @@ class OrderItem final : void SharedCtor(::google::protobuf::Arena* arena); void SharedDtor(); void SetCachedSize(int size) const final; - void InternalSwap(OrderItem* other); + void InternalSwap(Address* other); private: friend class ::google::protobuf::internal::AnyMetadata; static ::absl::string_view FullMessageName() { - return "oteldemo.OrderItem"; + return "oteldemo.Address"; } protected: - explicit OrderItem(::google::protobuf::Arena* arena); + explicit Address(::google::protobuf::Arena* arena); public: static const ClassData _class_data_; @@ -4639,78 +4537,133 @@ class OrderItem final : // accessors ------------------------------------------------------- enum : int { - kItemFieldNumber = 1, - kCostFieldNumber = 2, + kStreetAddressFieldNumber = 1, + kCityFieldNumber = 2, + kStateFieldNumber = 3, + kCountryFieldNumber = 4, + kZipCodeFieldNumber = 5, }; - // .oteldemo.CartItem item = 1; - bool has_item() const; - void clear_item() ; - const ::oteldemo::CartItem& item() const; - PROTOBUF_NODISCARD ::oteldemo::CartItem* release_item(); - ::oteldemo::CartItem* mutable_item(); - void set_allocated_item(::oteldemo::CartItem* value); - void unsafe_arena_set_allocated_item(::oteldemo::CartItem* value); - ::oteldemo::CartItem* unsafe_arena_release_item(); + // string street_address = 1; + void clear_street_address() ; + const std::string& street_address() const; + template + void set_street_address(Arg_&& arg, Args_... args); + std::string* mutable_street_address(); + PROTOBUF_NODISCARD std::string* release_street_address(); + void set_allocated_street_address(std::string* ptr); private: - const ::oteldemo::CartItem& _internal_item() const; - ::oteldemo::CartItem* _internal_mutable_item(); + const std::string& _internal_street_address() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_street_address( + const std::string& value); + std::string* _internal_mutable_street_address(); public: - // .oteldemo.Money cost = 2; - bool has_cost() const; - void clear_cost() ; - const ::oteldemo::Money& cost() const; - PROTOBUF_NODISCARD ::oteldemo::Money* release_cost(); - ::oteldemo::Money* mutable_cost(); - void set_allocated_cost(::oteldemo::Money* value); - void unsafe_arena_set_allocated_cost(::oteldemo::Money* value); - ::oteldemo::Money* unsafe_arena_release_cost(); + // string city = 2; + void clear_city() ; + const std::string& city() const; + template + void set_city(Arg_&& arg, Args_... args); + std::string* mutable_city(); + PROTOBUF_NODISCARD std::string* release_city(); + void set_allocated_city(std::string* ptr); private: - const ::oteldemo::Money& _internal_cost() const; - ::oteldemo::Money* _internal_mutable_cost(); + const std::string& _internal_city() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_city( + const std::string& value); + std::string* _internal_mutable_city(); public: - // @@protoc_insertion_point(class_scope:oteldemo.OrderItem) - private: - class _Internal; + // string state = 3; + void clear_state() ; + const std::string& state() const; + template + void set_state(Arg_&& arg, Args_... args); + std::string* mutable_state(); + PROTOBUF_NODISCARD std::string* release_state(); + void set_allocated_state(std::string* ptr); - friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<1, 2, 2, 0, 2> _table_; - template friend class ::google::protobuf::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - struct Impl_ { - ::google::protobuf::internal::HasBits<1> _has_bits_; - mutable ::google::protobuf::internal::CachedSize _cached_size_; - ::oteldemo::CartItem* item_; - ::oteldemo::Money* cost_; - PROTOBUF_TSAN_DECLARE_MEMBER - }; + private: + const std::string& _internal_state() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_state( + const std::string& value); + std::string* _internal_mutable_state(); + + public: + // string country = 4; + void clear_country() ; + const std::string& country() const; + template + void set_country(Arg_&& arg, Args_... args); + std::string* mutable_country(); + PROTOBUF_NODISCARD std::string* release_country(); + void set_allocated_country(std::string* ptr); + + private: + const std::string& _internal_country() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_country( + const std::string& value); + std::string* _internal_mutable_country(); + + public: + // string zip_code = 5; + void clear_zip_code() ; + const std::string& zip_code() const; + template + void set_zip_code(Arg_&& arg, Args_... args); + std::string* mutable_zip_code(); + PROTOBUF_NODISCARD std::string* release_zip_code(); + void set_allocated_zip_code(std::string* ptr); + + private: + const std::string& _internal_zip_code() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_zip_code( + const std::string& value); + std::string* _internal_mutable_zip_code(); + + public: + // @@protoc_insertion_point(class_scope:oteldemo.Address) + private: + class _Internal; + + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<3, 5, 0, 63, 2> _table_; + template friend class ::google::protobuf::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::google::protobuf::internal::ArenaStringPtr street_address_; + ::google::protobuf::internal::ArenaStringPtr city_; + ::google::protobuf::internal::ArenaStringPtr state_; + ::google::protobuf::internal::ArenaStringPtr country_; + ::google::protobuf::internal::ArenaStringPtr zip_code_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; union { Impl_ _impl_; }; friend struct ::TableStruct_demo_2eproto; };// ------------------------------------------------------------------- -class OrderResult final : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:oteldemo.OrderResult) */ { +class Money final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:oteldemo.Money) */ { public: - inline OrderResult() : OrderResult(nullptr) {} - ~OrderResult() override; + inline Money() : Money(nullptr) {} + ~Money() override; template - explicit PROTOBUF_CONSTEXPR OrderResult(::google::protobuf::internal::ConstantInitialized); + explicit PROTOBUF_CONSTEXPR Money(::google::protobuf::internal::ConstantInitialized); - OrderResult(const OrderResult& from); - OrderResult(OrderResult&& from) noexcept - : OrderResult() { + Money(const Money& from); + Money(Money&& from) noexcept + : Money() { *this = ::std::move(from); } - inline OrderResult& operator=(const OrderResult& from) { + inline Money& operator=(const Money& from) { CopyFrom(from); return *this; } - inline OrderResult& operator=(OrderResult&& from) noexcept { + inline Money& operator=(Money&& from) noexcept { if (this == &from) return *this; if (GetOwningArena() == from.GetOwningArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE @@ -4740,20 +4693,20 @@ class OrderResult final : static const ::google::protobuf::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } - static const OrderResult& default_instance() { + static const Money& default_instance() { return *internal_default_instance(); } - static inline const OrderResult* internal_default_instance() { - return reinterpret_cast( - &_OrderResult_default_instance_); + static inline const Money* internal_default_instance() { + return reinterpret_cast( + &_Money_default_instance_); } static constexpr int kIndexInFileMessages = 25; - friend void swap(OrderResult& a, OrderResult& b) { + friend void swap(Money& a, Money& b) { a.Swap(&b); } - inline void Swap(OrderResult* other) { + inline void Swap(Money* other) { if (other == this) return; #ifdef PROTOBUF_FORCE_COPY_IN_SWAP if (GetOwningArena() != nullptr && @@ -4766,7 +4719,7 @@ class OrderResult final : ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(OrderResult* other) { + void UnsafeArenaSwap(Money* other) { if (other == this) return; ABSL_DCHECK(GetOwningArena() == other->GetOwningArena()); InternalSwap(other); @@ -4774,14 +4727,14 @@ class OrderResult final : // implements Message ---------------------------------------------- - OrderResult* New(::google::protobuf::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); + Money* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); } using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const OrderResult& from); + void CopyFrom(const Money& from); using ::google::protobuf::Message::MergeFrom; - void MergeFrom( const OrderResult& from) { - OrderResult::MergeImpl(*this, from); + void MergeFrom( const Money& from) { + Money::MergeImpl(*this, from); } private: static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg); @@ -4799,15 +4752,15 @@ class OrderResult final : void SharedCtor(::google::protobuf::Arena* arena); void SharedDtor(); void SetCachedSize(int size) const final; - void InternalSwap(OrderResult* other); + void InternalSwap(Money* other); private: friend class ::google::protobuf::internal::AnyMetadata; static ::absl::string_view FullMessageName() { - return "oteldemo.OrderResult"; + return "oteldemo.Money"; } protected: - explicit OrderResult(::google::protobuf::Arena* arena); + explicit Money(::google::protobuf::Arena* arena); public: static const ClassData _class_data_; @@ -4820,134 +4773,85 @@ class OrderResult final : // accessors ------------------------------------------------------- enum : int { - kItemsFieldNumber = 5, - kOrderIdFieldNumber = 1, - kShippingTrackingIdFieldNumber = 2, - kShippingCostFieldNumber = 3, - kShippingAddressFieldNumber = 4, + kCurrencyCodeFieldNumber = 1, + kUnitsFieldNumber = 2, + kNanosFieldNumber = 3, }; - // repeated .oteldemo.OrderItem items = 5; - int items_size() const; - private: - int _internal_items_size() const; - - public: - void clear_items() ; - ::oteldemo::OrderItem* mutable_items(int index); - ::google::protobuf::RepeatedPtrField< ::oteldemo::OrderItem >* - mutable_items(); - private: - const ::google::protobuf::RepeatedPtrField<::oteldemo::OrderItem>& _internal_items() const; - ::google::protobuf::RepeatedPtrField<::oteldemo::OrderItem>* _internal_mutable_items(); - public: - const ::oteldemo::OrderItem& items(int index) const; - ::oteldemo::OrderItem* add_items(); - const ::google::protobuf::RepeatedPtrField< ::oteldemo::OrderItem >& - items() const; - // string order_id = 1; - void clear_order_id() ; - const std::string& order_id() const; - template - void set_order_id(Arg_&& arg, Args_... args); - std::string* mutable_order_id(); - PROTOBUF_NODISCARD std::string* release_order_id(); - void set_allocated_order_id(std::string* ptr); - - private: - const std::string& _internal_order_id() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_order_id( - const std::string& value); - std::string* _internal_mutable_order_id(); - - public: - // string shipping_tracking_id = 2; - void clear_shipping_tracking_id() ; - const std::string& shipping_tracking_id() const; + // string currency_code = 1; + void clear_currency_code() ; + const std::string& currency_code() const; template - void set_shipping_tracking_id(Arg_&& arg, Args_... args); - std::string* mutable_shipping_tracking_id(); - PROTOBUF_NODISCARD std::string* release_shipping_tracking_id(); - void set_allocated_shipping_tracking_id(std::string* ptr); + void set_currency_code(Arg_&& arg, Args_... args); + std::string* mutable_currency_code(); + PROTOBUF_NODISCARD std::string* release_currency_code(); + void set_allocated_currency_code(std::string* ptr); private: - const std::string& _internal_shipping_tracking_id() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_shipping_tracking_id( + const std::string& _internal_currency_code() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_currency_code( const std::string& value); - std::string* _internal_mutable_shipping_tracking_id(); + std::string* _internal_mutable_currency_code(); public: - // .oteldemo.Money shipping_cost = 3; - bool has_shipping_cost() const; - void clear_shipping_cost() ; - const ::oteldemo::Money& shipping_cost() const; - PROTOBUF_NODISCARD ::oteldemo::Money* release_shipping_cost(); - ::oteldemo::Money* mutable_shipping_cost(); - void set_allocated_shipping_cost(::oteldemo::Money* value); - void unsafe_arena_set_allocated_shipping_cost(::oteldemo::Money* value); - ::oteldemo::Money* unsafe_arena_release_shipping_cost(); + // int64 units = 2; + void clear_units() ; + ::int64_t units() const; + void set_units(::int64_t value); private: - const ::oteldemo::Money& _internal_shipping_cost() const; - ::oteldemo::Money* _internal_mutable_shipping_cost(); + ::int64_t _internal_units() const; + void _internal_set_units(::int64_t value); public: - // .oteldemo.Address shipping_address = 4; - bool has_shipping_address() const; - void clear_shipping_address() ; - const ::oteldemo::Address& shipping_address() const; - PROTOBUF_NODISCARD ::oteldemo::Address* release_shipping_address(); - ::oteldemo::Address* mutable_shipping_address(); - void set_allocated_shipping_address(::oteldemo::Address* value); - void unsafe_arena_set_allocated_shipping_address(::oteldemo::Address* value); - ::oteldemo::Address* unsafe_arena_release_shipping_address(); + // int32 nanos = 3; + void clear_nanos() ; + ::int32_t nanos() const; + void set_nanos(::int32_t value); private: - const ::oteldemo::Address& _internal_shipping_address() const; - ::oteldemo::Address* _internal_mutable_shipping_address(); + ::int32_t _internal_nanos() const; + void _internal_set_nanos(::int32_t value); public: - // @@protoc_insertion_point(class_scope:oteldemo.OrderResult) + // @@protoc_insertion_point(class_scope:oteldemo.Money) private: class _Internal; friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<3, 5, 3, 57, 2> _table_; + static const ::google::protobuf::internal::TcParseTable<2, 3, 0, 36, 2> _table_; template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; struct Impl_ { - ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::ArenaStringPtr currency_code_; + ::int64_t units_; + ::int32_t nanos_; mutable ::google::protobuf::internal::CachedSize _cached_size_; - ::google::protobuf::RepeatedPtrField< ::oteldemo::OrderItem > items_; - ::google::protobuf::internal::ArenaStringPtr order_id_; - ::google::protobuf::internal::ArenaStringPtr shipping_tracking_id_; - ::oteldemo::Money* shipping_cost_; - ::oteldemo::Address* shipping_address_; PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_demo_2eproto; };// ------------------------------------------------------------------- -class SendOrderConfirmationRequest final : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:oteldemo.SendOrderConfirmationRequest) */ { +class GetSupportedCurrenciesResponse final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:oteldemo.GetSupportedCurrenciesResponse) */ { public: - inline SendOrderConfirmationRequest() : SendOrderConfirmationRequest(nullptr) {} - ~SendOrderConfirmationRequest() override; + inline GetSupportedCurrenciesResponse() : GetSupportedCurrenciesResponse(nullptr) {} + ~GetSupportedCurrenciesResponse() override; template - explicit PROTOBUF_CONSTEXPR SendOrderConfirmationRequest(::google::protobuf::internal::ConstantInitialized); + explicit PROTOBUF_CONSTEXPR GetSupportedCurrenciesResponse(::google::protobuf::internal::ConstantInitialized); - SendOrderConfirmationRequest(const SendOrderConfirmationRequest& from); - SendOrderConfirmationRequest(SendOrderConfirmationRequest&& from) noexcept - : SendOrderConfirmationRequest() { + GetSupportedCurrenciesResponse(const GetSupportedCurrenciesResponse& from); + GetSupportedCurrenciesResponse(GetSupportedCurrenciesResponse&& from) noexcept + : GetSupportedCurrenciesResponse() { *this = ::std::move(from); } - inline SendOrderConfirmationRequest& operator=(const SendOrderConfirmationRequest& from) { + inline GetSupportedCurrenciesResponse& operator=(const GetSupportedCurrenciesResponse& from) { CopyFrom(from); return *this; } - inline SendOrderConfirmationRequest& operator=(SendOrderConfirmationRequest&& from) noexcept { + inline GetSupportedCurrenciesResponse& operator=(GetSupportedCurrenciesResponse&& from) noexcept { if (this == &from) return *this; if (GetOwningArena() == from.GetOwningArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE @@ -4977,20 +4881,20 @@ class SendOrderConfirmationRequest final : static const ::google::protobuf::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } - static const SendOrderConfirmationRequest& default_instance() { + static const GetSupportedCurrenciesResponse& default_instance() { return *internal_default_instance(); } - static inline const SendOrderConfirmationRequest* internal_default_instance() { - return reinterpret_cast( - &_SendOrderConfirmationRequest_default_instance_); + static inline const GetSupportedCurrenciesResponse* internal_default_instance() { + return reinterpret_cast( + &_GetSupportedCurrenciesResponse_default_instance_); } static constexpr int kIndexInFileMessages = 26; - friend void swap(SendOrderConfirmationRequest& a, SendOrderConfirmationRequest& b) { + friend void swap(GetSupportedCurrenciesResponse& a, GetSupportedCurrenciesResponse& b) { a.Swap(&b); } - inline void Swap(SendOrderConfirmationRequest* other) { + inline void Swap(GetSupportedCurrenciesResponse* other) { if (other == this) return; #ifdef PROTOBUF_FORCE_COPY_IN_SWAP if (GetOwningArena() != nullptr && @@ -5003,7 +4907,7 @@ class SendOrderConfirmationRequest final : ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(SendOrderConfirmationRequest* other) { + void UnsafeArenaSwap(GetSupportedCurrenciesResponse* other) { if (other == this) return; ABSL_DCHECK(GetOwningArena() == other->GetOwningArena()); InternalSwap(other); @@ -5011,14 +4915,14 @@ class SendOrderConfirmationRequest final : // implements Message ---------------------------------------------- - SendOrderConfirmationRequest* New(::google::protobuf::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); + GetSupportedCurrenciesResponse* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); } using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const SendOrderConfirmationRequest& from); + void CopyFrom(const GetSupportedCurrenciesResponse& from); using ::google::protobuf::Message::MergeFrom; - void MergeFrom( const SendOrderConfirmationRequest& from) { - SendOrderConfirmationRequest::MergeImpl(*this, from); + void MergeFrom( const GetSupportedCurrenciesResponse& from) { + GetSupportedCurrenciesResponse::MergeImpl(*this, from); } private: static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg); @@ -5036,15 +4940,15 @@ class SendOrderConfirmationRequest final : void SharedCtor(::google::protobuf::Arena* arena); void SharedDtor(); void SetCachedSize(int size) const final; - void InternalSwap(SendOrderConfirmationRequest* other); + void InternalSwap(GetSupportedCurrenciesResponse* other); private: friend class ::google::protobuf::internal::AnyMetadata; static ::absl::string_view FullMessageName() { - return "oteldemo.SendOrderConfirmationRequest"; + return "oteldemo.GetSupportedCurrenciesResponse"; } protected: - explicit SendOrderConfirmationRequest(::google::protobuf::Arena* arena); + explicit GetSupportedCurrenciesResponse(::google::protobuf::Arena* arena); public: static const ClassData _class_data_; @@ -5057,79 +4961,73 @@ class SendOrderConfirmationRequest final : // accessors ------------------------------------------------------- enum : int { - kEmailFieldNumber = 1, - kOrderFieldNumber = 2, + kCurrencyCodesFieldNumber = 1, }; - // string email = 1; - void clear_email() ; - const std::string& email() const; - template - void set_email(Arg_&& arg, Args_... args); - std::string* mutable_email(); - PROTOBUF_NODISCARD std::string* release_email(); - void set_allocated_email(std::string* ptr); - + // repeated string currency_codes = 1; + int currency_codes_size() const; private: - const std::string& _internal_email() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_email( - const std::string& value); - std::string* _internal_mutable_email(); + int _internal_currency_codes_size() const; public: - // .oteldemo.OrderResult order = 2; - bool has_order() const; - void clear_order() ; - const ::oteldemo::OrderResult& order() const; - PROTOBUF_NODISCARD ::oteldemo::OrderResult* release_order(); - ::oteldemo::OrderResult* mutable_order(); - void set_allocated_order(::oteldemo::OrderResult* value); - void unsafe_arena_set_allocated_order(::oteldemo::OrderResult* value); - ::oteldemo::OrderResult* unsafe_arena_release_order(); + void clear_currency_codes() ; + const std::string& currency_codes(int index) const; + std::string* mutable_currency_codes(int index); + void set_currency_codes(int index, const std::string& value); + void set_currency_codes(int index, std::string&& value); + void set_currency_codes(int index, const char* value); + void set_currency_codes(int index, const char* value, std::size_t size); + void set_currency_codes(int index, absl::string_view value); + std::string* add_currency_codes(); + void add_currency_codes(const std::string& value); + void add_currency_codes(std::string&& value); + void add_currency_codes(const char* value); + void add_currency_codes(const char* value, std::size_t size); + void add_currency_codes(absl::string_view value); + const ::google::protobuf::RepeatedPtrField& currency_codes() const; + ::google::protobuf::RepeatedPtrField* mutable_currency_codes(); private: - const ::oteldemo::OrderResult& _internal_order() const; - ::oteldemo::OrderResult* _internal_mutable_order(); + const ::google::protobuf::RepeatedPtrField& _internal_currency_codes() const; + ::google::protobuf::RepeatedPtrField* _internal_mutable_currency_codes(); public: - // @@protoc_insertion_point(class_scope:oteldemo.SendOrderConfirmationRequest) + // @@protoc_insertion_point(class_scope:oteldemo.GetSupportedCurrenciesResponse) private: class _Internal; friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<1, 2, 1, 51, 2> _table_; + static const ::google::protobuf::internal::TcParseTable<0, 1, 0, 62, 2> _table_; template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; struct Impl_ { - ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::RepeatedPtrField currency_codes_; mutable ::google::protobuf::internal::CachedSize _cached_size_; - ::google::protobuf::internal::ArenaStringPtr email_; - ::oteldemo::OrderResult* order_; PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_demo_2eproto; };// ------------------------------------------------------------------- -class PlaceOrderRequest final : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:oteldemo.PlaceOrderRequest) */ { +class CurrencyConversionRequest final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:oteldemo.CurrencyConversionRequest) */ { public: - inline PlaceOrderRequest() : PlaceOrderRequest(nullptr) {} - ~PlaceOrderRequest() override; + inline CurrencyConversionRequest() : CurrencyConversionRequest(nullptr) {} + ~CurrencyConversionRequest() override; template - explicit PROTOBUF_CONSTEXPR PlaceOrderRequest(::google::protobuf::internal::ConstantInitialized); + explicit PROTOBUF_CONSTEXPR CurrencyConversionRequest(::google::protobuf::internal::ConstantInitialized); - PlaceOrderRequest(const PlaceOrderRequest& from); - PlaceOrderRequest(PlaceOrderRequest&& from) noexcept - : PlaceOrderRequest() { + CurrencyConversionRequest(const CurrencyConversionRequest& from); + CurrencyConversionRequest(CurrencyConversionRequest&& from) noexcept + : CurrencyConversionRequest() { *this = ::std::move(from); } - inline PlaceOrderRequest& operator=(const PlaceOrderRequest& from) { + inline CurrencyConversionRequest& operator=(const CurrencyConversionRequest& from) { CopyFrom(from); return *this; } - inline PlaceOrderRequest& operator=(PlaceOrderRequest&& from) noexcept { + inline CurrencyConversionRequest& operator=(CurrencyConversionRequest&& from) noexcept { if (this == &from) return *this; if (GetOwningArena() == from.GetOwningArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE @@ -5159,20 +5057,20 @@ class PlaceOrderRequest final : static const ::google::protobuf::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } - static const PlaceOrderRequest& default_instance() { + static const CurrencyConversionRequest& default_instance() { return *internal_default_instance(); } - static inline const PlaceOrderRequest* internal_default_instance() { - return reinterpret_cast( - &_PlaceOrderRequest_default_instance_); + static inline const CurrencyConversionRequest* internal_default_instance() { + return reinterpret_cast( + &_CurrencyConversionRequest_default_instance_); } static constexpr int kIndexInFileMessages = 27; - friend void swap(PlaceOrderRequest& a, PlaceOrderRequest& b) { + friend void swap(CurrencyConversionRequest& a, CurrencyConversionRequest& b) { a.Swap(&b); } - inline void Swap(PlaceOrderRequest* other) { + inline void Swap(CurrencyConversionRequest* other) { if (other == this) return; #ifdef PROTOBUF_FORCE_COPY_IN_SWAP if (GetOwningArena() != nullptr && @@ -5185,7 +5083,7 @@ class PlaceOrderRequest final : ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(PlaceOrderRequest* other) { + void UnsafeArenaSwap(CurrencyConversionRequest* other) { if (other == this) return; ABSL_DCHECK(GetOwningArena() == other->GetOwningArena()); InternalSwap(other); @@ -5193,14 +5091,14 @@ class PlaceOrderRequest final : // implements Message ---------------------------------------------- - PlaceOrderRequest* New(::google::protobuf::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); + CurrencyConversionRequest* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); } using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const PlaceOrderRequest& from); + void CopyFrom(const CurrencyConversionRequest& from); using ::google::protobuf::Message::MergeFrom; - void MergeFrom( const PlaceOrderRequest& from) { - PlaceOrderRequest::MergeImpl(*this, from); + void MergeFrom( const CurrencyConversionRequest& from) { + CurrencyConversionRequest::MergeImpl(*this, from); } private: static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg); @@ -5218,15 +5116,15 @@ class PlaceOrderRequest final : void SharedCtor(::google::protobuf::Arena* arena); void SharedDtor(); void SetCachedSize(int size) const final; - void InternalSwap(PlaceOrderRequest* other); + void InternalSwap(CurrencyConversionRequest* other); private: friend class ::google::protobuf::internal::AnyMetadata; static ::absl::string_view FullMessageName() { - return "oteldemo.PlaceOrderRequest"; + return "oteldemo.CurrencyConversionRequest"; } protected: - explicit PlaceOrderRequest(::google::protobuf::Arena* arena); + explicit CurrencyConversionRequest(::google::protobuf::Arena* arena); public: static const ClassData _class_data_; @@ -5239,132 +5137,79 @@ class PlaceOrderRequest final : // accessors ------------------------------------------------------- enum : int { - kUserIdFieldNumber = 1, - kUserCurrencyFieldNumber = 2, - kEmailFieldNumber = 5, - kAddressFieldNumber = 3, - kCreditCardFieldNumber = 6, + kToCodeFieldNumber = 2, + kFromFieldNumber = 1, }; - // string user_id = 1; - void clear_user_id() ; - const std::string& user_id() const; - template - void set_user_id(Arg_&& arg, Args_... args); - std::string* mutable_user_id(); - PROTOBUF_NODISCARD std::string* release_user_id(); - void set_allocated_user_id(std::string* ptr); - - private: - const std::string& _internal_user_id() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_user_id( - const std::string& value); - std::string* _internal_mutable_user_id(); - - public: - // string user_currency = 2; - void clear_user_currency() ; - const std::string& user_currency() const; - template - void set_user_currency(Arg_&& arg, Args_... args); - std::string* mutable_user_currency(); - PROTOBUF_NODISCARD std::string* release_user_currency(); - void set_allocated_user_currency(std::string* ptr); - - private: - const std::string& _internal_user_currency() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_user_currency( - const std::string& value); - std::string* _internal_mutable_user_currency(); - - public: - // string email = 5; - void clear_email() ; - const std::string& email() const; + // string to_code = 2; + void clear_to_code() ; + const std::string& to_code() const; template - void set_email(Arg_&& arg, Args_... args); - std::string* mutable_email(); - PROTOBUF_NODISCARD std::string* release_email(); - void set_allocated_email(std::string* ptr); + void set_to_code(Arg_&& arg, Args_... args); + std::string* mutable_to_code(); + PROTOBUF_NODISCARD std::string* release_to_code(); + void set_allocated_to_code(std::string* ptr); private: - const std::string& _internal_email() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_email( + const std::string& _internal_to_code() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_to_code( const std::string& value); - std::string* _internal_mutable_email(); - - public: - // .oteldemo.Address address = 3; - bool has_address() const; - void clear_address() ; - const ::oteldemo::Address& address() const; - PROTOBUF_NODISCARD ::oteldemo::Address* release_address(); - ::oteldemo::Address* mutable_address(); - void set_allocated_address(::oteldemo::Address* value); - void unsafe_arena_set_allocated_address(::oteldemo::Address* value); - ::oteldemo::Address* unsafe_arena_release_address(); - - private: - const ::oteldemo::Address& _internal_address() const; - ::oteldemo::Address* _internal_mutable_address(); + std::string* _internal_mutable_to_code(); public: - // .oteldemo.CreditCardInfo credit_card = 6; - bool has_credit_card() const; - void clear_credit_card() ; - const ::oteldemo::CreditCardInfo& credit_card() const; - PROTOBUF_NODISCARD ::oteldemo::CreditCardInfo* release_credit_card(); - ::oteldemo::CreditCardInfo* mutable_credit_card(); - void set_allocated_credit_card(::oteldemo::CreditCardInfo* value); - void unsafe_arena_set_allocated_credit_card(::oteldemo::CreditCardInfo* value); - ::oteldemo::CreditCardInfo* unsafe_arena_release_credit_card(); + // .oteldemo.Money from = 1; + bool has_from() const; + void clear_from() ; + const ::oteldemo::Money& from() const; + PROTOBUF_NODISCARD ::oteldemo::Money* release_from(); + ::oteldemo::Money* mutable_from(); + void set_allocated_from(::oteldemo::Money* value); + void unsafe_arena_set_allocated_from(::oteldemo::Money* value); + ::oteldemo::Money* unsafe_arena_release_from(); private: - const ::oteldemo::CreditCardInfo& _internal_credit_card() const; - ::oteldemo::CreditCardInfo* _internal_mutable_credit_card(); + const ::oteldemo::Money& _internal_from() const; + ::oteldemo::Money* _internal_mutable_from(); public: - // @@protoc_insertion_point(class_scope:oteldemo.PlaceOrderRequest) + // @@protoc_insertion_point(class_scope:oteldemo.CurrencyConversionRequest) private: class _Internal; friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<3, 5, 2, 60, 2> _table_; + static const ::google::protobuf::internal::TcParseTable<1, 2, 1, 50, 2> _table_; template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; struct Impl_ { ::google::protobuf::internal::HasBits<1> _has_bits_; mutable ::google::protobuf::internal::CachedSize _cached_size_; - ::google::protobuf::internal::ArenaStringPtr user_id_; - ::google::protobuf::internal::ArenaStringPtr user_currency_; - ::google::protobuf::internal::ArenaStringPtr email_; - ::oteldemo::Address* address_; - ::oteldemo::CreditCardInfo* credit_card_; + ::google::protobuf::internal::ArenaStringPtr to_code_; + ::oteldemo::Money* from_; PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_demo_2eproto; };// ------------------------------------------------------------------- -class PlaceOrderResponse final : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:oteldemo.PlaceOrderResponse) */ { +class CreditCardInfo final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:oteldemo.CreditCardInfo) */ { public: - inline PlaceOrderResponse() : PlaceOrderResponse(nullptr) {} - ~PlaceOrderResponse() override; + inline CreditCardInfo() : CreditCardInfo(nullptr) {} + ~CreditCardInfo() override; template - explicit PROTOBUF_CONSTEXPR PlaceOrderResponse(::google::protobuf::internal::ConstantInitialized); + explicit PROTOBUF_CONSTEXPR CreditCardInfo(::google::protobuf::internal::ConstantInitialized); - PlaceOrderResponse(const PlaceOrderResponse& from); - PlaceOrderResponse(PlaceOrderResponse&& from) noexcept - : PlaceOrderResponse() { + CreditCardInfo(const CreditCardInfo& from); + CreditCardInfo(CreditCardInfo&& from) noexcept + : CreditCardInfo() { *this = ::std::move(from); } - inline PlaceOrderResponse& operator=(const PlaceOrderResponse& from) { + inline CreditCardInfo& operator=(const CreditCardInfo& from) { CopyFrom(from); return *this; } - inline PlaceOrderResponse& operator=(PlaceOrderResponse&& from) noexcept { + inline CreditCardInfo& operator=(CreditCardInfo&& from) noexcept { if (this == &from) return *this; if (GetOwningArena() == from.GetOwningArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE @@ -5394,20 +5239,20 @@ class PlaceOrderResponse final : static const ::google::protobuf::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } - static const PlaceOrderResponse& default_instance() { + static const CreditCardInfo& default_instance() { return *internal_default_instance(); } - static inline const PlaceOrderResponse* internal_default_instance() { - return reinterpret_cast( - &_PlaceOrderResponse_default_instance_); + static inline const CreditCardInfo* internal_default_instance() { + return reinterpret_cast( + &_CreditCardInfo_default_instance_); } static constexpr int kIndexInFileMessages = 28; - friend void swap(PlaceOrderResponse& a, PlaceOrderResponse& b) { + friend void swap(CreditCardInfo& a, CreditCardInfo& b) { a.Swap(&b); } - inline void Swap(PlaceOrderResponse* other) { + inline void Swap(CreditCardInfo* other) { if (other == this) return; #ifdef PROTOBUF_FORCE_COPY_IN_SWAP if (GetOwningArena() != nullptr && @@ -5420,7 +5265,7 @@ class PlaceOrderResponse final : ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(PlaceOrderResponse* other) { + void UnsafeArenaSwap(CreditCardInfo* other) { if (other == this) return; ABSL_DCHECK(GetOwningArena() == other->GetOwningArena()); InternalSwap(other); @@ -5428,14 +5273,14 @@ class PlaceOrderResponse final : // implements Message ---------------------------------------------- - PlaceOrderResponse* New(::google::protobuf::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); + CreditCardInfo* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); } using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const PlaceOrderResponse& from); + void CopyFrom(const CreditCardInfo& from); using ::google::protobuf::Message::MergeFrom; - void MergeFrom( const PlaceOrderResponse& from) { - PlaceOrderResponse::MergeImpl(*this, from); + void MergeFrom( const CreditCardInfo& from) { + CreditCardInfo::MergeImpl(*this, from); } private: static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg); @@ -5453,15 +5298,15 @@ class PlaceOrderResponse final : void SharedCtor(::google::protobuf::Arena* arena); void SharedDtor(); void SetCachedSize(int size) const final; - void InternalSwap(PlaceOrderResponse* other); + void InternalSwap(CreditCardInfo* other); private: friend class ::google::protobuf::internal::AnyMetadata; static ::absl::string_view FullMessageName() { - return "oteldemo.PlaceOrderResponse"; + return "oteldemo.CreditCardInfo"; } protected: - explicit PlaceOrderResponse(::google::protobuf::Arena* arena); + explicit CreditCardInfo(::google::protobuf::Arena* arena); public: static const ClassData _class_data_; @@ -5474,61 +5319,97 @@ class PlaceOrderResponse final : // accessors ------------------------------------------------------- enum : int { - kOrderFieldNumber = 1, + kCreditCardNumberFieldNumber = 1, + kCreditCardCvvFieldNumber = 2, + kCreditCardExpirationYearFieldNumber = 3, + kCreditCardExpirationMonthFieldNumber = 4, }; - // .oteldemo.OrderResult order = 1; - bool has_order() const; - void clear_order() ; - const ::oteldemo::OrderResult& order() const; - PROTOBUF_NODISCARD ::oteldemo::OrderResult* release_order(); - ::oteldemo::OrderResult* mutable_order(); - void set_allocated_order(::oteldemo::OrderResult* value); - void unsafe_arena_set_allocated_order(::oteldemo::OrderResult* value); - ::oteldemo::OrderResult* unsafe_arena_release_order(); + // string credit_card_number = 1; + void clear_credit_card_number() ; + const std::string& credit_card_number() const; + template + void set_credit_card_number(Arg_&& arg, Args_... args); + std::string* mutable_credit_card_number(); + PROTOBUF_NODISCARD std::string* release_credit_card_number(); + void set_allocated_credit_card_number(std::string* ptr); private: - const ::oteldemo::OrderResult& _internal_order() const; - ::oteldemo::OrderResult* _internal_mutable_order(); + const std::string& _internal_credit_card_number() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_credit_card_number( + const std::string& value); + std::string* _internal_mutable_credit_card_number(); public: - // @@protoc_insertion_point(class_scope:oteldemo.PlaceOrderResponse) + // int32 credit_card_cvv = 2; + void clear_credit_card_cvv() ; + ::int32_t credit_card_cvv() const; + void set_credit_card_cvv(::int32_t value); + + private: + ::int32_t _internal_credit_card_cvv() const; + void _internal_set_credit_card_cvv(::int32_t value); + + public: + // int32 credit_card_expiration_year = 3; + void clear_credit_card_expiration_year() ; + ::int32_t credit_card_expiration_year() const; + void set_credit_card_expiration_year(::int32_t value); + + private: + ::int32_t _internal_credit_card_expiration_year() const; + void _internal_set_credit_card_expiration_year(::int32_t value); + + public: + // int32 credit_card_expiration_month = 4; + void clear_credit_card_expiration_month() ; + ::int32_t credit_card_expiration_month() const; + void set_credit_card_expiration_month(::int32_t value); + + private: + ::int32_t _internal_credit_card_expiration_month() const; + void _internal_set_credit_card_expiration_month(::int32_t value); + + public: + // @@protoc_insertion_point(class_scope:oteldemo.CreditCardInfo) private: class _Internal; friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<0, 1, 1, 0, 2> _table_; + static const ::google::protobuf::internal::TcParseTable<2, 4, 0, 50, 2> _table_; template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; struct Impl_ { - ::google::protobuf::internal::HasBits<1> _has_bits_; + ::google::protobuf::internal::ArenaStringPtr credit_card_number_; + ::int32_t credit_card_cvv_; + ::int32_t credit_card_expiration_year_; + ::int32_t credit_card_expiration_month_; mutable ::google::protobuf::internal::CachedSize _cached_size_; - ::oteldemo::OrderResult* order_; PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_demo_2eproto; };// ------------------------------------------------------------------- -class AdRequest final : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:oteldemo.AdRequest) */ { +class ChargeRequest final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:oteldemo.ChargeRequest) */ { public: - inline AdRequest() : AdRequest(nullptr) {} - ~AdRequest() override; + inline ChargeRequest() : ChargeRequest(nullptr) {} + ~ChargeRequest() override; template - explicit PROTOBUF_CONSTEXPR AdRequest(::google::protobuf::internal::ConstantInitialized); + explicit PROTOBUF_CONSTEXPR ChargeRequest(::google::protobuf::internal::ConstantInitialized); - AdRequest(const AdRequest& from); - AdRequest(AdRequest&& from) noexcept - : AdRequest() { + ChargeRequest(const ChargeRequest& from); + ChargeRequest(ChargeRequest&& from) noexcept + : ChargeRequest() { *this = ::std::move(from); } - inline AdRequest& operator=(const AdRequest& from) { + inline ChargeRequest& operator=(const ChargeRequest& from) { CopyFrom(from); return *this; } - inline AdRequest& operator=(AdRequest&& from) noexcept { + inline ChargeRequest& operator=(ChargeRequest&& from) noexcept { if (this == &from) return *this; if (GetOwningArena() == from.GetOwningArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE @@ -5558,20 +5439,20 @@ class AdRequest final : static const ::google::protobuf::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } - static const AdRequest& default_instance() { + static const ChargeRequest& default_instance() { return *internal_default_instance(); } - static inline const AdRequest* internal_default_instance() { - return reinterpret_cast( - &_AdRequest_default_instance_); + static inline const ChargeRequest* internal_default_instance() { + return reinterpret_cast( + &_ChargeRequest_default_instance_); } static constexpr int kIndexInFileMessages = 29; - friend void swap(AdRequest& a, AdRequest& b) { + friend void swap(ChargeRequest& a, ChargeRequest& b) { a.Swap(&b); } - inline void Swap(AdRequest* other) { + inline void Swap(ChargeRequest* other) { if (other == this) return; #ifdef PROTOBUF_FORCE_COPY_IN_SWAP if (GetOwningArena() != nullptr && @@ -5584,7 +5465,7 @@ class AdRequest final : ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(AdRequest* other) { + void UnsafeArenaSwap(ChargeRequest* other) { if (other == this) return; ABSL_DCHECK(GetOwningArena() == other->GetOwningArena()); InternalSwap(other); @@ -5592,14 +5473,14 @@ class AdRequest final : // implements Message ---------------------------------------------- - AdRequest* New(::google::protobuf::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); + ChargeRequest* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); } using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const AdRequest& from); + void CopyFrom(const ChargeRequest& from); using ::google::protobuf::Message::MergeFrom; - void MergeFrom( const AdRequest& from) { - AdRequest::MergeImpl(*this, from); + void MergeFrom( const ChargeRequest& from) { + ChargeRequest::MergeImpl(*this, from); } private: static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg); @@ -5617,15 +5498,15 @@ class AdRequest final : void SharedCtor(::google::protobuf::Arena* arena); void SharedDtor(); void SetCachedSize(int size) const final; - void InternalSwap(AdRequest* other); + void InternalSwap(ChargeRequest* other); private: friend class ::google::protobuf::internal::AnyMetadata; static ::absl::string_view FullMessageName() { - return "oteldemo.AdRequest"; + return "oteldemo.ChargeRequest"; } protected: - explicit AdRequest(::google::protobuf::Arena* arena); + explicit ChargeRequest(::google::protobuf::Arena* arena); public: static const ClassData _class_data_; @@ -5638,73 +5519,78 @@ class AdRequest final : // accessors ------------------------------------------------------- enum : int { - kContextKeysFieldNumber = 1, + kAmountFieldNumber = 1, + kCreditCardFieldNumber = 2, }; - // repeated string context_keys = 1; - int context_keys_size() const; + // .oteldemo.Money amount = 1; + bool has_amount() const; + void clear_amount() ; + const ::oteldemo::Money& amount() const; + PROTOBUF_NODISCARD ::oteldemo::Money* release_amount(); + ::oteldemo::Money* mutable_amount(); + void set_allocated_amount(::oteldemo::Money* value); + void unsafe_arena_set_allocated_amount(::oteldemo::Money* value); + ::oteldemo::Money* unsafe_arena_release_amount(); + private: - int _internal_context_keys_size() const; + const ::oteldemo::Money& _internal_amount() const; + ::oteldemo::Money* _internal_mutable_amount(); public: - void clear_context_keys() ; - const std::string& context_keys(int index) const; - std::string* mutable_context_keys(int index); - void set_context_keys(int index, const std::string& value); - void set_context_keys(int index, std::string&& value); - void set_context_keys(int index, const char* value); - void set_context_keys(int index, const char* value, std::size_t size); - void set_context_keys(int index, absl::string_view value); - std::string* add_context_keys(); - void add_context_keys(const std::string& value); - void add_context_keys(std::string&& value); - void add_context_keys(const char* value); - void add_context_keys(const char* value, std::size_t size); - void add_context_keys(absl::string_view value); - const ::google::protobuf::RepeatedPtrField& context_keys() const; - ::google::protobuf::RepeatedPtrField* mutable_context_keys(); + // .oteldemo.CreditCardInfo credit_card = 2; + bool has_credit_card() const; + void clear_credit_card() ; + const ::oteldemo::CreditCardInfo& credit_card() const; + PROTOBUF_NODISCARD ::oteldemo::CreditCardInfo* release_credit_card(); + ::oteldemo::CreditCardInfo* mutable_credit_card(); + void set_allocated_credit_card(::oteldemo::CreditCardInfo* value); + void unsafe_arena_set_allocated_credit_card(::oteldemo::CreditCardInfo* value); + ::oteldemo::CreditCardInfo* unsafe_arena_release_credit_card(); private: - const ::google::protobuf::RepeatedPtrField& _internal_context_keys() const; - ::google::protobuf::RepeatedPtrField* _internal_mutable_context_keys(); + const ::oteldemo::CreditCardInfo& _internal_credit_card() const; + ::oteldemo::CreditCardInfo* _internal_mutable_credit_card(); public: - // @@protoc_insertion_point(class_scope:oteldemo.AdRequest) + // @@protoc_insertion_point(class_scope:oteldemo.ChargeRequest) private: class _Internal; friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<0, 1, 0, 39, 2> _table_; + static const ::google::protobuf::internal::TcParseTable<1, 2, 2, 0, 2> _table_; template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; struct Impl_ { - ::google::protobuf::RepeatedPtrField context_keys_; + ::google::protobuf::internal::HasBits<1> _has_bits_; mutable ::google::protobuf::internal::CachedSize _cached_size_; + ::oteldemo::Money* amount_; + ::oteldemo::CreditCardInfo* credit_card_; PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_demo_2eproto; };// ------------------------------------------------------------------- -class AdResponse final : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:oteldemo.AdResponse) */ { +class ChargeResponse final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:oteldemo.ChargeResponse) */ { public: - inline AdResponse() : AdResponse(nullptr) {} - ~AdResponse() override; + inline ChargeResponse() : ChargeResponse(nullptr) {} + ~ChargeResponse() override; template - explicit PROTOBUF_CONSTEXPR AdResponse(::google::protobuf::internal::ConstantInitialized); + explicit PROTOBUF_CONSTEXPR ChargeResponse(::google::protobuf::internal::ConstantInitialized); - AdResponse(const AdResponse& from); - AdResponse(AdResponse&& from) noexcept - : AdResponse() { + ChargeResponse(const ChargeResponse& from); + ChargeResponse(ChargeResponse&& from) noexcept + : ChargeResponse() { *this = ::std::move(from); } - inline AdResponse& operator=(const AdResponse& from) { + inline ChargeResponse& operator=(const ChargeResponse& from) { CopyFrom(from); return *this; } - inline AdResponse& operator=(AdResponse&& from) noexcept { + inline ChargeResponse& operator=(ChargeResponse&& from) noexcept { if (this == &from) return *this; if (GetOwningArena() == from.GetOwningArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE @@ -5734,20 +5620,20 @@ class AdResponse final : static const ::google::protobuf::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } - static const AdResponse& default_instance() { + static const ChargeResponse& default_instance() { return *internal_default_instance(); } - static inline const AdResponse* internal_default_instance() { - return reinterpret_cast( - &_AdResponse_default_instance_); + static inline const ChargeResponse* internal_default_instance() { + return reinterpret_cast( + &_ChargeResponse_default_instance_); } static constexpr int kIndexInFileMessages = 30; - friend void swap(AdResponse& a, AdResponse& b) { + friend void swap(ChargeResponse& a, ChargeResponse& b) { a.Swap(&b); } - inline void Swap(AdResponse* other) { + inline void Swap(ChargeResponse* other) { if (other == this) return; #ifdef PROTOBUF_FORCE_COPY_IN_SWAP if (GetOwningArena() != nullptr && @@ -5760,7 +5646,7 @@ class AdResponse final : ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(AdResponse* other) { + void UnsafeArenaSwap(ChargeResponse* other) { if (other == this) return; ABSL_DCHECK(GetOwningArena() == other->GetOwningArena()); InternalSwap(other); @@ -5768,14 +5654,14 @@ class AdResponse final : // implements Message ---------------------------------------------- - AdResponse* New(::google::protobuf::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); + ChargeResponse* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); } using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const AdResponse& from); + void CopyFrom(const ChargeResponse& from); using ::google::protobuf::Message::MergeFrom; - void MergeFrom( const AdResponse& from) { - AdResponse::MergeImpl(*this, from); + void MergeFrom( const ChargeResponse& from) { + ChargeResponse::MergeImpl(*this, from); } private: static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg); @@ -5793,15 +5679,15 @@ class AdResponse final : void SharedCtor(::google::protobuf::Arena* arena); void SharedDtor(); void SetCachedSize(int size) const final; - void InternalSwap(AdResponse* other); + void InternalSwap(ChargeResponse* other); private: friend class ::google::protobuf::internal::AnyMetadata; static ::absl::string_view FullMessageName() { - return "oteldemo.AdResponse"; + return "oteldemo.ChargeResponse"; } protected: - explicit AdResponse(::google::protobuf::Arena* arena); + explicit ChargeResponse(::google::protobuf::Arena* arena); public: static const ClassData _class_data_; @@ -5814,37 +5700,35 @@ class AdResponse final : // accessors ------------------------------------------------------- enum : int { - kAdsFieldNumber = 1, + kTransactionIdFieldNumber = 1, }; - // repeated .oteldemo.Ad ads = 1; - int ads_size() const; - private: - int _internal_ads_size() const; + // string transaction_id = 1; + void clear_transaction_id() ; + const std::string& transaction_id() const; + template + void set_transaction_id(Arg_&& arg, Args_... args); + std::string* mutable_transaction_id(); + PROTOBUF_NODISCARD std::string* release_transaction_id(); + void set_allocated_transaction_id(std::string* ptr); - public: - void clear_ads() ; - ::oteldemo::Ad* mutable_ads(int index); - ::google::protobuf::RepeatedPtrField< ::oteldemo::Ad >* - mutable_ads(); private: - const ::google::protobuf::RepeatedPtrField<::oteldemo::Ad>& _internal_ads() const; - ::google::protobuf::RepeatedPtrField<::oteldemo::Ad>* _internal_mutable_ads(); + const std::string& _internal_transaction_id() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_transaction_id( + const std::string& value); + std::string* _internal_mutable_transaction_id(); + public: - const ::oteldemo::Ad& ads(int index) const; - ::oteldemo::Ad* add_ads(); - const ::google::protobuf::RepeatedPtrField< ::oteldemo::Ad >& - ads() const; - // @@protoc_insertion_point(class_scope:oteldemo.AdResponse) + // @@protoc_insertion_point(class_scope:oteldemo.ChargeResponse) private: class _Internal; friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<0, 1, 1, 0, 2> _table_; + static const ::google::protobuf::internal::TcParseTable<0, 1, 0, 46, 2> _table_; template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; struct Impl_ { - ::google::protobuf::RepeatedPtrField< ::oteldemo::Ad > ads_; + ::google::protobuf::internal::ArenaStringPtr transaction_id_; mutable ::google::protobuf::internal::CachedSize _cached_size_; PROTOBUF_TSAN_DECLARE_MEMBER }; @@ -5852,25 +5736,25 @@ class AdResponse final : friend struct ::TableStruct_demo_2eproto; };// ------------------------------------------------------------------- -class Ad final : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:oteldemo.Ad) */ { +class OrderItem final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:oteldemo.OrderItem) */ { public: - inline Ad() : Ad(nullptr) {} - ~Ad() override; + inline OrderItem() : OrderItem(nullptr) {} + ~OrderItem() override; template - explicit PROTOBUF_CONSTEXPR Ad(::google::protobuf::internal::ConstantInitialized); + explicit PROTOBUF_CONSTEXPR OrderItem(::google::protobuf::internal::ConstantInitialized); - Ad(const Ad& from); - Ad(Ad&& from) noexcept - : Ad() { + OrderItem(const OrderItem& from); + OrderItem(OrderItem&& from) noexcept + : OrderItem() { *this = ::std::move(from); } - inline Ad& operator=(const Ad& from) { + inline OrderItem& operator=(const OrderItem& from) { CopyFrom(from); return *this; } - inline Ad& operator=(Ad&& from) noexcept { + inline OrderItem& operator=(OrderItem&& from) noexcept { if (this == &from) return *this; if (GetOwningArena() == from.GetOwningArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE @@ -5900,20 +5784,20 @@ class Ad final : static const ::google::protobuf::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } - static const Ad& default_instance() { + static const OrderItem& default_instance() { return *internal_default_instance(); } - static inline const Ad* internal_default_instance() { - return reinterpret_cast( - &_Ad_default_instance_); + static inline const OrderItem* internal_default_instance() { + return reinterpret_cast( + &_OrderItem_default_instance_); } static constexpr int kIndexInFileMessages = 31; - friend void swap(Ad& a, Ad& b) { + friend void swap(OrderItem& a, OrderItem& b) { a.Swap(&b); } - inline void Swap(Ad* other) { + inline void Swap(OrderItem* other) { if (other == this) return; #ifdef PROTOBUF_FORCE_COPY_IN_SWAP if (GetOwningArena() != nullptr && @@ -5926,7 +5810,7 @@ class Ad final : ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(Ad* other) { + void UnsafeArenaSwap(OrderItem* other) { if (other == this) return; ABSL_DCHECK(GetOwningArena() == other->GetOwningArena()); InternalSwap(other); @@ -5934,14 +5818,14 @@ class Ad final : // implements Message ---------------------------------------------- - Ad* New(::google::protobuf::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); + OrderItem* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); } using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const Ad& from); + void CopyFrom(const OrderItem& from); using ::google::protobuf::Message::MergeFrom; - void MergeFrom( const Ad& from) { - Ad::MergeImpl(*this, from); + void MergeFrom( const OrderItem& from) { + OrderItem::MergeImpl(*this, from); } private: static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg); @@ -5959,15 +5843,15 @@ class Ad final : void SharedCtor(::google::protobuf::Arena* arena); void SharedDtor(); void SetCachedSize(int size) const final; - void InternalSwap(Ad* other); + void InternalSwap(OrderItem* other); private: friend class ::google::protobuf::internal::AnyMetadata; static ::absl::string_view FullMessageName() { - return "oteldemo.Ad"; + return "oteldemo.OrderItem"; } protected: - explicit Ad(::google::protobuf::Arena* arena); + explicit OrderItem(::google::protobuf::Arena* arena); public: static const ClassData _class_data_; @@ -5980,79 +5864,78 @@ class Ad final : // accessors ------------------------------------------------------- enum : int { - kRedirectUrlFieldNumber = 1, - kTextFieldNumber = 2, + kItemFieldNumber = 1, + kCostFieldNumber = 2, }; - // string redirect_url = 1; - void clear_redirect_url() ; - const std::string& redirect_url() const; - template - void set_redirect_url(Arg_&& arg, Args_... args); - std::string* mutable_redirect_url(); - PROTOBUF_NODISCARD std::string* release_redirect_url(); - void set_allocated_redirect_url(std::string* ptr); + // .oteldemo.CartItem item = 1; + bool has_item() const; + void clear_item() ; + const ::oteldemo::CartItem& item() const; + PROTOBUF_NODISCARD ::oteldemo::CartItem* release_item(); + ::oteldemo::CartItem* mutable_item(); + void set_allocated_item(::oteldemo::CartItem* value); + void unsafe_arena_set_allocated_item(::oteldemo::CartItem* value); + ::oteldemo::CartItem* unsafe_arena_release_item(); private: - const std::string& _internal_redirect_url() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_redirect_url( - const std::string& value); - std::string* _internal_mutable_redirect_url(); + const ::oteldemo::CartItem& _internal_item() const; + ::oteldemo::CartItem* _internal_mutable_item(); public: - // string text = 2; - void clear_text() ; - const std::string& text() const; - template - void set_text(Arg_&& arg, Args_... args); - std::string* mutable_text(); - PROTOBUF_NODISCARD std::string* release_text(); - void set_allocated_text(std::string* ptr); + // .oteldemo.Money cost = 2; + bool has_cost() const; + void clear_cost() ; + const ::oteldemo::Money& cost() const; + PROTOBUF_NODISCARD ::oteldemo::Money* release_cost(); + ::oteldemo::Money* mutable_cost(); + void set_allocated_cost(::oteldemo::Money* value); + void unsafe_arena_set_allocated_cost(::oteldemo::Money* value); + ::oteldemo::Money* unsafe_arena_release_cost(); private: - const std::string& _internal_text() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_text( - const std::string& value); - std::string* _internal_mutable_text(); + const ::oteldemo::Money& _internal_cost() const; + ::oteldemo::Money* _internal_mutable_cost(); public: - // @@protoc_insertion_point(class_scope:oteldemo.Ad) + // @@protoc_insertion_point(class_scope:oteldemo.OrderItem) private: class _Internal; friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<1, 2, 0, 36, 2> _table_; + static const ::google::protobuf::internal::TcParseTable<1, 2, 2, 0, 2> _table_; template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; struct Impl_ { - ::google::protobuf::internal::ArenaStringPtr redirect_url_; - ::google::protobuf::internal::ArenaStringPtr text_; + ::google::protobuf::internal::HasBits<1> _has_bits_; mutable ::google::protobuf::internal::CachedSize _cached_size_; + ::oteldemo::CartItem* item_; + ::oteldemo::Money* cost_; PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_demo_2eproto; };// ------------------------------------------------------------------- -class Flag final : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:oteldemo.Flag) */ { +class OrderResult final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:oteldemo.OrderResult) */ { public: - inline Flag() : Flag(nullptr) {} - ~Flag() override; + inline OrderResult() : OrderResult(nullptr) {} + ~OrderResult() override; template - explicit PROTOBUF_CONSTEXPR Flag(::google::protobuf::internal::ConstantInitialized); + explicit PROTOBUF_CONSTEXPR OrderResult(::google::protobuf::internal::ConstantInitialized); - Flag(const Flag& from); - Flag(Flag&& from) noexcept - : Flag() { + OrderResult(const OrderResult& from); + OrderResult(OrderResult&& from) noexcept + : OrderResult() { *this = ::std::move(from); } - inline Flag& operator=(const Flag& from) { + inline OrderResult& operator=(const OrderResult& from) { CopyFrom(from); return *this; } - inline Flag& operator=(Flag&& from) noexcept { + inline OrderResult& operator=(OrderResult&& from) noexcept { if (this == &from) return *this; if (GetOwningArena() == from.GetOwningArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE @@ -6082,20 +5965,20 @@ class Flag final : static const ::google::protobuf::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } - static const Flag& default_instance() { + static const OrderResult& default_instance() { return *internal_default_instance(); } - static inline const Flag* internal_default_instance() { - return reinterpret_cast( - &_Flag_default_instance_); + static inline const OrderResult* internal_default_instance() { + return reinterpret_cast( + &_OrderResult_default_instance_); } static constexpr int kIndexInFileMessages = 32; - friend void swap(Flag& a, Flag& b) { + friend void swap(OrderResult& a, OrderResult& b) { a.Swap(&b); } - inline void Swap(Flag* other) { + inline void Swap(OrderResult* other) { if (other == this) return; #ifdef PROTOBUF_FORCE_COPY_IN_SWAP if (GetOwningArena() != nullptr && @@ -6108,7 +5991,7 @@ class Flag final : ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(Flag* other) { + void UnsafeArenaSwap(OrderResult* other) { if (other == this) return; ABSL_DCHECK(GetOwningArena() == other->GetOwningArena()); InternalSwap(other); @@ -6116,14 +5999,14 @@ class Flag final : // implements Message ---------------------------------------------- - Flag* New(::google::protobuf::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); + OrderResult* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); } using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const Flag& from); + void CopyFrom(const OrderResult& from); using ::google::protobuf::Message::MergeFrom; - void MergeFrom( const Flag& from) { - Flag::MergeImpl(*this, from); + void MergeFrom( const OrderResult& from) { + OrderResult::MergeImpl(*this, from); } private: static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg); @@ -6141,15 +6024,15 @@ class Flag final : void SharedCtor(::google::protobuf::Arena* arena); void SharedDtor(); void SetCachedSize(int size) const final; - void InternalSwap(Flag* other); + void InternalSwap(OrderResult* other); private: friend class ::google::protobuf::internal::AnyMetadata; static ::absl::string_view FullMessageName() { - return "oteldemo.Flag"; + return "oteldemo.OrderResult"; } protected: - explicit Flag(::google::protobuf::Arena* arena); + explicit OrderResult(::google::protobuf::Arena* arena); public: static const ClassData _class_data_; @@ -6162,91 +6045,134 @@ class Flag final : // accessors ------------------------------------------------------- enum : int { - kNameFieldNumber = 1, - kDescriptionFieldNumber = 2, - kEnabledFieldNumber = 3, + kItemsFieldNumber = 5, + kOrderIdFieldNumber = 1, + kShippingTrackingIdFieldNumber = 2, + kShippingCostFieldNumber = 3, + kShippingAddressFieldNumber = 4, }; - // string name = 1; - void clear_name() ; - const std::string& name() const; - template - void set_name(Arg_&& arg, Args_... args); - std::string* mutable_name(); - PROTOBUF_NODISCARD std::string* release_name(); - void set_allocated_name(std::string* ptr); - + // repeated .oteldemo.OrderItem items = 5; + int items_size() const; private: - const std::string& _internal_name() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_name( - const std::string& value); - std::string* _internal_mutable_name(); + int _internal_items_size() const; public: - // string description = 2; - void clear_description() ; - const std::string& description() const; + void clear_items() ; + ::oteldemo::OrderItem* mutable_items(int index); + ::google::protobuf::RepeatedPtrField< ::oteldemo::OrderItem >* + mutable_items(); + private: + const ::google::protobuf::RepeatedPtrField<::oteldemo::OrderItem>& _internal_items() const; + ::google::protobuf::RepeatedPtrField<::oteldemo::OrderItem>* _internal_mutable_items(); + public: + const ::oteldemo::OrderItem& items(int index) const; + ::oteldemo::OrderItem* add_items(); + const ::google::protobuf::RepeatedPtrField< ::oteldemo::OrderItem >& + items() const; + // string order_id = 1; + void clear_order_id() ; + const std::string& order_id() const; template - void set_description(Arg_&& arg, Args_... args); - std::string* mutable_description(); - PROTOBUF_NODISCARD std::string* release_description(); - void set_allocated_description(std::string* ptr); + void set_order_id(Arg_&& arg, Args_... args); + std::string* mutable_order_id(); + PROTOBUF_NODISCARD std::string* release_order_id(); + void set_allocated_order_id(std::string* ptr); private: - const std::string& _internal_description() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_description( + const std::string& _internal_order_id() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_order_id( const std::string& value); - std::string* _internal_mutable_description(); + std::string* _internal_mutable_order_id(); public: - // bool enabled = 3; - void clear_enabled() ; - bool enabled() const; - void set_enabled(bool value); + // string shipping_tracking_id = 2; + void clear_shipping_tracking_id() ; + const std::string& shipping_tracking_id() const; + template + void set_shipping_tracking_id(Arg_&& arg, Args_... args); + std::string* mutable_shipping_tracking_id(); + PROTOBUF_NODISCARD std::string* release_shipping_tracking_id(); + void set_allocated_shipping_tracking_id(std::string* ptr); private: - bool _internal_enabled() const; - void _internal_set_enabled(bool value); + const std::string& _internal_shipping_tracking_id() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_shipping_tracking_id( + const std::string& value); + std::string* _internal_mutable_shipping_tracking_id(); public: - // @@protoc_insertion_point(class_scope:oteldemo.Flag) - private: - class _Internal; + // .oteldemo.Money shipping_cost = 3; + bool has_shipping_cost() const; + void clear_shipping_cost() ; + const ::oteldemo::Money& shipping_cost() const; + PROTOBUF_NODISCARD ::oteldemo::Money* release_shipping_cost(); + ::oteldemo::Money* mutable_shipping_cost(); + void set_allocated_shipping_cost(::oteldemo::Money* value); + void unsafe_arena_set_allocated_shipping_cost(::oteldemo::Money* value); + ::oteldemo::Money* unsafe_arena_release_shipping_cost(); + + private: + const ::oteldemo::Money& _internal_shipping_cost() const; + ::oteldemo::Money* _internal_mutable_shipping_cost(); + + public: + // .oteldemo.Address shipping_address = 4; + bool has_shipping_address() const; + void clear_shipping_address() ; + const ::oteldemo::Address& shipping_address() const; + PROTOBUF_NODISCARD ::oteldemo::Address* release_shipping_address(); + ::oteldemo::Address* mutable_shipping_address(); + void set_allocated_shipping_address(::oteldemo::Address* value); + void unsafe_arena_set_allocated_shipping_address(::oteldemo::Address* value); + ::oteldemo::Address* unsafe_arena_release_shipping_address(); + + private: + const ::oteldemo::Address& _internal_shipping_address() const; + ::oteldemo::Address* _internal_mutable_shipping_address(); + + public: + // @@protoc_insertion_point(class_scope:oteldemo.OrderResult) + private: + class _Internal; friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<2, 3, 0, 37, 2> _table_; + static const ::google::protobuf::internal::TcParseTable<3, 5, 3, 57, 2> _table_; template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; struct Impl_ { - ::google::protobuf::internal::ArenaStringPtr name_; - ::google::protobuf::internal::ArenaStringPtr description_; - bool enabled_; + ::google::protobuf::internal::HasBits<1> _has_bits_; mutable ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::RepeatedPtrField< ::oteldemo::OrderItem > items_; + ::google::protobuf::internal::ArenaStringPtr order_id_; + ::google::protobuf::internal::ArenaStringPtr shipping_tracking_id_; + ::oteldemo::Money* shipping_cost_; + ::oteldemo::Address* shipping_address_; PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_demo_2eproto; };// ------------------------------------------------------------------- -class GetFlagRequest final : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:oteldemo.GetFlagRequest) */ { +class SendOrderConfirmationRequest final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:oteldemo.SendOrderConfirmationRequest) */ { public: - inline GetFlagRequest() : GetFlagRequest(nullptr) {} - ~GetFlagRequest() override; + inline SendOrderConfirmationRequest() : SendOrderConfirmationRequest(nullptr) {} + ~SendOrderConfirmationRequest() override; template - explicit PROTOBUF_CONSTEXPR GetFlagRequest(::google::protobuf::internal::ConstantInitialized); + explicit PROTOBUF_CONSTEXPR SendOrderConfirmationRequest(::google::protobuf::internal::ConstantInitialized); - GetFlagRequest(const GetFlagRequest& from); - GetFlagRequest(GetFlagRequest&& from) noexcept - : GetFlagRequest() { + SendOrderConfirmationRequest(const SendOrderConfirmationRequest& from); + SendOrderConfirmationRequest(SendOrderConfirmationRequest&& from) noexcept + : SendOrderConfirmationRequest() { *this = ::std::move(from); } - inline GetFlagRequest& operator=(const GetFlagRequest& from) { + inline SendOrderConfirmationRequest& operator=(const SendOrderConfirmationRequest& from) { CopyFrom(from); return *this; } - inline GetFlagRequest& operator=(GetFlagRequest&& from) noexcept { + inline SendOrderConfirmationRequest& operator=(SendOrderConfirmationRequest&& from) noexcept { if (this == &from) return *this; if (GetOwningArena() == from.GetOwningArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE @@ -6276,20 +6202,20 @@ class GetFlagRequest final : static const ::google::protobuf::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } - static const GetFlagRequest& default_instance() { + static const SendOrderConfirmationRequest& default_instance() { return *internal_default_instance(); } - static inline const GetFlagRequest* internal_default_instance() { - return reinterpret_cast( - &_GetFlagRequest_default_instance_); + static inline const SendOrderConfirmationRequest* internal_default_instance() { + return reinterpret_cast( + &_SendOrderConfirmationRequest_default_instance_); } static constexpr int kIndexInFileMessages = 33; - friend void swap(GetFlagRequest& a, GetFlagRequest& b) { + friend void swap(SendOrderConfirmationRequest& a, SendOrderConfirmationRequest& b) { a.Swap(&b); } - inline void Swap(GetFlagRequest* other) { + inline void Swap(SendOrderConfirmationRequest* other) { if (other == this) return; #ifdef PROTOBUF_FORCE_COPY_IN_SWAP if (GetOwningArena() != nullptr && @@ -6302,7 +6228,7 @@ class GetFlagRequest final : ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(GetFlagRequest* other) { + void UnsafeArenaSwap(SendOrderConfirmationRequest* other) { if (other == this) return; ABSL_DCHECK(GetOwningArena() == other->GetOwningArena()); InternalSwap(other); @@ -6310,14 +6236,14 @@ class GetFlagRequest final : // implements Message ---------------------------------------------- - GetFlagRequest* New(::google::protobuf::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); + SendOrderConfirmationRequest* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); } using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const GetFlagRequest& from); + void CopyFrom(const SendOrderConfirmationRequest& from); using ::google::protobuf::Message::MergeFrom; - void MergeFrom( const GetFlagRequest& from) { - GetFlagRequest::MergeImpl(*this, from); + void MergeFrom( const SendOrderConfirmationRequest& from) { + SendOrderConfirmationRequest::MergeImpl(*this, from); } private: static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg); @@ -6335,15 +6261,15 @@ class GetFlagRequest final : void SharedCtor(::google::protobuf::Arena* arena); void SharedDtor(); void SetCachedSize(int size) const final; - void InternalSwap(GetFlagRequest* other); + void InternalSwap(SendOrderConfirmationRequest* other); private: friend class ::google::protobuf::internal::AnyMetadata; static ::absl::string_view FullMessageName() { - return "oteldemo.GetFlagRequest"; + return "oteldemo.SendOrderConfirmationRequest"; } protected: - explicit GetFlagRequest(::google::protobuf::Arena* arena); + explicit SendOrderConfirmationRequest(::google::protobuf::Arena* arena); public: static const ClassData _class_data_; @@ -6356,61 +6282,79 @@ class GetFlagRequest final : // accessors ------------------------------------------------------- enum : int { - kNameFieldNumber = 1, + kEmailFieldNumber = 1, + kOrderFieldNumber = 2, }; - // string name = 1; - void clear_name() ; - const std::string& name() const; + // string email = 1; + void clear_email() ; + const std::string& email() const; template - void set_name(Arg_&& arg, Args_... args); - std::string* mutable_name(); - PROTOBUF_NODISCARD std::string* release_name(); - void set_allocated_name(std::string* ptr); + void set_email(Arg_&& arg, Args_... args); + std::string* mutable_email(); + PROTOBUF_NODISCARD std::string* release_email(); + void set_allocated_email(std::string* ptr); private: - const std::string& _internal_name() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_name( + const std::string& _internal_email() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_email( const std::string& value); - std::string* _internal_mutable_name(); + std::string* _internal_mutable_email(); public: - // @@protoc_insertion_point(class_scope:oteldemo.GetFlagRequest) + // .oteldemo.OrderResult order = 2; + bool has_order() const; + void clear_order() ; + const ::oteldemo::OrderResult& order() const; + PROTOBUF_NODISCARD ::oteldemo::OrderResult* release_order(); + ::oteldemo::OrderResult* mutable_order(); + void set_allocated_order(::oteldemo::OrderResult* value); + void unsafe_arena_set_allocated_order(::oteldemo::OrderResult* value); + ::oteldemo::OrderResult* unsafe_arena_release_order(); + + private: + const ::oteldemo::OrderResult& _internal_order() const; + ::oteldemo::OrderResult* _internal_mutable_order(); + + public: + // @@protoc_insertion_point(class_scope:oteldemo.SendOrderConfirmationRequest) private: class _Internal; friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<0, 1, 0, 36, 2> _table_; + static const ::google::protobuf::internal::TcParseTable<1, 2, 1, 51, 2> _table_; template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; struct Impl_ { - ::google::protobuf::internal::ArenaStringPtr name_; + ::google::protobuf::internal::HasBits<1> _has_bits_; mutable ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::internal::ArenaStringPtr email_; + ::oteldemo::OrderResult* order_; PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_demo_2eproto; };// ------------------------------------------------------------------- -class GetFlagResponse final : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:oteldemo.GetFlagResponse) */ { +class PlaceOrderRequest final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:oteldemo.PlaceOrderRequest) */ { public: - inline GetFlagResponse() : GetFlagResponse(nullptr) {} - ~GetFlagResponse() override; + inline PlaceOrderRequest() : PlaceOrderRequest(nullptr) {} + ~PlaceOrderRequest() override; template - explicit PROTOBUF_CONSTEXPR GetFlagResponse(::google::protobuf::internal::ConstantInitialized); + explicit PROTOBUF_CONSTEXPR PlaceOrderRequest(::google::protobuf::internal::ConstantInitialized); - GetFlagResponse(const GetFlagResponse& from); - GetFlagResponse(GetFlagResponse&& from) noexcept - : GetFlagResponse() { + PlaceOrderRequest(const PlaceOrderRequest& from); + PlaceOrderRequest(PlaceOrderRequest&& from) noexcept + : PlaceOrderRequest() { *this = ::std::move(from); } - inline GetFlagResponse& operator=(const GetFlagResponse& from) { + inline PlaceOrderRequest& operator=(const PlaceOrderRequest& from) { CopyFrom(from); return *this; } - inline GetFlagResponse& operator=(GetFlagResponse&& from) noexcept { + inline PlaceOrderRequest& operator=(PlaceOrderRequest&& from) noexcept { if (this == &from) return *this; if (GetOwningArena() == from.GetOwningArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE @@ -6440,20 +6384,20 @@ class GetFlagResponse final : static const ::google::protobuf::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } - static const GetFlagResponse& default_instance() { + static const PlaceOrderRequest& default_instance() { return *internal_default_instance(); } - static inline const GetFlagResponse* internal_default_instance() { - return reinterpret_cast( - &_GetFlagResponse_default_instance_); + static inline const PlaceOrderRequest* internal_default_instance() { + return reinterpret_cast( + &_PlaceOrderRequest_default_instance_); } static constexpr int kIndexInFileMessages = 34; - friend void swap(GetFlagResponse& a, GetFlagResponse& b) { + friend void swap(PlaceOrderRequest& a, PlaceOrderRequest& b) { a.Swap(&b); } - inline void Swap(GetFlagResponse* other) { + inline void Swap(PlaceOrderRequest* other) { if (other == this) return; #ifdef PROTOBUF_FORCE_COPY_IN_SWAP if (GetOwningArena() != nullptr && @@ -6466,7 +6410,7 @@ class GetFlagResponse final : ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(GetFlagResponse* other) { + void UnsafeArenaSwap(PlaceOrderRequest* other) { if (other == this) return; ABSL_DCHECK(GetOwningArena() == other->GetOwningArena()); InternalSwap(other); @@ -6474,14 +6418,14 @@ class GetFlagResponse final : // implements Message ---------------------------------------------- - GetFlagResponse* New(::google::protobuf::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); + PlaceOrderRequest* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); } using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const GetFlagResponse& from); + void CopyFrom(const PlaceOrderRequest& from); using ::google::protobuf::Message::MergeFrom; - void MergeFrom( const GetFlagResponse& from) { - GetFlagResponse::MergeImpl(*this, from); + void MergeFrom( const PlaceOrderRequest& from) { + PlaceOrderRequest::MergeImpl(*this, from); } private: static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg); @@ -6499,15 +6443,15 @@ class GetFlagResponse final : void SharedCtor(::google::protobuf::Arena* arena); void SharedDtor(); void SetCachedSize(int size) const final; - void InternalSwap(GetFlagResponse* other); + void InternalSwap(PlaceOrderRequest* other); private: friend class ::google::protobuf::internal::AnyMetadata; static ::absl::string_view FullMessageName() { - return "oteldemo.GetFlagResponse"; + return "oteldemo.PlaceOrderRequest"; } protected: - explicit GetFlagResponse(::google::protobuf::Arena* arena); + explicit PlaceOrderRequest(::google::protobuf::Arena* arena); public: static const ClassData _class_data_; @@ -6520,61 +6464,132 @@ class GetFlagResponse final : // accessors ------------------------------------------------------- enum : int { - kFlagFieldNumber = 1, + kUserIdFieldNumber = 1, + kUserCurrencyFieldNumber = 2, + kEmailFieldNumber = 5, + kAddressFieldNumber = 3, + kCreditCardFieldNumber = 6, }; - // .oteldemo.Flag flag = 1; - bool has_flag() const; - void clear_flag() ; - const ::oteldemo::Flag& flag() const; - PROTOBUF_NODISCARD ::oteldemo::Flag* release_flag(); - ::oteldemo::Flag* mutable_flag(); - void set_allocated_flag(::oteldemo::Flag* value); - void unsafe_arena_set_allocated_flag(::oteldemo::Flag* value); - ::oteldemo::Flag* unsafe_arena_release_flag(); + // string user_id = 1; + void clear_user_id() ; + const std::string& user_id() const; + template + void set_user_id(Arg_&& arg, Args_... args); + std::string* mutable_user_id(); + PROTOBUF_NODISCARD std::string* release_user_id(); + void set_allocated_user_id(std::string* ptr); private: - const ::oteldemo::Flag& _internal_flag() const; - ::oteldemo::Flag* _internal_mutable_flag(); + const std::string& _internal_user_id() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_user_id( + const std::string& value); + std::string* _internal_mutable_user_id(); public: - // @@protoc_insertion_point(class_scope:oteldemo.GetFlagResponse) - private: - class _Internal; + // string user_currency = 2; + void clear_user_currency() ; + const std::string& user_currency() const; + template + void set_user_currency(Arg_&& arg, Args_... args); + std::string* mutable_user_currency(); + PROTOBUF_NODISCARD std::string* release_user_currency(); + void set_allocated_user_currency(std::string* ptr); - friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<0, 1, 1, 0, 2> _table_; - template friend class ::google::protobuf::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - struct Impl_ { - ::google::protobuf::internal::HasBits<1> _has_bits_; - mutable ::google::protobuf::internal::CachedSize _cached_size_; - ::oteldemo::Flag* flag_; - PROTOBUF_TSAN_DECLARE_MEMBER - }; - union { Impl_ _impl_; }; - friend struct ::TableStruct_demo_2eproto; -};// ------------------------------------------------------------------- + private: + const std::string& _internal_user_currency() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_user_currency( + const std::string& value); + std::string* _internal_mutable_user_currency(); -class CreateFlagRequest final : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:oteldemo.CreateFlagRequest) */ { - public: - inline CreateFlagRequest() : CreateFlagRequest(nullptr) {} - ~CreateFlagRequest() override; - template - explicit PROTOBUF_CONSTEXPR CreateFlagRequest(::google::protobuf::internal::ConstantInitialized); + public: + // string email = 5; + void clear_email() ; + const std::string& email() const; + template + void set_email(Arg_&& arg, Args_... args); + std::string* mutable_email(); + PROTOBUF_NODISCARD std::string* release_email(); + void set_allocated_email(std::string* ptr); - CreateFlagRequest(const CreateFlagRequest& from); - CreateFlagRequest(CreateFlagRequest&& from) noexcept - : CreateFlagRequest() { + private: + const std::string& _internal_email() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_email( + const std::string& value); + std::string* _internal_mutable_email(); + + public: + // .oteldemo.Address address = 3; + bool has_address() const; + void clear_address() ; + const ::oteldemo::Address& address() const; + PROTOBUF_NODISCARD ::oteldemo::Address* release_address(); + ::oteldemo::Address* mutable_address(); + void set_allocated_address(::oteldemo::Address* value); + void unsafe_arena_set_allocated_address(::oteldemo::Address* value); + ::oteldemo::Address* unsafe_arena_release_address(); + + private: + const ::oteldemo::Address& _internal_address() const; + ::oteldemo::Address* _internal_mutable_address(); + + public: + // .oteldemo.CreditCardInfo credit_card = 6; + bool has_credit_card() const; + void clear_credit_card() ; + const ::oteldemo::CreditCardInfo& credit_card() const; + PROTOBUF_NODISCARD ::oteldemo::CreditCardInfo* release_credit_card(); + ::oteldemo::CreditCardInfo* mutable_credit_card(); + void set_allocated_credit_card(::oteldemo::CreditCardInfo* value); + void unsafe_arena_set_allocated_credit_card(::oteldemo::CreditCardInfo* value); + ::oteldemo::CreditCardInfo* unsafe_arena_release_credit_card(); + + private: + const ::oteldemo::CreditCardInfo& _internal_credit_card() const; + ::oteldemo::CreditCardInfo* _internal_mutable_credit_card(); + + public: + // @@protoc_insertion_point(class_scope:oteldemo.PlaceOrderRequest) + private: + class _Internal; + + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<3, 5, 2, 60, 2> _table_; + template friend class ::google::protobuf::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::google::protobuf::internal::HasBits<1> _has_bits_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::internal::ArenaStringPtr user_id_; + ::google::protobuf::internal::ArenaStringPtr user_currency_; + ::google::protobuf::internal::ArenaStringPtr email_; + ::oteldemo::Address* address_; + ::oteldemo::CreditCardInfo* credit_card_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_demo_2eproto; +};// ------------------------------------------------------------------- + +class PlaceOrderResponse final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:oteldemo.PlaceOrderResponse) */ { + public: + inline PlaceOrderResponse() : PlaceOrderResponse(nullptr) {} + ~PlaceOrderResponse() override; + template + explicit PROTOBUF_CONSTEXPR PlaceOrderResponse(::google::protobuf::internal::ConstantInitialized); + + PlaceOrderResponse(const PlaceOrderResponse& from); + PlaceOrderResponse(PlaceOrderResponse&& from) noexcept + : PlaceOrderResponse() { *this = ::std::move(from); } - inline CreateFlagRequest& operator=(const CreateFlagRequest& from) { + inline PlaceOrderResponse& operator=(const PlaceOrderResponse& from) { CopyFrom(from); return *this; } - inline CreateFlagRequest& operator=(CreateFlagRequest&& from) noexcept { + inline PlaceOrderResponse& operator=(PlaceOrderResponse&& from) noexcept { if (this == &from) return *this; if (GetOwningArena() == from.GetOwningArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE @@ -6604,20 +6619,20 @@ class CreateFlagRequest final : static const ::google::protobuf::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } - static const CreateFlagRequest& default_instance() { + static const PlaceOrderResponse& default_instance() { return *internal_default_instance(); } - static inline const CreateFlagRequest* internal_default_instance() { - return reinterpret_cast( - &_CreateFlagRequest_default_instance_); + static inline const PlaceOrderResponse* internal_default_instance() { + return reinterpret_cast( + &_PlaceOrderResponse_default_instance_); } static constexpr int kIndexInFileMessages = 35; - friend void swap(CreateFlagRequest& a, CreateFlagRequest& b) { + friend void swap(PlaceOrderResponse& a, PlaceOrderResponse& b) { a.Swap(&b); } - inline void Swap(CreateFlagRequest* other) { + inline void Swap(PlaceOrderResponse* other) { if (other == this) return; #ifdef PROTOBUF_FORCE_COPY_IN_SWAP if (GetOwningArena() != nullptr && @@ -6630,7 +6645,7 @@ class CreateFlagRequest final : ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(CreateFlagRequest* other) { + void UnsafeArenaSwap(PlaceOrderResponse* other) { if (other == this) return; ABSL_DCHECK(GetOwningArena() == other->GetOwningArena()); InternalSwap(other); @@ -6638,14 +6653,14 @@ class CreateFlagRequest final : // implements Message ---------------------------------------------- - CreateFlagRequest* New(::google::protobuf::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); + PlaceOrderResponse* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); } using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const CreateFlagRequest& from); + void CopyFrom(const PlaceOrderResponse& from); using ::google::protobuf::Message::MergeFrom; - void MergeFrom( const CreateFlagRequest& from) { - CreateFlagRequest::MergeImpl(*this, from); + void MergeFrom( const PlaceOrderResponse& from) { + PlaceOrderResponse::MergeImpl(*this, from); } private: static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg); @@ -6663,15 +6678,15 @@ class CreateFlagRequest final : void SharedCtor(::google::protobuf::Arena* arena); void SharedDtor(); void SetCachedSize(int size) const final; - void InternalSwap(CreateFlagRequest* other); + void InternalSwap(PlaceOrderResponse* other); private: friend class ::google::protobuf::internal::AnyMetadata; static ::absl::string_view FullMessageName() { - return "oteldemo.CreateFlagRequest"; + return "oteldemo.PlaceOrderResponse"; } protected: - explicit CreateFlagRequest(::google::protobuf::Arena* arena); + explicit PlaceOrderResponse(::google::protobuf::Arena* arena); public: static const ClassData _class_data_; @@ -6684,91 +6699,61 @@ class CreateFlagRequest final : // accessors ------------------------------------------------------- enum : int { - kNameFieldNumber = 1, - kDescriptionFieldNumber = 2, - kEnabledFieldNumber = 3, + kOrderFieldNumber = 1, }; - // string name = 1; - void clear_name() ; - const std::string& name() const; - template - void set_name(Arg_&& arg, Args_... args); - std::string* mutable_name(); - PROTOBUF_NODISCARD std::string* release_name(); - void set_allocated_name(std::string* ptr); - - private: - const std::string& _internal_name() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_name( - const std::string& value); - std::string* _internal_mutable_name(); - - public: - // string description = 2; - void clear_description() ; - const std::string& description() const; - template - void set_description(Arg_&& arg, Args_... args); - std::string* mutable_description(); - PROTOBUF_NODISCARD std::string* release_description(); - void set_allocated_description(std::string* ptr); - - private: - const std::string& _internal_description() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_description( - const std::string& value); - std::string* _internal_mutable_description(); - - public: - // bool enabled = 3; - void clear_enabled() ; - bool enabled() const; - void set_enabled(bool value); + // .oteldemo.OrderResult order = 1; + bool has_order() const; + void clear_order() ; + const ::oteldemo::OrderResult& order() const; + PROTOBUF_NODISCARD ::oteldemo::OrderResult* release_order(); + ::oteldemo::OrderResult* mutable_order(); + void set_allocated_order(::oteldemo::OrderResult* value); + void unsafe_arena_set_allocated_order(::oteldemo::OrderResult* value); + ::oteldemo::OrderResult* unsafe_arena_release_order(); private: - bool _internal_enabled() const; - void _internal_set_enabled(bool value); + const ::oteldemo::OrderResult& _internal_order() const; + ::oteldemo::OrderResult* _internal_mutable_order(); public: - // @@protoc_insertion_point(class_scope:oteldemo.CreateFlagRequest) + // @@protoc_insertion_point(class_scope:oteldemo.PlaceOrderResponse) private: class _Internal; friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<2, 3, 0, 50, 2> _table_; + static const ::google::protobuf::internal::TcParseTable<0, 1, 1, 0, 2> _table_; template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; struct Impl_ { - ::google::protobuf::internal::ArenaStringPtr name_; - ::google::protobuf::internal::ArenaStringPtr description_; - bool enabled_; + ::google::protobuf::internal::HasBits<1> _has_bits_; mutable ::google::protobuf::internal::CachedSize _cached_size_; + ::oteldemo::OrderResult* order_; PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_demo_2eproto; };// ------------------------------------------------------------------- -class CreateFlagResponse final : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:oteldemo.CreateFlagResponse) */ { +class AdRequest final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:oteldemo.AdRequest) */ { public: - inline CreateFlagResponse() : CreateFlagResponse(nullptr) {} - ~CreateFlagResponse() override; + inline AdRequest() : AdRequest(nullptr) {} + ~AdRequest() override; template - explicit PROTOBUF_CONSTEXPR CreateFlagResponse(::google::protobuf::internal::ConstantInitialized); + explicit PROTOBUF_CONSTEXPR AdRequest(::google::protobuf::internal::ConstantInitialized); - CreateFlagResponse(const CreateFlagResponse& from); - CreateFlagResponse(CreateFlagResponse&& from) noexcept - : CreateFlagResponse() { + AdRequest(const AdRequest& from); + AdRequest(AdRequest&& from) noexcept + : AdRequest() { *this = ::std::move(from); } - inline CreateFlagResponse& operator=(const CreateFlagResponse& from) { + inline AdRequest& operator=(const AdRequest& from) { CopyFrom(from); return *this; } - inline CreateFlagResponse& operator=(CreateFlagResponse&& from) noexcept { + inline AdRequest& operator=(AdRequest&& from) noexcept { if (this == &from) return *this; if (GetOwningArena() == from.GetOwningArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE @@ -6798,20 +6783,20 @@ class CreateFlagResponse final : static const ::google::protobuf::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } - static const CreateFlagResponse& default_instance() { + static const AdRequest& default_instance() { return *internal_default_instance(); } - static inline const CreateFlagResponse* internal_default_instance() { - return reinterpret_cast( - &_CreateFlagResponse_default_instance_); + static inline const AdRequest* internal_default_instance() { + return reinterpret_cast( + &_AdRequest_default_instance_); } static constexpr int kIndexInFileMessages = 36; - friend void swap(CreateFlagResponse& a, CreateFlagResponse& b) { + friend void swap(AdRequest& a, AdRequest& b) { a.Swap(&b); } - inline void Swap(CreateFlagResponse* other) { + inline void Swap(AdRequest* other) { if (other == this) return; #ifdef PROTOBUF_FORCE_COPY_IN_SWAP if (GetOwningArena() != nullptr && @@ -6824,7 +6809,7 @@ class CreateFlagResponse final : ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(CreateFlagResponse* other) { + void UnsafeArenaSwap(AdRequest* other) { if (other == this) return; ABSL_DCHECK(GetOwningArena() == other->GetOwningArena()); InternalSwap(other); @@ -6832,14 +6817,14 @@ class CreateFlagResponse final : // implements Message ---------------------------------------------- - CreateFlagResponse* New(::google::protobuf::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); + AdRequest* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); } using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const CreateFlagResponse& from); + void CopyFrom(const AdRequest& from); using ::google::protobuf::Message::MergeFrom; - void MergeFrom( const CreateFlagResponse& from) { - CreateFlagResponse::MergeImpl(*this, from); + void MergeFrom( const AdRequest& from) { + AdRequest::MergeImpl(*this, from); } private: static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg); @@ -6857,15 +6842,15 @@ class CreateFlagResponse final : void SharedCtor(::google::protobuf::Arena* arena); void SharedDtor(); void SetCachedSize(int size) const final; - void InternalSwap(CreateFlagResponse* other); + void InternalSwap(AdRequest* other); private: friend class ::google::protobuf::internal::AnyMetadata; static ::absl::string_view FullMessageName() { - return "oteldemo.CreateFlagResponse"; + return "oteldemo.AdRequest"; } protected: - explicit CreateFlagResponse(::google::protobuf::Arena* arena); + explicit AdRequest(::google::protobuf::Arena* arena); public: static const ClassData _class_data_; @@ -6878,61 +6863,73 @@ class CreateFlagResponse final : // accessors ------------------------------------------------------- enum : int { - kFlagFieldNumber = 1, + kContextKeysFieldNumber = 1, }; - // .oteldemo.Flag flag = 1; - bool has_flag() const; - void clear_flag() ; - const ::oteldemo::Flag& flag() const; - PROTOBUF_NODISCARD ::oteldemo::Flag* release_flag(); - ::oteldemo::Flag* mutable_flag(); - void set_allocated_flag(::oteldemo::Flag* value); - void unsafe_arena_set_allocated_flag(::oteldemo::Flag* value); - ::oteldemo::Flag* unsafe_arena_release_flag(); - + // repeated string context_keys = 1; + int context_keys_size() const; private: - const ::oteldemo::Flag& _internal_flag() const; - ::oteldemo::Flag* _internal_mutable_flag(); + int _internal_context_keys_size() const; public: - // @@protoc_insertion_point(class_scope:oteldemo.CreateFlagResponse) - private: - class _Internal; - - friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<0, 1, 1, 0, 2> _table_; - template friend class ::google::protobuf::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - struct Impl_ { - ::google::protobuf::internal::HasBits<1> _has_bits_; + void clear_context_keys() ; + const std::string& context_keys(int index) const; + std::string* mutable_context_keys(int index); + void set_context_keys(int index, const std::string& value); + void set_context_keys(int index, std::string&& value); + void set_context_keys(int index, const char* value); + void set_context_keys(int index, const char* value, std::size_t size); + void set_context_keys(int index, absl::string_view value); + std::string* add_context_keys(); + void add_context_keys(const std::string& value); + void add_context_keys(std::string&& value); + void add_context_keys(const char* value); + void add_context_keys(const char* value, std::size_t size); + void add_context_keys(absl::string_view value); + const ::google::protobuf::RepeatedPtrField& context_keys() const; + ::google::protobuf::RepeatedPtrField* mutable_context_keys(); + + private: + const ::google::protobuf::RepeatedPtrField& _internal_context_keys() const; + ::google::protobuf::RepeatedPtrField* _internal_mutable_context_keys(); + + public: + // @@protoc_insertion_point(class_scope:oteldemo.AdRequest) + private: + class _Internal; + + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<0, 1, 0, 39, 2> _table_; + template friend class ::google::protobuf::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::google::protobuf::RepeatedPtrField context_keys_; mutable ::google::protobuf::internal::CachedSize _cached_size_; - ::oteldemo::Flag* flag_; PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_demo_2eproto; };// ------------------------------------------------------------------- -class UpdateFlagRequest final : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:oteldemo.UpdateFlagRequest) */ { +class AdResponse final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:oteldemo.AdResponse) */ { public: - inline UpdateFlagRequest() : UpdateFlagRequest(nullptr) {} - ~UpdateFlagRequest() override; + inline AdResponse() : AdResponse(nullptr) {} + ~AdResponse() override; template - explicit PROTOBUF_CONSTEXPR UpdateFlagRequest(::google::protobuf::internal::ConstantInitialized); + explicit PROTOBUF_CONSTEXPR AdResponse(::google::protobuf::internal::ConstantInitialized); - UpdateFlagRequest(const UpdateFlagRequest& from); - UpdateFlagRequest(UpdateFlagRequest&& from) noexcept - : UpdateFlagRequest() { + AdResponse(const AdResponse& from); + AdResponse(AdResponse&& from) noexcept + : AdResponse() { *this = ::std::move(from); } - inline UpdateFlagRequest& operator=(const UpdateFlagRequest& from) { + inline AdResponse& operator=(const AdResponse& from) { CopyFrom(from); return *this; } - inline UpdateFlagRequest& operator=(UpdateFlagRequest&& from) noexcept { + inline AdResponse& operator=(AdResponse&& from) noexcept { if (this == &from) return *this; if (GetOwningArena() == from.GetOwningArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE @@ -6962,20 +6959,20 @@ class UpdateFlagRequest final : static const ::google::protobuf::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } - static const UpdateFlagRequest& default_instance() { + static const AdResponse& default_instance() { return *internal_default_instance(); } - static inline const UpdateFlagRequest* internal_default_instance() { - return reinterpret_cast( - &_UpdateFlagRequest_default_instance_); + static inline const AdResponse* internal_default_instance() { + return reinterpret_cast( + &_AdResponse_default_instance_); } static constexpr int kIndexInFileMessages = 37; - friend void swap(UpdateFlagRequest& a, UpdateFlagRequest& b) { + friend void swap(AdResponse& a, AdResponse& b) { a.Swap(&b); } - inline void Swap(UpdateFlagRequest* other) { + inline void Swap(AdResponse* other) { if (other == this) return; #ifdef PROTOBUF_FORCE_COPY_IN_SWAP if (GetOwningArena() != nullptr && @@ -6988,7 +6985,7 @@ class UpdateFlagRequest final : ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(UpdateFlagRequest* other) { + void UnsafeArenaSwap(AdResponse* other) { if (other == this) return; ABSL_DCHECK(GetOwningArena() == other->GetOwningArena()); InternalSwap(other); @@ -6996,14 +6993,14 @@ class UpdateFlagRequest final : // implements Message ---------------------------------------------- - UpdateFlagRequest* New(::google::protobuf::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); + AdResponse* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); } using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const UpdateFlagRequest& from); + void CopyFrom(const AdResponse& from); using ::google::protobuf::Message::MergeFrom; - void MergeFrom( const UpdateFlagRequest& from) { - UpdateFlagRequest::MergeImpl(*this, from); + void MergeFrom( const AdResponse& from) { + AdResponse::MergeImpl(*this, from); } private: static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg); @@ -7021,15 +7018,15 @@ class UpdateFlagRequest final : void SharedCtor(::google::protobuf::Arena* arena); void SharedDtor(); void SetCachedSize(int size) const final; - void InternalSwap(UpdateFlagRequest* other); + void InternalSwap(AdResponse* other); private: friend class ::google::protobuf::internal::AnyMetadata; static ::absl::string_view FullMessageName() { - return "oteldemo.UpdateFlagRequest"; + return "oteldemo.AdResponse"; } protected: - explicit UpdateFlagRequest(::google::protobuf::Arena* arena); + explicit AdResponse(::google::protobuf::Arena* arena); public: static const ClassData _class_data_; @@ -7042,47 +7039,37 @@ class UpdateFlagRequest final : // accessors ------------------------------------------------------- enum : int { - kNameFieldNumber = 1, - kEnabledFieldNumber = 2, + kAdsFieldNumber = 1, }; - // string name = 1; - void clear_name() ; - const std::string& name() const; - template - void set_name(Arg_&& arg, Args_... args); - std::string* mutable_name(); - PROTOBUF_NODISCARD std::string* release_name(); - void set_allocated_name(std::string* ptr); - + // repeated .oteldemo.Ad ads = 1; + int ads_size() const; private: - const std::string& _internal_name() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_name( - const std::string& value); - std::string* _internal_mutable_name(); + int _internal_ads_size() const; public: - // bool enabled = 2; - void clear_enabled() ; - bool enabled() const; - void set_enabled(bool value); - + void clear_ads() ; + ::oteldemo::Ad* mutable_ads(int index); + ::google::protobuf::RepeatedPtrField< ::oteldemo::Ad >* + mutable_ads(); private: - bool _internal_enabled() const; - void _internal_set_enabled(bool value); - + const ::google::protobuf::RepeatedPtrField<::oteldemo::Ad>& _internal_ads() const; + ::google::protobuf::RepeatedPtrField<::oteldemo::Ad>* _internal_mutable_ads(); public: - // @@protoc_insertion_point(class_scope:oteldemo.UpdateFlagRequest) + const ::oteldemo::Ad& ads(int index) const; + ::oteldemo::Ad* add_ads(); + const ::google::protobuf::RepeatedPtrField< ::oteldemo::Ad >& + ads() const; + // @@protoc_insertion_point(class_scope:oteldemo.AdResponse) private: class _Internal; friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<1, 2, 0, 39, 2> _table_; + static const ::google::protobuf::internal::TcParseTable<0, 1, 1, 0, 2> _table_; template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; struct Impl_ { - ::google::protobuf::internal::ArenaStringPtr name_; - bool enabled_; + ::google::protobuf::RepeatedPtrField< ::oteldemo::Ad > ads_; mutable ::google::protobuf::internal::CachedSize _cached_size_; PROTOBUF_TSAN_DECLARE_MEMBER }; @@ -7090,24 +7077,25 @@ class UpdateFlagRequest final : friend struct ::TableStruct_demo_2eproto; };// ------------------------------------------------------------------- -class UpdateFlagResponse final : - public ::google::protobuf::internal::ZeroFieldsBase /* @@protoc_insertion_point(class_definition:oteldemo.UpdateFlagResponse) */ { +class Ad final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:oteldemo.Ad) */ { public: - inline UpdateFlagResponse() : UpdateFlagResponse(nullptr) {} + inline Ad() : Ad(nullptr) {} + ~Ad() override; template - explicit PROTOBUF_CONSTEXPR UpdateFlagResponse(::google::protobuf::internal::ConstantInitialized); + explicit PROTOBUF_CONSTEXPR Ad(::google::protobuf::internal::ConstantInitialized); - UpdateFlagResponse(const UpdateFlagResponse& from); - UpdateFlagResponse(UpdateFlagResponse&& from) noexcept - : UpdateFlagResponse() { + Ad(const Ad& from); + Ad(Ad&& from) noexcept + : Ad() { *this = ::std::move(from); } - inline UpdateFlagResponse& operator=(const UpdateFlagResponse& from) { + inline Ad& operator=(const Ad& from) { CopyFrom(from); return *this; } - inline UpdateFlagResponse& operator=(UpdateFlagResponse&& from) noexcept { + inline Ad& operator=(Ad&& from) noexcept { if (this == &from) return *this; if (GetOwningArena() == from.GetOwningArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE @@ -7137,20 +7125,20 @@ class UpdateFlagResponse final : static const ::google::protobuf::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } - static const UpdateFlagResponse& default_instance() { + static const Ad& default_instance() { return *internal_default_instance(); } - static inline const UpdateFlagResponse* internal_default_instance() { - return reinterpret_cast( - &_UpdateFlagResponse_default_instance_); + static inline const Ad* internal_default_instance() { + return reinterpret_cast( + &_Ad_default_instance_); } static constexpr int kIndexInFileMessages = 38; - friend void swap(UpdateFlagResponse& a, UpdateFlagResponse& b) { + friend void swap(Ad& a, Ad& b) { a.Swap(&b); } - inline void Swap(UpdateFlagResponse* other) { + inline void Swap(Ad* other) { if (other == this) return; #ifdef PROTOBUF_FORCE_COPY_IN_SWAP if (GetOwningArena() != nullptr && @@ -7163,7 +7151,7 @@ class UpdateFlagResponse final : ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(UpdateFlagResponse* other) { + void UnsafeArenaSwap(Ad* other) { if (other == this) return; ABSL_DCHECK(GetOwningArena() == other->GetOwningArena()); InternalSwap(other); @@ -7171,26 +7159,40 @@ class UpdateFlagResponse final : // implements Message ---------------------------------------------- - UpdateFlagResponse* New(::google::protobuf::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); - } - using ::google::protobuf::internal::ZeroFieldsBase::CopyFrom; - inline void CopyFrom(const UpdateFlagResponse& from) { - ::google::protobuf::internal::ZeroFieldsBase::CopyImpl(*this, from); + Ad* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); } - using ::google::protobuf::internal::ZeroFieldsBase::MergeFrom; - void MergeFrom(const UpdateFlagResponse& from) { - ::google::protobuf::internal::ZeroFieldsBase::MergeImpl(*this, from); + using ::google::protobuf::Message::CopyFrom; + void CopyFrom(const Ad& from); + using ::google::protobuf::Message::MergeFrom; + void MergeFrom( const Ad& from) { + Ad::MergeImpl(*this, from); } + private: + static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg); public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + ::size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* arena); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(Ad* other); private: friend class ::google::protobuf::internal::AnyMetadata; static ::absl::string_view FullMessageName() { - return "oteldemo.UpdateFlagResponse"; + return "oteldemo.Ad"; } protected: - explicit UpdateFlagResponse(::google::protobuf::Arena* arena); + explicit Ad(::google::protobuf::Arena* arena); public: static const ClassData _class_data_; @@ -7202,37 +7204,80 @@ class UpdateFlagResponse final : // accessors ------------------------------------------------------- - // @@protoc_insertion_point(class_scope:oteldemo.UpdateFlagResponse) + enum : int { + kRedirectUrlFieldNumber = 1, + kTextFieldNumber = 2, + }; + // string redirect_url = 1; + void clear_redirect_url() ; + const std::string& redirect_url() const; + template + void set_redirect_url(Arg_&& arg, Args_... args); + std::string* mutable_redirect_url(); + PROTOBUF_NODISCARD std::string* release_redirect_url(); + void set_allocated_redirect_url(std::string* ptr); + + private: + const std::string& _internal_redirect_url() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_redirect_url( + const std::string& value); + std::string* _internal_mutable_redirect_url(); + + public: + // string text = 2; + void clear_text() ; + const std::string& text() const; + template + void set_text(Arg_&& arg, Args_... args); + std::string* mutable_text(); + PROTOBUF_NODISCARD std::string* release_text(); + void set_allocated_text(std::string* ptr); + + private: + const std::string& _internal_text() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_text( + const std::string& value); + std::string* _internal_mutable_text(); + + public: + // @@protoc_insertion_point(class_scope:oteldemo.Ad) private: class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<1, 2, 0, 36, 2> _table_; template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; struct Impl_ { + ::google::protobuf::internal::ArenaStringPtr redirect_url_; + ::google::protobuf::internal::ArenaStringPtr text_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; PROTOBUF_TSAN_DECLARE_MEMBER }; + union { Impl_ _impl_; }; friend struct ::TableStruct_demo_2eproto; };// ------------------------------------------------------------------- -class ListFlagsRequest final : - public ::google::protobuf::internal::ZeroFieldsBase /* @@protoc_insertion_point(class_definition:oteldemo.ListFlagsRequest) */ { +class Flag final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:oteldemo.Flag) */ { public: - inline ListFlagsRequest() : ListFlagsRequest(nullptr) {} + inline Flag() : Flag(nullptr) {} + ~Flag() override; template - explicit PROTOBUF_CONSTEXPR ListFlagsRequest(::google::protobuf::internal::ConstantInitialized); + explicit PROTOBUF_CONSTEXPR Flag(::google::protobuf::internal::ConstantInitialized); - ListFlagsRequest(const ListFlagsRequest& from); - ListFlagsRequest(ListFlagsRequest&& from) noexcept - : ListFlagsRequest() { - *this = ::std::move(from); - } + Flag(const Flag& from); + Flag(Flag&& from) noexcept + : Flag() { + *this = ::std::move(from); + } - inline ListFlagsRequest& operator=(const ListFlagsRequest& from) { + inline Flag& operator=(const Flag& from) { CopyFrom(from); return *this; } - inline ListFlagsRequest& operator=(ListFlagsRequest&& from) noexcept { + inline Flag& operator=(Flag&& from) noexcept { if (this == &from) return *this; if (GetOwningArena() == from.GetOwningArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE @@ -7262,20 +7307,20 @@ class ListFlagsRequest final : static const ::google::protobuf::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } - static const ListFlagsRequest& default_instance() { + static const Flag& default_instance() { return *internal_default_instance(); } - static inline const ListFlagsRequest* internal_default_instance() { - return reinterpret_cast( - &_ListFlagsRequest_default_instance_); + static inline const Flag* internal_default_instance() { + return reinterpret_cast( + &_Flag_default_instance_); } static constexpr int kIndexInFileMessages = 39; - friend void swap(ListFlagsRequest& a, ListFlagsRequest& b) { + friend void swap(Flag& a, Flag& b) { a.Swap(&b); } - inline void Swap(ListFlagsRequest* other) { + inline void Swap(Flag* other) { if (other == this) return; #ifdef PROTOBUF_FORCE_COPY_IN_SWAP if (GetOwningArena() != nullptr && @@ -7288,7 +7333,7 @@ class ListFlagsRequest final : ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(ListFlagsRequest* other) { + void UnsafeArenaSwap(Flag* other) { if (other == this) return; ABSL_DCHECK(GetOwningArena() == other->GetOwningArena()); InternalSwap(other); @@ -7296,26 +7341,40 @@ class ListFlagsRequest final : // implements Message ---------------------------------------------- - ListFlagsRequest* New(::google::protobuf::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); - } - using ::google::protobuf::internal::ZeroFieldsBase::CopyFrom; - inline void CopyFrom(const ListFlagsRequest& from) { - ::google::protobuf::internal::ZeroFieldsBase::CopyImpl(*this, from); + Flag* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); } - using ::google::protobuf::internal::ZeroFieldsBase::MergeFrom; - void MergeFrom(const ListFlagsRequest& from) { - ::google::protobuf::internal::ZeroFieldsBase::MergeImpl(*this, from); + using ::google::protobuf::Message::CopyFrom; + void CopyFrom(const Flag& from); + using ::google::protobuf::Message::MergeFrom; + void MergeFrom( const Flag& from) { + Flag::MergeImpl(*this, from); } + private: + static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg); public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + ::size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* arena); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(Flag* other); private: friend class ::google::protobuf::internal::AnyMetadata; static ::absl::string_view FullMessageName() { - return "oteldemo.ListFlagsRequest"; + return "oteldemo.Flag"; } protected: - explicit ListFlagsRequest(::google::protobuf::Arena* arena); + explicit Flag(::google::protobuf::Arena* arena); public: static const ClassData _class_data_; @@ -7327,38 +7386,92 @@ class ListFlagsRequest final : // accessors ------------------------------------------------------- - // @@protoc_insertion_point(class_scope:oteldemo.ListFlagsRequest) + enum : int { + kNameFieldNumber = 1, + kDescriptionFieldNumber = 2, + kEnabledFieldNumber = 3, + }; + // string name = 1; + void clear_name() ; + const std::string& name() const; + template + void set_name(Arg_&& arg, Args_... args); + std::string* mutable_name(); + PROTOBUF_NODISCARD std::string* release_name(); + void set_allocated_name(std::string* ptr); + + private: + const std::string& _internal_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_name( + const std::string& value); + std::string* _internal_mutable_name(); + + public: + // string description = 2; + void clear_description() ; + const std::string& description() const; + template + void set_description(Arg_&& arg, Args_... args); + std::string* mutable_description(); + PROTOBUF_NODISCARD std::string* release_description(); + void set_allocated_description(std::string* ptr); + + private: + const std::string& _internal_description() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_description( + const std::string& value); + std::string* _internal_mutable_description(); + + public: + // bool enabled = 3; + void clear_enabled() ; + bool enabled() const; + void set_enabled(bool value); + + private: + bool _internal_enabled() const; + void _internal_set_enabled(bool value); + + public: + // @@protoc_insertion_point(class_scope:oteldemo.Flag) private: class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<2, 3, 0, 37, 2> _table_; template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; struct Impl_ { + ::google::protobuf::internal::ArenaStringPtr name_; + ::google::protobuf::internal::ArenaStringPtr description_; + bool enabled_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; PROTOBUF_TSAN_DECLARE_MEMBER }; + union { Impl_ _impl_; }; friend struct ::TableStruct_demo_2eproto; };// ------------------------------------------------------------------- -class ListFlagsResponse final : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:oteldemo.ListFlagsResponse) */ { +class GetFlagRequest final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:oteldemo.GetFlagRequest) */ { public: - inline ListFlagsResponse() : ListFlagsResponse(nullptr) {} - ~ListFlagsResponse() override; + inline GetFlagRequest() : GetFlagRequest(nullptr) {} + ~GetFlagRequest() override; template - explicit PROTOBUF_CONSTEXPR ListFlagsResponse(::google::protobuf::internal::ConstantInitialized); + explicit PROTOBUF_CONSTEXPR GetFlagRequest(::google::protobuf::internal::ConstantInitialized); - ListFlagsResponse(const ListFlagsResponse& from); - ListFlagsResponse(ListFlagsResponse&& from) noexcept - : ListFlagsResponse() { + GetFlagRequest(const GetFlagRequest& from); + GetFlagRequest(GetFlagRequest&& from) noexcept + : GetFlagRequest() { *this = ::std::move(from); } - inline ListFlagsResponse& operator=(const ListFlagsResponse& from) { + inline GetFlagRequest& operator=(const GetFlagRequest& from) { CopyFrom(from); return *this; } - inline ListFlagsResponse& operator=(ListFlagsResponse&& from) noexcept { + inline GetFlagRequest& operator=(GetFlagRequest&& from) noexcept { if (this == &from) return *this; if (GetOwningArena() == from.GetOwningArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE @@ -7388,20 +7501,20 @@ class ListFlagsResponse final : static const ::google::protobuf::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } - static const ListFlagsResponse& default_instance() { + static const GetFlagRequest& default_instance() { return *internal_default_instance(); } - static inline const ListFlagsResponse* internal_default_instance() { - return reinterpret_cast( - &_ListFlagsResponse_default_instance_); + static inline const GetFlagRequest* internal_default_instance() { + return reinterpret_cast( + &_GetFlagRequest_default_instance_); } static constexpr int kIndexInFileMessages = 40; - friend void swap(ListFlagsResponse& a, ListFlagsResponse& b) { + friend void swap(GetFlagRequest& a, GetFlagRequest& b) { a.Swap(&b); } - inline void Swap(ListFlagsResponse* other) { + inline void Swap(GetFlagRequest* other) { if (other == this) return; #ifdef PROTOBUF_FORCE_COPY_IN_SWAP if (GetOwningArena() != nullptr && @@ -7414,7 +7527,7 @@ class ListFlagsResponse final : ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(ListFlagsResponse* other) { + void UnsafeArenaSwap(GetFlagRequest* other) { if (other == this) return; ABSL_DCHECK(GetOwningArena() == other->GetOwningArena()); InternalSwap(other); @@ -7422,14 +7535,14 @@ class ListFlagsResponse final : // implements Message ---------------------------------------------- - ListFlagsResponse* New(::google::protobuf::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); + GetFlagRequest* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); } using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const ListFlagsResponse& from); + void CopyFrom(const GetFlagRequest& from); using ::google::protobuf::Message::MergeFrom; - void MergeFrom( const ListFlagsResponse& from) { - ListFlagsResponse::MergeImpl(*this, from); + void MergeFrom( const GetFlagRequest& from) { + GetFlagRequest::MergeImpl(*this, from); } private: static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg); @@ -7447,15 +7560,15 @@ class ListFlagsResponse final : void SharedCtor(::google::protobuf::Arena* arena); void SharedDtor(); void SetCachedSize(int size) const final; - void InternalSwap(ListFlagsResponse* other); + void InternalSwap(GetFlagRequest* other); private: friend class ::google::protobuf::internal::AnyMetadata; static ::absl::string_view FullMessageName() { - return "oteldemo.ListFlagsResponse"; + return "oteldemo.GetFlagRequest"; } protected: - explicit ListFlagsResponse(::google::protobuf::Arena* arena); + explicit GetFlagRequest(::google::protobuf::Arena* arena); public: static const ClassData _class_data_; @@ -7468,37 +7581,35 @@ class ListFlagsResponse final : // accessors ------------------------------------------------------- enum : int { - kFlagFieldNumber = 1, + kNameFieldNumber = 1, }; - // repeated .oteldemo.Flag flag = 1; - int flag_size() const; - private: - int _internal_flag_size() const; + // string name = 1; + void clear_name() ; + const std::string& name() const; + template + void set_name(Arg_&& arg, Args_... args); + std::string* mutable_name(); + PROTOBUF_NODISCARD std::string* release_name(); + void set_allocated_name(std::string* ptr); - public: - void clear_flag() ; - ::oteldemo::Flag* mutable_flag(int index); - ::google::protobuf::RepeatedPtrField< ::oteldemo::Flag >* - mutable_flag(); private: - const ::google::protobuf::RepeatedPtrField<::oteldemo::Flag>& _internal_flag() const; - ::google::protobuf::RepeatedPtrField<::oteldemo::Flag>* _internal_mutable_flag(); + const std::string& _internal_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_name( + const std::string& value); + std::string* _internal_mutable_name(); + public: - const ::oteldemo::Flag& flag(int index) const; - ::oteldemo::Flag* add_flag(); - const ::google::protobuf::RepeatedPtrField< ::oteldemo::Flag >& - flag() const; - // @@protoc_insertion_point(class_scope:oteldemo.ListFlagsResponse) + // @@protoc_insertion_point(class_scope:oteldemo.GetFlagRequest) private: class _Internal; friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<0, 1, 1, 0, 2> _table_; + static const ::google::protobuf::internal::TcParseTable<0, 1, 0, 36, 2> _table_; template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; struct Impl_ { - ::google::protobuf::RepeatedPtrField< ::oteldemo::Flag > flag_; + ::google::protobuf::internal::ArenaStringPtr name_; mutable ::google::protobuf::internal::CachedSize _cached_size_; PROTOBUF_TSAN_DECLARE_MEMBER }; @@ -7506,25 +7617,25 @@ class ListFlagsResponse final : friend struct ::TableStruct_demo_2eproto; };// ------------------------------------------------------------------- -class DeleteFlagRequest final : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:oteldemo.DeleteFlagRequest) */ { +class GetFlagResponse final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:oteldemo.GetFlagResponse) */ { public: - inline DeleteFlagRequest() : DeleteFlagRequest(nullptr) {} - ~DeleteFlagRequest() override; + inline GetFlagResponse() : GetFlagResponse(nullptr) {} + ~GetFlagResponse() override; template - explicit PROTOBUF_CONSTEXPR DeleteFlagRequest(::google::protobuf::internal::ConstantInitialized); + explicit PROTOBUF_CONSTEXPR GetFlagResponse(::google::protobuf::internal::ConstantInitialized); - DeleteFlagRequest(const DeleteFlagRequest& from); - DeleteFlagRequest(DeleteFlagRequest&& from) noexcept - : DeleteFlagRequest() { + GetFlagResponse(const GetFlagResponse& from); + GetFlagResponse(GetFlagResponse&& from) noexcept + : GetFlagResponse() { *this = ::std::move(from); } - inline DeleteFlagRequest& operator=(const DeleteFlagRequest& from) { + inline GetFlagResponse& operator=(const GetFlagResponse& from) { CopyFrom(from); return *this; } - inline DeleteFlagRequest& operator=(DeleteFlagRequest&& from) noexcept { + inline GetFlagResponse& operator=(GetFlagResponse&& from) noexcept { if (this == &from) return *this; if (GetOwningArena() == from.GetOwningArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE @@ -7554,20 +7665,20 @@ class DeleteFlagRequest final : static const ::google::protobuf::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } - static const DeleteFlagRequest& default_instance() { + static const GetFlagResponse& default_instance() { return *internal_default_instance(); } - static inline const DeleteFlagRequest* internal_default_instance() { - return reinterpret_cast( - &_DeleteFlagRequest_default_instance_); + static inline const GetFlagResponse* internal_default_instance() { + return reinterpret_cast( + &_GetFlagResponse_default_instance_); } static constexpr int kIndexInFileMessages = 41; - friend void swap(DeleteFlagRequest& a, DeleteFlagRequest& b) { + friend void swap(GetFlagResponse& a, GetFlagResponse& b) { a.Swap(&b); } - inline void Swap(DeleteFlagRequest* other) { + inline void Swap(GetFlagResponse* other) { if (other == this) return; #ifdef PROTOBUF_FORCE_COPY_IN_SWAP if (GetOwningArena() != nullptr && @@ -7580,7 +7691,7 @@ class DeleteFlagRequest final : ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(DeleteFlagRequest* other) { + void UnsafeArenaSwap(GetFlagResponse* other) { if (other == this) return; ABSL_DCHECK(GetOwningArena() == other->GetOwningArena()); InternalSwap(other); @@ -7588,14 +7699,14 @@ class DeleteFlagRequest final : // implements Message ---------------------------------------------- - DeleteFlagRequest* New(::google::protobuf::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); + GetFlagResponse* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); } using ::google::protobuf::Message::CopyFrom; - void CopyFrom(const DeleteFlagRequest& from); + void CopyFrom(const GetFlagResponse& from); using ::google::protobuf::Message::MergeFrom; - void MergeFrom( const DeleteFlagRequest& from) { - DeleteFlagRequest::MergeImpl(*this, from); + void MergeFrom( const GetFlagResponse& from) { + GetFlagResponse::MergeImpl(*this, from); } private: static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg); @@ -7613,15 +7724,15 @@ class DeleteFlagRequest final : void SharedCtor(::google::protobuf::Arena* arena); void SharedDtor(); void SetCachedSize(int size) const final; - void InternalSwap(DeleteFlagRequest* other); + void InternalSwap(GetFlagResponse* other); private: friend class ::google::protobuf::internal::AnyMetadata; static ::absl::string_view FullMessageName() { - return "oteldemo.DeleteFlagRequest"; + return "oteldemo.GetFlagResponse"; } protected: - explicit DeleteFlagRequest(::google::protobuf::Arena* arena); + explicit GetFlagResponse(::google::protobuf::Arena* arena); public: static const ClassData _class_data_; @@ -7634,60 +7745,61 @@ class DeleteFlagRequest final : // accessors ------------------------------------------------------- enum : int { - kNameFieldNumber = 1, + kFlagFieldNumber = 1, }; - // string name = 1; - void clear_name() ; - const std::string& name() const; - template - void set_name(Arg_&& arg, Args_... args); - std::string* mutable_name(); - PROTOBUF_NODISCARD std::string* release_name(); - void set_allocated_name(std::string* ptr); + // .oteldemo.Flag flag = 1; + bool has_flag() const; + void clear_flag() ; + const ::oteldemo::Flag& flag() const; + PROTOBUF_NODISCARD ::oteldemo::Flag* release_flag(); + ::oteldemo::Flag* mutable_flag(); + void set_allocated_flag(::oteldemo::Flag* value); + void unsafe_arena_set_allocated_flag(::oteldemo::Flag* value); + ::oteldemo::Flag* unsafe_arena_release_flag(); private: - const std::string& _internal_name() const; - inline PROTOBUF_ALWAYS_INLINE void _internal_set_name( - const std::string& value); - std::string* _internal_mutable_name(); + const ::oteldemo::Flag& _internal_flag() const; + ::oteldemo::Flag* _internal_mutable_flag(); public: - // @@protoc_insertion_point(class_scope:oteldemo.DeleteFlagRequest) + // @@protoc_insertion_point(class_scope:oteldemo.GetFlagResponse) private: class _Internal; friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable<0, 1, 0, 39, 2> _table_; + static const ::google::protobuf::internal::TcParseTable<0, 1, 1, 0, 2> _table_; template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; struct Impl_ { - ::google::protobuf::internal::ArenaStringPtr name_; + ::google::protobuf::internal::HasBits<1> _has_bits_; mutable ::google::protobuf::internal::CachedSize _cached_size_; + ::oteldemo::Flag* flag_; PROTOBUF_TSAN_DECLARE_MEMBER }; union { Impl_ _impl_; }; friend struct ::TableStruct_demo_2eproto; };// ------------------------------------------------------------------- -class DeleteFlagResponse final : - public ::google::protobuf::internal::ZeroFieldsBase /* @@protoc_insertion_point(class_definition:oteldemo.DeleteFlagResponse) */ { +class CreateFlagRequest final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:oteldemo.CreateFlagRequest) */ { public: - inline DeleteFlagResponse() : DeleteFlagResponse(nullptr) {} + inline CreateFlagRequest() : CreateFlagRequest(nullptr) {} + ~CreateFlagRequest() override; template - explicit PROTOBUF_CONSTEXPR DeleteFlagResponse(::google::protobuf::internal::ConstantInitialized); + explicit PROTOBUF_CONSTEXPR CreateFlagRequest(::google::protobuf::internal::ConstantInitialized); - DeleteFlagResponse(const DeleteFlagResponse& from); - DeleteFlagResponse(DeleteFlagResponse&& from) noexcept - : DeleteFlagResponse() { + CreateFlagRequest(const CreateFlagRequest& from); + CreateFlagRequest(CreateFlagRequest&& from) noexcept + : CreateFlagRequest() { *this = ::std::move(from); } - inline DeleteFlagResponse& operator=(const DeleteFlagResponse& from) { + inline CreateFlagRequest& operator=(const CreateFlagRequest& from) { CopyFrom(from); return *this; } - inline DeleteFlagResponse& operator=(DeleteFlagResponse&& from) noexcept { + inline CreateFlagRequest& operator=(CreateFlagRequest&& from) noexcept { if (this == &from) return *this; if (GetOwningArena() == from.GetOwningArena() #ifdef PROTOBUF_FORCE_COPY_IN_MOVE @@ -7717,20 +7829,20 @@ class DeleteFlagResponse final : static const ::google::protobuf::Reflection* GetReflection() { return default_instance().GetMetadata().reflection; } - static const DeleteFlagResponse& default_instance() { + static const CreateFlagRequest& default_instance() { return *internal_default_instance(); } - static inline const DeleteFlagResponse* internal_default_instance() { - return reinterpret_cast( - &_DeleteFlagResponse_default_instance_); + static inline const CreateFlagRequest* internal_default_instance() { + return reinterpret_cast( + &_CreateFlagRequest_default_instance_); } static constexpr int kIndexInFileMessages = 42; - friend void swap(DeleteFlagResponse& a, DeleteFlagResponse& b) { + friend void swap(CreateFlagRequest& a, CreateFlagRequest& b) { a.Swap(&b); } - inline void Swap(DeleteFlagResponse* other) { + inline void Swap(CreateFlagRequest* other) { if (other == this) return; #ifdef PROTOBUF_FORCE_COPY_IN_SWAP if (GetOwningArena() != nullptr && @@ -7743,7 +7855,7 @@ class DeleteFlagResponse final : ::google::protobuf::internal::GenericSwap(this, other); } } - void UnsafeArenaSwap(DeleteFlagResponse* other) { + void UnsafeArenaSwap(CreateFlagRequest* other) { if (other == this) return; ABSL_DCHECK(GetOwningArena() == other->GetOwningArena()); InternalSwap(other); @@ -7751,26 +7863,40 @@ class DeleteFlagResponse final : // implements Message ---------------------------------------------- - DeleteFlagResponse* New(::google::protobuf::Arena* arena = nullptr) const final { - return CreateMaybeMessage(arena); - } - using ::google::protobuf::internal::ZeroFieldsBase::CopyFrom; - inline void CopyFrom(const DeleteFlagResponse& from) { - ::google::protobuf::internal::ZeroFieldsBase::CopyImpl(*this, from); + CreateFlagRequest* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); } - using ::google::protobuf::internal::ZeroFieldsBase::MergeFrom; - void MergeFrom(const DeleteFlagResponse& from) { - ::google::protobuf::internal::ZeroFieldsBase::MergeImpl(*this, from); + using ::google::protobuf::Message::CopyFrom; + void CopyFrom(const CreateFlagRequest& from); + using ::google::protobuf::Message::MergeFrom; + void MergeFrom( const CreateFlagRequest& from) { + CreateFlagRequest::MergeImpl(*this, from); } + private: + static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg); public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + ::size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* arena); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(CreateFlagRequest* other); private: friend class ::google::protobuf::internal::AnyMetadata; static ::absl::string_view FullMessageName() { - return "oteldemo.DeleteFlagResponse"; + return "oteldemo.CreateFlagRequest"; } protected: - explicit DeleteFlagResponse(::google::protobuf::Arena* arena); + explicit CreateFlagRequest(::google::protobuf::Arena* arena); public: static const ClassData _class_data_; @@ -7782,153 +7908,1618 @@ class DeleteFlagResponse final : // accessors ------------------------------------------------------- - // @@protoc_insertion_point(class_scope:oteldemo.DeleteFlagResponse) + enum : int { + kNameFieldNumber = 1, + kDescriptionFieldNumber = 2, + kEnabledFieldNumber = 3, + }; + // string name = 1; + void clear_name() ; + const std::string& name() const; + template + void set_name(Arg_&& arg, Args_... args); + std::string* mutable_name(); + PROTOBUF_NODISCARD std::string* release_name(); + void set_allocated_name(std::string* ptr); + + private: + const std::string& _internal_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_name( + const std::string& value); + std::string* _internal_mutable_name(); + + public: + // string description = 2; + void clear_description() ; + const std::string& description() const; + template + void set_description(Arg_&& arg, Args_... args); + std::string* mutable_description(); + PROTOBUF_NODISCARD std::string* release_description(); + void set_allocated_description(std::string* ptr); + + private: + const std::string& _internal_description() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_description( + const std::string& value); + std::string* _internal_mutable_description(); + + public: + // bool enabled = 3; + void clear_enabled() ; + bool enabled() const; + void set_enabled(bool value); + + private: + bool _internal_enabled() const; + void _internal_set_enabled(bool value); + + public: + // @@protoc_insertion_point(class_scope:oteldemo.CreateFlagRequest) private: class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<2, 3, 0, 50, 2> _table_; template friend class ::google::protobuf::Arena::InternalHelper; typedef void InternalArenaConstructable_; typedef void DestructorSkippable_; struct Impl_ { + ::google::protobuf::internal::ArenaStringPtr name_; + ::google::protobuf::internal::ArenaStringPtr description_; + bool enabled_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; PROTOBUF_TSAN_DECLARE_MEMBER }; + union { Impl_ _impl_; }; friend struct ::TableStruct_demo_2eproto; -}; +};// ------------------------------------------------------------------- -// =================================================================== +class CreateFlagResponse final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:oteldemo.CreateFlagResponse) */ { + public: + inline CreateFlagResponse() : CreateFlagResponse(nullptr) {} + ~CreateFlagResponse() override; + template + explicit PROTOBUF_CONSTEXPR CreateFlagResponse(::google::protobuf::internal::ConstantInitialized); + CreateFlagResponse(const CreateFlagResponse& from); + CreateFlagResponse(CreateFlagResponse&& from) noexcept + : CreateFlagResponse() { + *this = ::std::move(from); + } + inline CreateFlagResponse& operator=(const CreateFlagResponse& from) { + CopyFrom(from); + return *this; + } + inline CreateFlagResponse& operator=(CreateFlagResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } -// =================================================================== + static const ::google::protobuf::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::google::protobuf::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::google::protobuf::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const CreateFlagResponse& default_instance() { + return *internal_default_instance(); + } + static inline const CreateFlagResponse* internal_default_instance() { + return reinterpret_cast( + &_CreateFlagResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 43; + friend void swap(CreateFlagResponse& a, CreateFlagResponse& b) { + a.Swap(&b); + } + inline void Swap(CreateFlagResponse* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(CreateFlagResponse* other) { + if (other == this) return; + ABSL_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } -#ifdef __GNUC__ -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wstrict-aliasing" -#endif // __GNUC__ -// ------------------------------------------------------------------- + // implements Message ---------------------------------------------- -// CartItem + CreateFlagResponse* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::google::protobuf::Message::CopyFrom; + void CopyFrom(const CreateFlagResponse& from); + using ::google::protobuf::Message::MergeFrom; + void MergeFrom( const CreateFlagResponse& from) { + CreateFlagResponse::MergeImpl(*this, from); + } + private: + static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; -// string product_id = 1; -inline void CartItem::clear_product_id() { - _impl_.product_id_.ClearToEmpty(); -} -inline const std::string& CartItem::product_id() const { - // @@protoc_insertion_point(field_get:oteldemo.CartItem.product_id) + ::size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* arena); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(CreateFlagResponse* other); + + private: + friend class ::google::protobuf::internal::AnyMetadata; + static ::absl::string_view FullMessageName() { + return "oteldemo.CreateFlagResponse"; + } + protected: + explicit CreateFlagResponse(::google::protobuf::Arena* arena); + public: + + static const ClassData _class_data_; + const ::google::protobuf::Message::ClassData*GetClassData() const final; + + ::google::protobuf::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kFlagFieldNumber = 1, + }; + // .oteldemo.Flag flag = 1; + bool has_flag() const; + void clear_flag() ; + const ::oteldemo::Flag& flag() const; + PROTOBUF_NODISCARD ::oteldemo::Flag* release_flag(); + ::oteldemo::Flag* mutable_flag(); + void set_allocated_flag(::oteldemo::Flag* value); + void unsafe_arena_set_allocated_flag(::oteldemo::Flag* value); + ::oteldemo::Flag* unsafe_arena_release_flag(); + + private: + const ::oteldemo::Flag& _internal_flag() const; + ::oteldemo::Flag* _internal_mutable_flag(); + + public: + // @@protoc_insertion_point(class_scope:oteldemo.CreateFlagResponse) + private: + class _Internal; + + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<0, 1, 1, 0, 2> _table_; + template friend class ::google::protobuf::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::google::protobuf::internal::HasBits<1> _has_bits_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + ::oteldemo::Flag* flag_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_demo_2eproto; +};// ------------------------------------------------------------------- + +class UpdateFlagRequest final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:oteldemo.UpdateFlagRequest) */ { + public: + inline UpdateFlagRequest() : UpdateFlagRequest(nullptr) {} + ~UpdateFlagRequest() override; + template + explicit PROTOBUF_CONSTEXPR UpdateFlagRequest(::google::protobuf::internal::ConstantInitialized); + + UpdateFlagRequest(const UpdateFlagRequest& from); + UpdateFlagRequest(UpdateFlagRequest&& from) noexcept + : UpdateFlagRequest() { + *this = ::std::move(from); + } + + inline UpdateFlagRequest& operator=(const UpdateFlagRequest& from) { + CopyFrom(from); + return *this; + } + inline UpdateFlagRequest& operator=(UpdateFlagRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::google::protobuf::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::google::protobuf::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const UpdateFlagRequest& default_instance() { + return *internal_default_instance(); + } + static inline const UpdateFlagRequest* internal_default_instance() { + return reinterpret_cast( + &_UpdateFlagRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 44; + + friend void swap(UpdateFlagRequest& a, UpdateFlagRequest& b) { + a.Swap(&b); + } + inline void Swap(UpdateFlagRequest* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(UpdateFlagRequest* other) { + if (other == this) return; + ABSL_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + UpdateFlagRequest* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::google::protobuf::Message::CopyFrom; + void CopyFrom(const UpdateFlagRequest& from); + using ::google::protobuf::Message::MergeFrom; + void MergeFrom( const UpdateFlagRequest& from) { + UpdateFlagRequest::MergeImpl(*this, from); + } + private: + static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + ::size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* arena); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(UpdateFlagRequest* other); + + private: + friend class ::google::protobuf::internal::AnyMetadata; + static ::absl::string_view FullMessageName() { + return "oteldemo.UpdateFlagRequest"; + } + protected: + explicit UpdateFlagRequest(::google::protobuf::Arena* arena); + public: + + static const ClassData _class_data_; + const ::google::protobuf::Message::ClassData*GetClassData() const final; + + ::google::protobuf::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kNameFieldNumber = 1, + kEnabledFieldNumber = 2, + }; + // string name = 1; + void clear_name() ; + const std::string& name() const; + template + void set_name(Arg_&& arg, Args_... args); + std::string* mutable_name(); + PROTOBUF_NODISCARD std::string* release_name(); + void set_allocated_name(std::string* ptr); + + private: + const std::string& _internal_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_name( + const std::string& value); + std::string* _internal_mutable_name(); + + public: + // bool enabled = 2; + void clear_enabled() ; + bool enabled() const; + void set_enabled(bool value); + + private: + bool _internal_enabled() const; + void _internal_set_enabled(bool value); + + public: + // @@protoc_insertion_point(class_scope:oteldemo.UpdateFlagRequest) + private: + class _Internal; + + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<1, 2, 0, 39, 2> _table_; + template friend class ::google::protobuf::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::google::protobuf::internal::ArenaStringPtr name_; + bool enabled_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_demo_2eproto; +};// ------------------------------------------------------------------- + +class UpdateFlagResponse final : + public ::google::protobuf::internal::ZeroFieldsBase /* @@protoc_insertion_point(class_definition:oteldemo.UpdateFlagResponse) */ { + public: + inline UpdateFlagResponse() : UpdateFlagResponse(nullptr) {} + template + explicit PROTOBUF_CONSTEXPR UpdateFlagResponse(::google::protobuf::internal::ConstantInitialized); + + UpdateFlagResponse(const UpdateFlagResponse& from); + UpdateFlagResponse(UpdateFlagResponse&& from) noexcept + : UpdateFlagResponse() { + *this = ::std::move(from); + } + + inline UpdateFlagResponse& operator=(const UpdateFlagResponse& from) { + CopyFrom(from); + return *this; + } + inline UpdateFlagResponse& operator=(UpdateFlagResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::google::protobuf::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::google::protobuf::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const UpdateFlagResponse& default_instance() { + return *internal_default_instance(); + } + static inline const UpdateFlagResponse* internal_default_instance() { + return reinterpret_cast( + &_UpdateFlagResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 45; + + friend void swap(UpdateFlagResponse& a, UpdateFlagResponse& b) { + a.Swap(&b); + } + inline void Swap(UpdateFlagResponse* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(UpdateFlagResponse* other) { + if (other == this) return; + ABSL_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + UpdateFlagResponse* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::google::protobuf::internal::ZeroFieldsBase::CopyFrom; + inline void CopyFrom(const UpdateFlagResponse& from) { + ::google::protobuf::internal::ZeroFieldsBase::CopyImpl(*this, from); + } + using ::google::protobuf::internal::ZeroFieldsBase::MergeFrom; + void MergeFrom(const UpdateFlagResponse& from) { + ::google::protobuf::internal::ZeroFieldsBase::MergeImpl(*this, from); + } + public: + + private: + friend class ::google::protobuf::internal::AnyMetadata; + static ::absl::string_view FullMessageName() { + return "oteldemo.UpdateFlagResponse"; + } + protected: + explicit UpdateFlagResponse(::google::protobuf::Arena* arena); + public: + + static const ClassData _class_data_; + const ::google::protobuf::Message::ClassData*GetClassData() const final; + + ::google::protobuf::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // @@protoc_insertion_point(class_scope:oteldemo.UpdateFlagResponse) + private: + class _Internal; + + template friend class ::google::protobuf::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + PROTOBUF_TSAN_DECLARE_MEMBER + }; + friend struct ::TableStruct_demo_2eproto; +};// ------------------------------------------------------------------- + +class ListFlagsRequest final : + public ::google::protobuf::internal::ZeroFieldsBase /* @@protoc_insertion_point(class_definition:oteldemo.ListFlagsRequest) */ { + public: + inline ListFlagsRequest() : ListFlagsRequest(nullptr) {} + template + explicit PROTOBUF_CONSTEXPR ListFlagsRequest(::google::protobuf::internal::ConstantInitialized); + + ListFlagsRequest(const ListFlagsRequest& from); + ListFlagsRequest(ListFlagsRequest&& from) noexcept + : ListFlagsRequest() { + *this = ::std::move(from); + } + + inline ListFlagsRequest& operator=(const ListFlagsRequest& from) { + CopyFrom(from); + return *this; + } + inline ListFlagsRequest& operator=(ListFlagsRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::google::protobuf::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::google::protobuf::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const ListFlagsRequest& default_instance() { + return *internal_default_instance(); + } + static inline const ListFlagsRequest* internal_default_instance() { + return reinterpret_cast( + &_ListFlagsRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 46; + + friend void swap(ListFlagsRequest& a, ListFlagsRequest& b) { + a.Swap(&b); + } + inline void Swap(ListFlagsRequest* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ListFlagsRequest* other) { + if (other == this) return; + ABSL_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ListFlagsRequest* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::google::protobuf::internal::ZeroFieldsBase::CopyFrom; + inline void CopyFrom(const ListFlagsRequest& from) { + ::google::protobuf::internal::ZeroFieldsBase::CopyImpl(*this, from); + } + using ::google::protobuf::internal::ZeroFieldsBase::MergeFrom; + void MergeFrom(const ListFlagsRequest& from) { + ::google::protobuf::internal::ZeroFieldsBase::MergeImpl(*this, from); + } + public: + + private: + friend class ::google::protobuf::internal::AnyMetadata; + static ::absl::string_view FullMessageName() { + return "oteldemo.ListFlagsRequest"; + } + protected: + explicit ListFlagsRequest(::google::protobuf::Arena* arena); + public: + + static const ClassData _class_data_; + const ::google::protobuf::Message::ClassData*GetClassData() const final; + + ::google::protobuf::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // @@protoc_insertion_point(class_scope:oteldemo.ListFlagsRequest) + private: + class _Internal; + + template friend class ::google::protobuf::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + PROTOBUF_TSAN_DECLARE_MEMBER + }; + friend struct ::TableStruct_demo_2eproto; +};// ------------------------------------------------------------------- + +class ListFlagsResponse final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:oteldemo.ListFlagsResponse) */ { + public: + inline ListFlagsResponse() : ListFlagsResponse(nullptr) {} + ~ListFlagsResponse() override; + template + explicit PROTOBUF_CONSTEXPR ListFlagsResponse(::google::protobuf::internal::ConstantInitialized); + + ListFlagsResponse(const ListFlagsResponse& from); + ListFlagsResponse(ListFlagsResponse&& from) noexcept + : ListFlagsResponse() { + *this = ::std::move(from); + } + + inline ListFlagsResponse& operator=(const ListFlagsResponse& from) { + CopyFrom(from); + return *this; + } + inline ListFlagsResponse& operator=(ListFlagsResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::google::protobuf::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::google::protobuf::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const ListFlagsResponse& default_instance() { + return *internal_default_instance(); + } + static inline const ListFlagsResponse* internal_default_instance() { + return reinterpret_cast( + &_ListFlagsResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 47; + + friend void swap(ListFlagsResponse& a, ListFlagsResponse& b) { + a.Swap(&b); + } + inline void Swap(ListFlagsResponse* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ListFlagsResponse* other) { + if (other == this) return; + ABSL_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ListFlagsResponse* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::google::protobuf::Message::CopyFrom; + void CopyFrom(const ListFlagsResponse& from); + using ::google::protobuf::Message::MergeFrom; + void MergeFrom( const ListFlagsResponse& from) { + ListFlagsResponse::MergeImpl(*this, from); + } + private: + static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + ::size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* arena); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(ListFlagsResponse* other); + + private: + friend class ::google::protobuf::internal::AnyMetadata; + static ::absl::string_view FullMessageName() { + return "oteldemo.ListFlagsResponse"; + } + protected: + explicit ListFlagsResponse(::google::protobuf::Arena* arena); + public: + + static const ClassData _class_data_; + const ::google::protobuf::Message::ClassData*GetClassData() const final; + + ::google::protobuf::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kFlagFieldNumber = 1, + }; + // repeated .oteldemo.Flag flag = 1; + int flag_size() const; + private: + int _internal_flag_size() const; + + public: + void clear_flag() ; + ::oteldemo::Flag* mutable_flag(int index); + ::google::protobuf::RepeatedPtrField< ::oteldemo::Flag >* + mutable_flag(); + private: + const ::google::protobuf::RepeatedPtrField<::oteldemo::Flag>& _internal_flag() const; + ::google::protobuf::RepeatedPtrField<::oteldemo::Flag>* _internal_mutable_flag(); + public: + const ::oteldemo::Flag& flag(int index) const; + ::oteldemo::Flag* add_flag(); + const ::google::protobuf::RepeatedPtrField< ::oteldemo::Flag >& + flag() const; + // @@protoc_insertion_point(class_scope:oteldemo.ListFlagsResponse) + private: + class _Internal; + + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<0, 1, 1, 0, 2> _table_; + template friend class ::google::protobuf::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::google::protobuf::RepeatedPtrField< ::oteldemo::Flag > flag_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_demo_2eproto; +};// ------------------------------------------------------------------- + +class DeleteFlagRequest final : + public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:oteldemo.DeleteFlagRequest) */ { + public: + inline DeleteFlagRequest() : DeleteFlagRequest(nullptr) {} + ~DeleteFlagRequest() override; + template + explicit PROTOBUF_CONSTEXPR DeleteFlagRequest(::google::protobuf::internal::ConstantInitialized); + + DeleteFlagRequest(const DeleteFlagRequest& from); + DeleteFlagRequest(DeleteFlagRequest&& from) noexcept + : DeleteFlagRequest() { + *this = ::std::move(from); + } + + inline DeleteFlagRequest& operator=(const DeleteFlagRequest& from) { + CopyFrom(from); + return *this; + } + inline DeleteFlagRequest& operator=(DeleteFlagRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::google::protobuf::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::google::protobuf::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const DeleteFlagRequest& default_instance() { + return *internal_default_instance(); + } + static inline const DeleteFlagRequest* internal_default_instance() { + return reinterpret_cast( + &_DeleteFlagRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 48; + + friend void swap(DeleteFlagRequest& a, DeleteFlagRequest& b) { + a.Swap(&b); + } + inline void Swap(DeleteFlagRequest* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(DeleteFlagRequest* other) { + if (other == this) return; + ABSL_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + DeleteFlagRequest* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::google::protobuf::Message::CopyFrom; + void CopyFrom(const DeleteFlagRequest& from); + using ::google::protobuf::Message::MergeFrom; + void MergeFrom( const DeleteFlagRequest& from) { + DeleteFlagRequest::MergeImpl(*this, from); + } + private: + static void MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + ::size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* arena); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(DeleteFlagRequest* other); + + private: + friend class ::google::protobuf::internal::AnyMetadata; + static ::absl::string_view FullMessageName() { + return "oteldemo.DeleteFlagRequest"; + } + protected: + explicit DeleteFlagRequest(::google::protobuf::Arena* arena); + public: + + static const ClassData _class_data_; + const ::google::protobuf::Message::ClassData*GetClassData() const final; + + ::google::protobuf::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kNameFieldNumber = 1, + }; + // string name = 1; + void clear_name() ; + const std::string& name() const; + template + void set_name(Arg_&& arg, Args_... args); + std::string* mutable_name(); + PROTOBUF_NODISCARD std::string* release_name(); + void set_allocated_name(std::string* ptr); + + private: + const std::string& _internal_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_name( + const std::string& value); + std::string* _internal_mutable_name(); + + public: + // @@protoc_insertion_point(class_scope:oteldemo.DeleteFlagRequest) + private: + class _Internal; + + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable<0, 1, 0, 39, 2> _table_; + template friend class ::google::protobuf::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::google::protobuf::internal::ArenaStringPtr name_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_demo_2eproto; +};// ------------------------------------------------------------------- + +class DeleteFlagResponse final : + public ::google::protobuf::internal::ZeroFieldsBase /* @@protoc_insertion_point(class_definition:oteldemo.DeleteFlagResponse) */ { + public: + inline DeleteFlagResponse() : DeleteFlagResponse(nullptr) {} + template + explicit PROTOBUF_CONSTEXPR DeleteFlagResponse(::google::protobuf::internal::ConstantInitialized); + + DeleteFlagResponse(const DeleteFlagResponse& from); + DeleteFlagResponse(DeleteFlagResponse&& from) noexcept + : DeleteFlagResponse() { + *this = ::std::move(from); + } + + inline DeleteFlagResponse& operator=(const DeleteFlagResponse& from) { + CopyFrom(from); + return *this; + } + inline DeleteFlagResponse& operator=(DeleteFlagResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::google::protobuf::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::google::protobuf::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const DeleteFlagResponse& default_instance() { + return *internal_default_instance(); + } + static inline const DeleteFlagResponse* internal_default_instance() { + return reinterpret_cast( + &_DeleteFlagResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 49; + + friend void swap(DeleteFlagResponse& a, DeleteFlagResponse& b) { + a.Swap(&b); + } + inline void Swap(DeleteFlagResponse* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(DeleteFlagResponse* other) { + if (other == this) return; + ABSL_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + DeleteFlagResponse* New(::google::protobuf::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::google::protobuf::internal::ZeroFieldsBase::CopyFrom; + inline void CopyFrom(const DeleteFlagResponse& from) { + ::google::protobuf::internal::ZeroFieldsBase::CopyImpl(*this, from); + } + using ::google::protobuf::internal::ZeroFieldsBase::MergeFrom; + void MergeFrom(const DeleteFlagResponse& from) { + ::google::protobuf::internal::ZeroFieldsBase::MergeImpl(*this, from); + } + public: + + private: + friend class ::google::protobuf::internal::AnyMetadata; + static ::absl::string_view FullMessageName() { + return "oteldemo.DeleteFlagResponse"; + } + protected: + explicit DeleteFlagResponse(::google::protobuf::Arena* arena); + public: + + static const ClassData _class_data_; + const ::google::protobuf::Message::ClassData*GetClassData() const final; + + ::google::protobuf::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // @@protoc_insertion_point(class_scope:oteldemo.DeleteFlagResponse) + private: + class _Internal; + + template friend class ::google::protobuf::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + PROTOBUF_TSAN_DECLARE_MEMBER + }; + friend struct ::TableStruct_demo_2eproto; +}; + +// =================================================================== + + + + +// =================================================================== + + +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// CartItem + +// string product_id = 1; +inline void CartItem::clear_product_id() { + _impl_.product_id_.ClearToEmpty(); +} +inline const std::string& CartItem::product_id() const { + // @@protoc_insertion_point(field_get:oteldemo.CartItem.product_id) return _internal_product_id(); } template -inline PROTOBUF_ALWAYS_INLINE void CartItem::set_product_id(Arg_&& arg, +inline PROTOBUF_ALWAYS_INLINE void CartItem::set_product_id(Arg_&& arg, + Args_... args) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.product_id_.Set(static_cast(arg), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:oteldemo.CartItem.product_id) +} +inline std::string* CartItem::mutable_product_id() { + std::string* _s = _internal_mutable_product_id(); + // @@protoc_insertion_point(field_mutable:oteldemo.CartItem.product_id) + return _s; +} +inline const std::string& CartItem::_internal_product_id() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.product_id_.Get(); +} +inline void CartItem::_internal_set_product_id(const std::string& value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.product_id_.Set(value, GetArenaForAllocation()); +} +inline std::string* CartItem::_internal_mutable_product_id() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + return _impl_.product_id_.Mutable( GetArenaForAllocation()); +} +inline std::string* CartItem::release_product_id() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + // @@protoc_insertion_point(field_release:oteldemo.CartItem.product_id) + return _impl_.product_id_.Release(); +} +inline void CartItem::set_allocated_product_id(std::string* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.product_id_.SetAllocated(value, GetArenaForAllocation()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.product_id_.IsDefault()) { + _impl_.product_id_.Set("", GetArenaForAllocation()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:oteldemo.CartItem.product_id) +} + +// int32 quantity = 2; +inline void CartItem::clear_quantity() { + _impl_.quantity_ = 0; +} +inline ::int32_t CartItem::quantity() const { + // @@protoc_insertion_point(field_get:oteldemo.CartItem.quantity) + return _internal_quantity(); +} +inline void CartItem::set_quantity(::int32_t value) { + _internal_set_quantity(value); + // @@protoc_insertion_point(field_set:oteldemo.CartItem.quantity) +} +inline ::int32_t CartItem::_internal_quantity() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.quantity_; +} +inline void CartItem::_internal_set_quantity(::int32_t value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.quantity_ = value; +} + +// ------------------------------------------------------------------- + +// AddItemRequest + +// string user_id = 1; +inline void AddItemRequest::clear_user_id() { + _impl_.user_id_.ClearToEmpty(); +} +inline const std::string& AddItemRequest::user_id() const { + // @@protoc_insertion_point(field_get:oteldemo.AddItemRequest.user_id) + return _internal_user_id(); +} +template +inline PROTOBUF_ALWAYS_INLINE void AddItemRequest::set_user_id(Arg_&& arg, + Args_... args) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.user_id_.Set(static_cast(arg), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:oteldemo.AddItemRequest.user_id) +} +inline std::string* AddItemRequest::mutable_user_id() { + std::string* _s = _internal_mutable_user_id(); + // @@protoc_insertion_point(field_mutable:oteldemo.AddItemRequest.user_id) + return _s; +} +inline const std::string& AddItemRequest::_internal_user_id() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.user_id_.Get(); +} +inline void AddItemRequest::_internal_set_user_id(const std::string& value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.user_id_.Set(value, GetArenaForAllocation()); +} +inline std::string* AddItemRequest::_internal_mutable_user_id() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + return _impl_.user_id_.Mutable( GetArenaForAllocation()); +} +inline std::string* AddItemRequest::release_user_id() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + // @@protoc_insertion_point(field_release:oteldemo.AddItemRequest.user_id) + return _impl_.user_id_.Release(); +} +inline void AddItemRequest::set_allocated_user_id(std::string* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.user_id_.SetAllocated(value, GetArenaForAllocation()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.user_id_.IsDefault()) { + _impl_.user_id_.Set("", GetArenaForAllocation()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:oteldemo.AddItemRequest.user_id) +} + +// .oteldemo.CartItem item = 2; +inline bool AddItemRequest::has_item() const { + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + PROTOBUF_ASSUME(!value || _impl_.item_ != nullptr); + return value; +} +inline void AddItemRequest::clear_item() { + if (_impl_.item_ != nullptr) _impl_.item_->Clear(); + _impl_._has_bits_[0] &= ~0x00000001u; +} +inline const ::oteldemo::CartItem& AddItemRequest::_internal_item() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + const ::oteldemo::CartItem* p = _impl_.item_; + return p != nullptr ? *p : reinterpret_cast(::oteldemo::_CartItem_default_instance_); +} +inline const ::oteldemo::CartItem& AddItemRequest::item() const { + // @@protoc_insertion_point(field_get:oteldemo.AddItemRequest.item) + return _internal_item(); +} +inline void AddItemRequest::unsafe_arena_set_allocated_item(::oteldemo::CartItem* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.item_); + } + _impl_.item_ = reinterpret_cast<::oteldemo::CartItem*>(value); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000001u; + } else { + _impl_._has_bits_[0] &= ~0x00000001u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:oteldemo.AddItemRequest.item) +} +inline ::oteldemo::CartItem* AddItemRequest::release_item() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + + _impl_._has_bits_[0] &= ~0x00000001u; + ::oteldemo::CartItem* released = _impl_.item_; + _impl_.item_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArenaForAllocation() == nullptr) { + delete old; + } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return released; +} +inline ::oteldemo::CartItem* AddItemRequest::unsafe_arena_release_item() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + // @@protoc_insertion_point(field_release:oteldemo.AddItemRequest.item) + + _impl_._has_bits_[0] &= ~0x00000001u; + ::oteldemo::CartItem* temp = _impl_.item_; + _impl_.item_ = nullptr; + return temp; +} +inline ::oteldemo::CartItem* AddItemRequest::_internal_mutable_item() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_._has_bits_[0] |= 0x00000001u; + if (_impl_.item_ == nullptr) { + auto* p = CreateMaybeMessage<::oteldemo::CartItem>(GetArenaForAllocation()); + _impl_.item_ = reinterpret_cast<::oteldemo::CartItem*>(p); + } + return _impl_.item_; +} +inline ::oteldemo::CartItem* AddItemRequest::mutable_item() { + ::oteldemo::CartItem* _msg = _internal_mutable_item(); + // @@protoc_insertion_point(field_mutable:oteldemo.AddItemRequest.item) + return _msg; +} +inline void AddItemRequest::set_allocated_item(::oteldemo::CartItem* value) { + ::google::protobuf::Arena* message_arena = GetArenaForAllocation(); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (message_arena == nullptr) { + delete reinterpret_cast<::oteldemo::CartItem*>(_impl_.item_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = + ::google::protobuf::Arena::InternalGetOwningArena(reinterpret_cast<::oteldemo::CartItem*>(value)); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + _impl_._has_bits_[0] |= 0x00000001u; + } else { + _impl_._has_bits_[0] &= ~0x00000001u; + } + + _impl_.item_ = reinterpret_cast<::oteldemo::CartItem*>(value); + // @@protoc_insertion_point(field_set_allocated:oteldemo.AddItemRequest.item) +} + +// ------------------------------------------------------------------- + +// EmptyCartRequest + +// string user_id = 1; +inline void EmptyCartRequest::clear_user_id() { + _impl_.user_id_.ClearToEmpty(); +} +inline const std::string& EmptyCartRequest::user_id() const { + // @@protoc_insertion_point(field_get:oteldemo.EmptyCartRequest.user_id) + return _internal_user_id(); +} +template +inline PROTOBUF_ALWAYS_INLINE void EmptyCartRequest::set_user_id(Arg_&& arg, Args_... args) { PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); ; - _impl_.product_id_.Set(static_cast(arg), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:oteldemo.CartItem.product_id) + _impl_.user_id_.Set(static_cast(arg), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:oteldemo.EmptyCartRequest.user_id) } -inline std::string* CartItem::mutable_product_id() { - std::string* _s = _internal_mutable_product_id(); - // @@protoc_insertion_point(field_mutable:oteldemo.CartItem.product_id) +inline std::string* EmptyCartRequest::mutable_user_id() { + std::string* _s = _internal_mutable_user_id(); + // @@protoc_insertion_point(field_mutable:oteldemo.EmptyCartRequest.user_id) return _s; } -inline const std::string& CartItem::_internal_product_id() const { +inline const std::string& EmptyCartRequest::_internal_user_id() const { PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); - return _impl_.product_id_.Get(); + return _impl_.user_id_.Get(); } -inline void CartItem::_internal_set_product_id(const std::string& value) { +inline void EmptyCartRequest::_internal_set_user_id(const std::string& value) { PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); ; - _impl_.product_id_.Set(value, GetArenaForAllocation()); + _impl_.user_id_.Set(value, GetArenaForAllocation()); } -inline std::string* CartItem::_internal_mutable_product_id() { +inline std::string* EmptyCartRequest::_internal_mutable_user_id() { PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); ; - return _impl_.product_id_.Mutable( GetArenaForAllocation()); + return _impl_.user_id_.Mutable( GetArenaForAllocation()); } -inline std::string* CartItem::release_product_id() { +inline std::string* EmptyCartRequest::release_user_id() { PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); - // @@protoc_insertion_point(field_release:oteldemo.CartItem.product_id) - return _impl_.product_id_.Release(); + // @@protoc_insertion_point(field_release:oteldemo.EmptyCartRequest.user_id) + return _impl_.user_id_.Release(); } -inline void CartItem::set_allocated_product_id(std::string* value) { +inline void EmptyCartRequest::set_allocated_user_id(std::string* value) { PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); - _impl_.product_id_.SetAllocated(value, GetArenaForAllocation()); + _impl_.user_id_.SetAllocated(value, GetArenaForAllocation()); #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.product_id_.IsDefault()) { - _impl_.product_id_.Set("", GetArenaForAllocation()); + if (_impl_.user_id_.IsDefault()) { + _impl_.user_id_.Set("", GetArenaForAllocation()); } #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - // @@protoc_insertion_point(field_set_allocated:oteldemo.CartItem.product_id) + // @@protoc_insertion_point(field_set_allocated:oteldemo.EmptyCartRequest.user_id) } -// int32 quantity = 2; -inline void CartItem::clear_quantity() { - _impl_.quantity_ = 0; +// ------------------------------------------------------------------- + +// GetCartRequest + +// string user_id = 1; +inline void GetCartRequest::clear_user_id() { + _impl_.user_id_.ClearToEmpty(); } -inline ::int32_t CartItem::quantity() const { - // @@protoc_insertion_point(field_get:oteldemo.CartItem.quantity) - return _internal_quantity(); +inline const std::string& GetCartRequest::user_id() const { + // @@protoc_insertion_point(field_get:oteldemo.GetCartRequest.user_id) + return _internal_user_id(); } -inline void CartItem::set_quantity(::int32_t value) { - _internal_set_quantity(value); - // @@protoc_insertion_point(field_set:oteldemo.CartItem.quantity) +template +inline PROTOBUF_ALWAYS_INLINE void GetCartRequest::set_user_id(Arg_&& arg, + Args_... args) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.user_id_.Set(static_cast(arg), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:oteldemo.GetCartRequest.user_id) } -inline ::int32_t CartItem::_internal_quantity() const { +inline std::string* GetCartRequest::mutable_user_id() { + std::string* _s = _internal_mutable_user_id(); + // @@protoc_insertion_point(field_mutable:oteldemo.GetCartRequest.user_id) + return _s; +} +inline const std::string& GetCartRequest::_internal_user_id() const { PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); - return _impl_.quantity_; + return _impl_.user_id_.Get(); +} +inline void GetCartRequest::_internal_set_user_id(const std::string& value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.user_id_.Set(value, GetArenaForAllocation()); +} +inline std::string* GetCartRequest::_internal_mutable_user_id() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + return _impl_.user_id_.Mutable( GetArenaForAllocation()); +} +inline std::string* GetCartRequest::release_user_id() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + // @@protoc_insertion_point(field_release:oteldemo.GetCartRequest.user_id) + return _impl_.user_id_.Release(); +} +inline void GetCartRequest::set_allocated_user_id(std::string* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.user_id_.SetAllocated(value, GetArenaForAllocation()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.user_id_.IsDefault()) { + _impl_.user_id_.Set("", GetArenaForAllocation()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:oteldemo.GetCartRequest.user_id) +} + +// ------------------------------------------------------------------- + +// Cart + +// string user_id = 1; +inline void Cart::clear_user_id() { + _impl_.user_id_.ClearToEmpty(); +} +inline const std::string& Cart::user_id() const { + // @@protoc_insertion_point(field_get:oteldemo.Cart.user_id) + return _internal_user_id(); +} +template +inline PROTOBUF_ALWAYS_INLINE void Cart::set_user_id(Arg_&& arg, + Args_... args) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.user_id_.Set(static_cast(arg), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:oteldemo.Cart.user_id) +} +inline std::string* Cart::mutable_user_id() { + std::string* _s = _internal_mutable_user_id(); + // @@protoc_insertion_point(field_mutable:oteldemo.Cart.user_id) + return _s; +} +inline const std::string& Cart::_internal_user_id() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.user_id_.Get(); +} +inline void Cart::_internal_set_user_id(const std::string& value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.user_id_.Set(value, GetArenaForAllocation()); +} +inline std::string* Cart::_internal_mutable_user_id() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + return _impl_.user_id_.Mutable( GetArenaForAllocation()); +} +inline std::string* Cart::release_user_id() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + // @@protoc_insertion_point(field_release:oteldemo.Cart.user_id) + return _impl_.user_id_.Release(); +} +inline void Cart::set_allocated_user_id(std::string* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.user_id_.SetAllocated(value, GetArenaForAllocation()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.user_id_.IsDefault()) { + _impl_.user_id_.Set("", GetArenaForAllocation()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:oteldemo.Cart.user_id) +} + +// repeated .oteldemo.CartItem items = 2; +inline int Cart::_internal_items_size() const { + return _internal_items().size(); +} +inline int Cart::items_size() const { + return _internal_items_size(); +} +inline void Cart::clear_items() { + _internal_mutable_items()->Clear(); +} +inline ::oteldemo::CartItem* Cart::mutable_items(int index) { + // @@protoc_insertion_point(field_mutable:oteldemo.Cart.items) + return _internal_mutable_items()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField< ::oteldemo::CartItem >* +Cart::mutable_items() { + // @@protoc_insertion_point(field_mutable_list:oteldemo.Cart.items) + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + return _internal_mutable_items(); +} +inline const ::oteldemo::CartItem& Cart::items(int index) const { + // @@protoc_insertion_point(field_get:oteldemo.Cart.items) + return _internal_items().Get(index); +} +inline ::oteldemo::CartItem* Cart::add_items() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ::oteldemo::CartItem* _add = _internal_mutable_items()->Add(); + // @@protoc_insertion_point(field_add:oteldemo.Cart.items) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField< ::oteldemo::CartItem >& +Cart::items() const { + // @@protoc_insertion_point(field_list:oteldemo.Cart.items) + return _internal_items(); +} +inline const ::google::protobuf::RepeatedPtrField<::oteldemo::CartItem>& +Cart::_internal_items() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.items_; } -inline void CartItem::_internal_set_quantity(::int32_t value) { - PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); - ; - _impl_.quantity_ = value; +inline ::google::protobuf::RepeatedPtrField<::oteldemo::CartItem>* +Cart::_internal_mutable_items() { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return &_impl_.items_; } // ------------------------------------------------------------------- -// AddItemRequest +// Empty + +// ------------------------------------------------------------------- + +// ListRecommendationsRequest // string user_id = 1; -inline void AddItemRequest::clear_user_id() { +inline void ListRecommendationsRequest::clear_user_id() { _impl_.user_id_.ClearToEmpty(); } -inline const std::string& AddItemRequest::user_id() const { - // @@protoc_insertion_point(field_get:oteldemo.AddItemRequest.user_id) +inline const std::string& ListRecommendationsRequest::user_id() const { + // @@protoc_insertion_point(field_get:oteldemo.ListRecommendationsRequest.user_id) return _internal_user_id(); } template -inline PROTOBUF_ALWAYS_INLINE void AddItemRequest::set_user_id(Arg_&& arg, +inline PROTOBUF_ALWAYS_INLINE void ListRecommendationsRequest::set_user_id(Arg_&& arg, Args_... args) { PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); ; _impl_.user_id_.Set(static_cast(arg), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:oteldemo.AddItemRequest.user_id) + // @@protoc_insertion_point(field_set:oteldemo.ListRecommendationsRequest.user_id) } -inline std::string* AddItemRequest::mutable_user_id() { +inline std::string* ListRecommendationsRequest::mutable_user_id() { std::string* _s = _internal_mutable_user_id(); - // @@protoc_insertion_point(field_mutable:oteldemo.AddItemRequest.user_id) + // @@protoc_insertion_point(field_mutable:oteldemo.ListRecommendationsRequest.user_id) return _s; } -inline const std::string& AddItemRequest::_internal_user_id() const { +inline const std::string& ListRecommendationsRequest::_internal_user_id() const { PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.user_id_.Get(); } -inline void AddItemRequest::_internal_set_user_id(const std::string& value) { +inline void ListRecommendationsRequest::_internal_set_user_id(const std::string& value) { PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); ; _impl_.user_id_.Set(value, GetArenaForAllocation()); } -inline std::string* AddItemRequest::_internal_mutable_user_id() { +inline std::string* ListRecommendationsRequest::_internal_mutable_user_id() { PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); ; return _impl_.user_id_.Mutable( GetArenaForAllocation()); } -inline std::string* AddItemRequest::release_user_id() { +inline std::string* ListRecommendationsRequest::release_user_id() { PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); - // @@protoc_insertion_point(field_release:oteldemo.AddItemRequest.user_id) + // @@protoc_insertion_point(field_release:oteldemo.ListRecommendationsRequest.user_id) return _impl_.user_id_.Release(); } -inline void AddItemRequest::set_allocated_user_id(std::string* value) { +inline void ListRecommendationsRequest::set_allocated_user_id(std::string* value) { PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.user_id_.SetAllocated(value, GetArenaForAllocation()); #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING @@ -7936,718 +9527,911 @@ inline void AddItemRequest::set_allocated_user_id(std::string* value) { _impl_.user_id_.Set("", GetArenaForAllocation()); } #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - // @@protoc_insertion_point(field_set_allocated:oteldemo.AddItemRequest.user_id) + // @@protoc_insertion_point(field_set_allocated:oteldemo.ListRecommendationsRequest.user_id) } -// .oteldemo.CartItem item = 2; -inline bool AddItemRequest::has_item() const { - bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; - PROTOBUF_ASSUME(!value || _impl_.item_ != nullptr); - return value; +// repeated string product_ids = 2; +inline int ListRecommendationsRequest::_internal_product_ids_size() const { + return _internal_product_ids().size(); } -inline void AddItemRequest::clear_item() { - if (_impl_.item_ != nullptr) _impl_.item_->Clear(); - _impl_._has_bits_[0] &= ~0x00000001u; +inline int ListRecommendationsRequest::product_ids_size() const { + return _internal_product_ids_size(); } -inline const ::oteldemo::CartItem& AddItemRequest::_internal_item() const { - PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); - const ::oteldemo::CartItem* p = _impl_.item_; - return p != nullptr ? *p : reinterpret_cast(::oteldemo::_CartItem_default_instance_); +inline void ListRecommendationsRequest::clear_product_ids() { + _internal_mutable_product_ids()->Clear(); } -inline const ::oteldemo::CartItem& AddItemRequest::item() const { - // @@protoc_insertion_point(field_get:oteldemo.AddItemRequest.item) - return _internal_item(); +inline std::string* ListRecommendationsRequest::add_product_ids() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + std::string* _s = _internal_mutable_product_ids()->Add(); + // @@protoc_insertion_point(field_add_mutable:oteldemo.ListRecommendationsRequest.product_ids) + return _s; } -inline void AddItemRequest::unsafe_arena_set_allocated_item(::oteldemo::CartItem* value) { +inline const std::string& ListRecommendationsRequest::product_ids(int index) const { + // @@protoc_insertion_point(field_get:oteldemo.ListRecommendationsRequest.product_ids) + return _internal_product_ids().Get(index); +} +inline std::string* ListRecommendationsRequest::mutable_product_ids(int index) { + // @@protoc_insertion_point(field_mutable:oteldemo.ListRecommendationsRequest.product_ids) + return _internal_mutable_product_ids()->Mutable(index); +} +inline void ListRecommendationsRequest::set_product_ids(int index, const std::string& value) { + _internal_mutable_product_ids()->Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set:oteldemo.ListRecommendationsRequest.product_ids) +} +inline void ListRecommendationsRequest::set_product_ids(int index, std::string&& value) { + _internal_mutable_product_ids()->Mutable(index)->assign(std::move(value)); + // @@protoc_insertion_point(field_set:oteldemo.ListRecommendationsRequest.product_ids) +} +inline void ListRecommendationsRequest::set_product_ids(int index, const char* value) { + ABSL_DCHECK(value != nullptr); + _internal_mutable_product_ids()->Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:oteldemo.ListRecommendationsRequest.product_ids) +} +inline void ListRecommendationsRequest::set_product_ids(int index, const char* value, + std::size_t size) { + _internal_mutable_product_ids()->Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:oteldemo.ListRecommendationsRequest.product_ids) +} +inline void ListRecommendationsRequest::set_product_ids(int index, absl::string_view value) { + _internal_mutable_product_ids()->Mutable(index)->assign(value.data(), + value.size()); + // @@protoc_insertion_point(field_set_string_piece:oteldemo.ListRecommendationsRequest.product_ids) +} +inline void ListRecommendationsRequest::add_product_ids(const std::string& value) { PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.item_); - } - _impl_.item_ = reinterpret_cast<::oteldemo::CartItem*>(value); - if (value != nullptr) { - _impl_._has_bits_[0] |= 0x00000001u; - } else { - _impl_._has_bits_[0] &= ~0x00000001u; - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:oteldemo.AddItemRequest.item) + _internal_mutable_product_ids()->Add()->assign(value); + // @@protoc_insertion_point(field_add:oteldemo.ListRecommendationsRequest.product_ids) } -inline ::oteldemo::CartItem* AddItemRequest::release_item() { +inline void ListRecommendationsRequest::add_product_ids(std::string&& value) { PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); - - _impl_._has_bits_[0] &= ~0x00000001u; - ::oteldemo::CartItem* released = _impl_.item_; - _impl_.item_ = nullptr; -#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); - released = ::google::protobuf::internal::DuplicateIfNonNull(released); - if (GetArenaForAllocation() == nullptr) { - delete old; - } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - released = ::google::protobuf::internal::DuplicateIfNonNull(released); - } -#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return released; + _internal_mutable_product_ids()->Add(std::move(value)); + // @@protoc_insertion_point(field_add:oteldemo.ListRecommendationsRequest.product_ids) } -inline ::oteldemo::CartItem* AddItemRequest::unsafe_arena_release_item() { +inline void ListRecommendationsRequest::add_product_ids(const char* value) { + ABSL_DCHECK(value != nullptr); PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); - // @@protoc_insertion_point(field_release:oteldemo.AddItemRequest.item) + _internal_mutable_product_ids()->Add()->assign(value); + // @@protoc_insertion_point(field_add_char:oteldemo.ListRecommendationsRequest.product_ids) +} +inline void ListRecommendationsRequest::add_product_ids(const char* value, std::size_t size) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _internal_mutable_product_ids()->Add()->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:oteldemo.ListRecommendationsRequest.product_ids) +} +inline void ListRecommendationsRequest::add_product_ids(absl::string_view value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _internal_mutable_product_ids()->Add()->assign(value.data(), value.size()); + // @@protoc_insertion_point(field_add_string_piece:oteldemo.ListRecommendationsRequest.product_ids) +} +inline const ::google::protobuf::RepeatedPtrField& +ListRecommendationsRequest::product_ids() const { + // @@protoc_insertion_point(field_list:oteldemo.ListRecommendationsRequest.product_ids) + return _internal_product_ids(); +} +inline ::google::protobuf::RepeatedPtrField* ListRecommendationsRequest::mutable_product_ids() { + // @@protoc_insertion_point(field_mutable_list:oteldemo.ListRecommendationsRequest.product_ids) + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + return _internal_mutable_product_ids(); +} +inline const ::google::protobuf::RepeatedPtrField& +ListRecommendationsRequest::_internal_product_ids() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.product_ids_; +} +inline ::google::protobuf::RepeatedPtrField* +ListRecommendationsRequest::_internal_mutable_product_ids() { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return &_impl_.product_ids_; +} - _impl_._has_bits_[0] &= ~0x00000001u; - ::oteldemo::CartItem* temp = _impl_.item_; - _impl_.item_ = nullptr; - return temp; +// ------------------------------------------------------------------- + +// ListRecommendationsResponse + +// repeated string product_ids = 1; +inline int ListRecommendationsResponse::_internal_product_ids_size() const { + return _internal_product_ids().size(); +} +inline int ListRecommendationsResponse::product_ids_size() const { + return _internal_product_ids_size(); +} +inline void ListRecommendationsResponse::clear_product_ids() { + _internal_mutable_product_ids()->Clear(); +} +inline std::string* ListRecommendationsResponse::add_product_ids() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + std::string* _s = _internal_mutable_product_ids()->Add(); + // @@protoc_insertion_point(field_add_mutable:oteldemo.ListRecommendationsResponse.product_ids) + return _s; +} +inline const std::string& ListRecommendationsResponse::product_ids(int index) const { + // @@protoc_insertion_point(field_get:oteldemo.ListRecommendationsResponse.product_ids) + return _internal_product_ids().Get(index); +} +inline std::string* ListRecommendationsResponse::mutable_product_ids(int index) { + // @@protoc_insertion_point(field_mutable:oteldemo.ListRecommendationsResponse.product_ids) + return _internal_mutable_product_ids()->Mutable(index); +} +inline void ListRecommendationsResponse::set_product_ids(int index, const std::string& value) { + _internal_mutable_product_ids()->Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set:oteldemo.ListRecommendationsResponse.product_ids) +} +inline void ListRecommendationsResponse::set_product_ids(int index, std::string&& value) { + _internal_mutable_product_ids()->Mutable(index)->assign(std::move(value)); + // @@protoc_insertion_point(field_set:oteldemo.ListRecommendationsResponse.product_ids) +} +inline void ListRecommendationsResponse::set_product_ids(int index, const char* value) { + ABSL_DCHECK(value != nullptr); + _internal_mutable_product_ids()->Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:oteldemo.ListRecommendationsResponse.product_ids) +} +inline void ListRecommendationsResponse::set_product_ids(int index, const char* value, + std::size_t size) { + _internal_mutable_product_ids()->Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:oteldemo.ListRecommendationsResponse.product_ids) +} +inline void ListRecommendationsResponse::set_product_ids(int index, absl::string_view value) { + _internal_mutable_product_ids()->Mutable(index)->assign(value.data(), + value.size()); + // @@protoc_insertion_point(field_set_string_piece:oteldemo.ListRecommendationsResponse.product_ids) +} +inline void ListRecommendationsResponse::add_product_ids(const std::string& value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _internal_mutable_product_ids()->Add()->assign(value); + // @@protoc_insertion_point(field_add:oteldemo.ListRecommendationsResponse.product_ids) +} +inline void ListRecommendationsResponse::add_product_ids(std::string&& value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _internal_mutable_product_ids()->Add(std::move(value)); + // @@protoc_insertion_point(field_add:oteldemo.ListRecommendationsResponse.product_ids) +} +inline void ListRecommendationsResponse::add_product_ids(const char* value) { + ABSL_DCHECK(value != nullptr); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _internal_mutable_product_ids()->Add()->assign(value); + // @@protoc_insertion_point(field_add_char:oteldemo.ListRecommendationsResponse.product_ids) +} +inline void ListRecommendationsResponse::add_product_ids(const char* value, std::size_t size) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _internal_mutable_product_ids()->Add()->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:oteldemo.ListRecommendationsResponse.product_ids) +} +inline void ListRecommendationsResponse::add_product_ids(absl::string_view value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _internal_mutable_product_ids()->Add()->assign(value.data(), value.size()); + // @@protoc_insertion_point(field_add_string_piece:oteldemo.ListRecommendationsResponse.product_ids) +} +inline const ::google::protobuf::RepeatedPtrField& +ListRecommendationsResponse::product_ids() const { + // @@protoc_insertion_point(field_list:oteldemo.ListRecommendationsResponse.product_ids) + return _internal_product_ids(); } -inline ::oteldemo::CartItem* AddItemRequest::_internal_mutable_item() { +inline ::google::protobuf::RepeatedPtrField* ListRecommendationsResponse::mutable_product_ids() { + // @@protoc_insertion_point(field_mutable_list:oteldemo.ListRecommendationsResponse.product_ids) PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); - _impl_._has_bits_[0] |= 0x00000001u; - if (_impl_.item_ == nullptr) { - auto* p = CreateMaybeMessage<::oteldemo::CartItem>(GetArenaForAllocation()); - _impl_.item_ = reinterpret_cast<::oteldemo::CartItem*>(p); - } - return _impl_.item_; + return _internal_mutable_product_ids(); } -inline ::oteldemo::CartItem* AddItemRequest::mutable_item() { - ::oteldemo::CartItem* _msg = _internal_mutable_item(); - // @@protoc_insertion_point(field_mutable:oteldemo.AddItemRequest.item) - return _msg; +inline const ::google::protobuf::RepeatedPtrField& +ListRecommendationsResponse::_internal_product_ids() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.product_ids_; } -inline void AddItemRequest::set_allocated_item(::oteldemo::CartItem* value) { - ::google::protobuf::Arena* message_arena = GetArenaForAllocation(); - PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); - if (message_arena == nullptr) { - delete reinterpret_cast<::oteldemo::CartItem*>(_impl_.item_); - } - - if (value != nullptr) { - ::google::protobuf::Arena* submessage_arena = - ::google::protobuf::Arena::InternalGetOwningArena(reinterpret_cast<::oteldemo::CartItem*>(value)); - if (message_arena != submessage_arena) { - value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); - } - _impl_._has_bits_[0] |= 0x00000001u; - } else { - _impl_._has_bits_[0] &= ~0x00000001u; - } - - _impl_.item_ = reinterpret_cast<::oteldemo::CartItem*>(value); - // @@protoc_insertion_point(field_set_allocated:oteldemo.AddItemRequest.item) +inline ::google::protobuf::RepeatedPtrField* +ListRecommendationsResponse::_internal_mutable_product_ids() { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return &_impl_.product_ids_; } // ------------------------------------------------------------------- -// EmptyCartRequest +// Product -// string user_id = 1; -inline void EmptyCartRequest::clear_user_id() { - _impl_.user_id_.ClearToEmpty(); +// string id = 1; +inline void Product::clear_id() { + _impl_.id_.ClearToEmpty(); } -inline const std::string& EmptyCartRequest::user_id() const { - // @@protoc_insertion_point(field_get:oteldemo.EmptyCartRequest.user_id) - return _internal_user_id(); +inline const std::string& Product::id() const { + // @@protoc_insertion_point(field_get:oteldemo.Product.id) + return _internal_id(); } template -inline PROTOBUF_ALWAYS_INLINE void EmptyCartRequest::set_user_id(Arg_&& arg, +inline PROTOBUF_ALWAYS_INLINE void Product::set_id(Arg_&& arg, Args_... args) { PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); ; - _impl_.user_id_.Set(static_cast(arg), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:oteldemo.EmptyCartRequest.user_id) + _impl_.id_.Set(static_cast(arg), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:oteldemo.Product.id) } -inline std::string* EmptyCartRequest::mutable_user_id() { - std::string* _s = _internal_mutable_user_id(); - // @@protoc_insertion_point(field_mutable:oteldemo.EmptyCartRequest.user_id) +inline std::string* Product::mutable_id() { + std::string* _s = _internal_mutable_id(); + // @@protoc_insertion_point(field_mutable:oteldemo.Product.id) return _s; } -inline const std::string& EmptyCartRequest::_internal_user_id() const { +inline const std::string& Product::_internal_id() const { PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); - return _impl_.user_id_.Get(); + return _impl_.id_.Get(); } -inline void EmptyCartRequest::_internal_set_user_id(const std::string& value) { +inline void Product::_internal_set_id(const std::string& value) { PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); ; - _impl_.user_id_.Set(value, GetArenaForAllocation()); + _impl_.id_.Set(value, GetArenaForAllocation()); } -inline std::string* EmptyCartRequest::_internal_mutable_user_id() { +inline std::string* Product::_internal_mutable_id() { PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); ; - return _impl_.user_id_.Mutable( GetArenaForAllocation()); + return _impl_.id_.Mutable( GetArenaForAllocation()); } -inline std::string* EmptyCartRequest::release_user_id() { +inline std::string* Product::release_id() { PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); - // @@protoc_insertion_point(field_release:oteldemo.EmptyCartRequest.user_id) - return _impl_.user_id_.Release(); + // @@protoc_insertion_point(field_release:oteldemo.Product.id) + return _impl_.id_.Release(); } -inline void EmptyCartRequest::set_allocated_user_id(std::string* value) { +inline void Product::set_allocated_id(std::string* value) { PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); - _impl_.user_id_.SetAllocated(value, GetArenaForAllocation()); + _impl_.id_.SetAllocated(value, GetArenaForAllocation()); #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.user_id_.IsDefault()) { - _impl_.user_id_.Set("", GetArenaForAllocation()); + if (_impl_.id_.IsDefault()) { + _impl_.id_.Set("", GetArenaForAllocation()); } #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - // @@protoc_insertion_point(field_set_allocated:oteldemo.EmptyCartRequest.user_id) + // @@protoc_insertion_point(field_set_allocated:oteldemo.Product.id) } -// ------------------------------------------------------------------- - -// GetCartRequest - -// string user_id = 1; -inline void GetCartRequest::clear_user_id() { - _impl_.user_id_.ClearToEmpty(); +// string name = 2; +inline void Product::clear_name() { + _impl_.name_.ClearToEmpty(); } -inline const std::string& GetCartRequest::user_id() const { - // @@protoc_insertion_point(field_get:oteldemo.GetCartRequest.user_id) - return _internal_user_id(); +inline const std::string& Product::name() const { + // @@protoc_insertion_point(field_get:oteldemo.Product.name) + return _internal_name(); } template -inline PROTOBUF_ALWAYS_INLINE void GetCartRequest::set_user_id(Arg_&& arg, +inline PROTOBUF_ALWAYS_INLINE void Product::set_name(Arg_&& arg, Args_... args) { PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); ; - _impl_.user_id_.Set(static_cast(arg), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:oteldemo.GetCartRequest.user_id) + _impl_.name_.Set(static_cast(arg), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:oteldemo.Product.name) } -inline std::string* GetCartRequest::mutable_user_id() { - std::string* _s = _internal_mutable_user_id(); - // @@protoc_insertion_point(field_mutable:oteldemo.GetCartRequest.user_id) +inline std::string* Product::mutable_name() { + std::string* _s = _internal_mutable_name(); + // @@protoc_insertion_point(field_mutable:oteldemo.Product.name) return _s; } -inline const std::string& GetCartRequest::_internal_user_id() const { +inline const std::string& Product::_internal_name() const { PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); - return _impl_.user_id_.Get(); + return _impl_.name_.Get(); } -inline void GetCartRequest::_internal_set_user_id(const std::string& value) { +inline void Product::_internal_set_name(const std::string& value) { PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); ; - _impl_.user_id_.Set(value, GetArenaForAllocation()); + _impl_.name_.Set(value, GetArenaForAllocation()); } -inline std::string* GetCartRequest::_internal_mutable_user_id() { +inline std::string* Product::_internal_mutable_name() { PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); ; - return _impl_.user_id_.Mutable( GetArenaForAllocation()); + return _impl_.name_.Mutable( GetArenaForAllocation()); } -inline std::string* GetCartRequest::release_user_id() { +inline std::string* Product::release_name() { PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); - // @@protoc_insertion_point(field_release:oteldemo.GetCartRequest.user_id) - return _impl_.user_id_.Release(); + // @@protoc_insertion_point(field_release:oteldemo.Product.name) + return _impl_.name_.Release(); } -inline void GetCartRequest::set_allocated_user_id(std::string* value) { +inline void Product::set_allocated_name(std::string* value) { PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); - _impl_.user_id_.SetAllocated(value, GetArenaForAllocation()); + _impl_.name_.SetAllocated(value, GetArenaForAllocation()); #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.user_id_.IsDefault()) { - _impl_.user_id_.Set("", GetArenaForAllocation()); + if (_impl_.name_.IsDefault()) { + _impl_.name_.Set("", GetArenaForAllocation()); } #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - // @@protoc_insertion_point(field_set_allocated:oteldemo.GetCartRequest.user_id) + // @@protoc_insertion_point(field_set_allocated:oteldemo.Product.name) } -// ------------------------------------------------------------------- - -// Cart - -// string user_id = 1; -inline void Cart::clear_user_id() { - _impl_.user_id_.ClearToEmpty(); +// string description = 3; +inline void Product::clear_description() { + _impl_.description_.ClearToEmpty(); } -inline const std::string& Cart::user_id() const { - // @@protoc_insertion_point(field_get:oteldemo.Cart.user_id) - return _internal_user_id(); +inline const std::string& Product::description() const { + // @@protoc_insertion_point(field_get:oteldemo.Product.description) + return _internal_description(); } template -inline PROTOBUF_ALWAYS_INLINE void Cart::set_user_id(Arg_&& arg, +inline PROTOBUF_ALWAYS_INLINE void Product::set_description(Arg_&& arg, Args_... args) { PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); ; - _impl_.user_id_.Set(static_cast(arg), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:oteldemo.Cart.user_id) + _impl_.description_.Set(static_cast(arg), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:oteldemo.Product.description) } -inline std::string* Cart::mutable_user_id() { - std::string* _s = _internal_mutable_user_id(); - // @@protoc_insertion_point(field_mutable:oteldemo.Cart.user_id) +inline std::string* Product::mutable_description() { + std::string* _s = _internal_mutable_description(); + // @@protoc_insertion_point(field_mutable:oteldemo.Product.description) return _s; } -inline const std::string& Cart::_internal_user_id() const { +inline const std::string& Product::_internal_description() const { PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); - return _impl_.user_id_.Get(); + return _impl_.description_.Get(); } -inline void Cart::_internal_set_user_id(const std::string& value) { +inline void Product::_internal_set_description(const std::string& value) { PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); ; - _impl_.user_id_.Set(value, GetArenaForAllocation()); + _impl_.description_.Set(value, GetArenaForAllocation()); } -inline std::string* Cart::_internal_mutable_user_id() { +inline std::string* Product::_internal_mutable_description() { PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); ; - return _impl_.user_id_.Mutable( GetArenaForAllocation()); -} -inline std::string* Cart::release_user_id() { - PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); - // @@protoc_insertion_point(field_release:oteldemo.Cart.user_id) - return _impl_.user_id_.Release(); -} -inline void Cart::set_allocated_user_id(std::string* value) { - PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); - _impl_.user_id_.SetAllocated(value, GetArenaForAllocation()); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.user_id_.IsDefault()) { - _impl_.user_id_.Set("", GetArenaForAllocation()); - } - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - // @@protoc_insertion_point(field_set_allocated:oteldemo.Cart.user_id) -} - -// repeated .oteldemo.CartItem items = 2; -inline int Cart::_internal_items_size() const { - return _internal_items().size(); -} -inline int Cart::items_size() const { - return _internal_items_size(); -} -inline void Cart::clear_items() { - _internal_mutable_items()->Clear(); -} -inline ::oteldemo::CartItem* Cart::mutable_items(int index) { - // @@protoc_insertion_point(field_mutable:oteldemo.Cart.items) - return _internal_mutable_items()->Mutable(index); -} -inline ::google::protobuf::RepeatedPtrField< ::oteldemo::CartItem >* -Cart::mutable_items() { - // @@protoc_insertion_point(field_mutable_list:oteldemo.Cart.items) - PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); - return _internal_mutable_items(); -} -inline const ::oteldemo::CartItem& Cart::items(int index) const { - // @@protoc_insertion_point(field_get:oteldemo.Cart.items) - return _internal_items().Get(index); + return _impl_.description_.Mutable( GetArenaForAllocation()); } -inline ::oteldemo::CartItem* Cart::add_items() { +inline std::string* Product::release_description() { PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); - ::oteldemo::CartItem* _add = _internal_mutable_items()->Add(); - // @@protoc_insertion_point(field_add:oteldemo.Cart.items) - return _add; -} -inline const ::google::protobuf::RepeatedPtrField< ::oteldemo::CartItem >& -Cart::items() const { - // @@protoc_insertion_point(field_list:oteldemo.Cart.items) - return _internal_items(); -} -inline const ::google::protobuf::RepeatedPtrField<::oteldemo::CartItem>& -Cart::_internal_items() const { - PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); - return _impl_.items_; -} -inline ::google::protobuf::RepeatedPtrField<::oteldemo::CartItem>* -Cart::_internal_mutable_items() { - PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); - return &_impl_.items_; + // @@protoc_insertion_point(field_release:oteldemo.Product.description) + return _impl_.description_.Release(); +} +inline void Product::set_allocated_description(std::string* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.description_.SetAllocated(value, GetArenaForAllocation()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.description_.IsDefault()) { + _impl_.description_.Set("", GetArenaForAllocation()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:oteldemo.Product.description) } -// ------------------------------------------------------------------- - -// Empty - -// ------------------------------------------------------------------- - -// ListRecommendationsRequest - -// string user_id = 1; -inline void ListRecommendationsRequest::clear_user_id() { - _impl_.user_id_.ClearToEmpty(); +// string picture = 4; +inline void Product::clear_picture() { + _impl_.picture_.ClearToEmpty(); } -inline const std::string& ListRecommendationsRequest::user_id() const { - // @@protoc_insertion_point(field_get:oteldemo.ListRecommendationsRequest.user_id) - return _internal_user_id(); +inline const std::string& Product::picture() const { + // @@protoc_insertion_point(field_get:oteldemo.Product.picture) + return _internal_picture(); } template -inline PROTOBUF_ALWAYS_INLINE void ListRecommendationsRequest::set_user_id(Arg_&& arg, +inline PROTOBUF_ALWAYS_INLINE void Product::set_picture(Arg_&& arg, Args_... args) { PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); ; - _impl_.user_id_.Set(static_cast(arg), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:oteldemo.ListRecommendationsRequest.user_id) + _impl_.picture_.Set(static_cast(arg), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:oteldemo.Product.picture) } -inline std::string* ListRecommendationsRequest::mutable_user_id() { - std::string* _s = _internal_mutable_user_id(); - // @@protoc_insertion_point(field_mutable:oteldemo.ListRecommendationsRequest.user_id) +inline std::string* Product::mutable_picture() { + std::string* _s = _internal_mutable_picture(); + // @@protoc_insertion_point(field_mutable:oteldemo.Product.picture) return _s; } -inline const std::string& ListRecommendationsRequest::_internal_user_id() const { +inline const std::string& Product::_internal_picture() const { PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); - return _impl_.user_id_.Get(); + return _impl_.picture_.Get(); } -inline void ListRecommendationsRequest::_internal_set_user_id(const std::string& value) { +inline void Product::_internal_set_picture(const std::string& value) { PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); ; - _impl_.user_id_.Set(value, GetArenaForAllocation()); + _impl_.picture_.Set(value, GetArenaForAllocation()); } -inline std::string* ListRecommendationsRequest::_internal_mutable_user_id() { +inline std::string* Product::_internal_mutable_picture() { PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); ; - return _impl_.user_id_.Mutable( GetArenaForAllocation()); + return _impl_.picture_.Mutable( GetArenaForAllocation()); } -inline std::string* ListRecommendationsRequest::release_user_id() { +inline std::string* Product::release_picture() { PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); - // @@protoc_insertion_point(field_release:oteldemo.ListRecommendationsRequest.user_id) - return _impl_.user_id_.Release(); + // @@protoc_insertion_point(field_release:oteldemo.Product.picture) + return _impl_.picture_.Release(); } -inline void ListRecommendationsRequest::set_allocated_user_id(std::string* value) { +inline void Product::set_allocated_picture(std::string* value) { PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); - _impl_.user_id_.SetAllocated(value, GetArenaForAllocation()); + _impl_.picture_.SetAllocated(value, GetArenaForAllocation()); #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.user_id_.IsDefault()) { - _impl_.user_id_.Set("", GetArenaForAllocation()); + if (_impl_.picture_.IsDefault()) { + _impl_.picture_.Set("", GetArenaForAllocation()); } #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - // @@protoc_insertion_point(field_set_allocated:oteldemo.ListRecommendationsRequest.user_id) + // @@protoc_insertion_point(field_set_allocated:oteldemo.Product.picture) } -// repeated string product_ids = 2; -inline int ListRecommendationsRequest::_internal_product_ids_size() const { - return _internal_product_ids().size(); +// .oteldemo.Money price_usd = 5; +inline bool Product::has_price_usd() const { + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + PROTOBUF_ASSUME(!value || _impl_.price_usd_ != nullptr); + return value; } -inline int ListRecommendationsRequest::product_ids_size() const { - return _internal_product_ids_size(); +inline void Product::clear_price_usd() { + if (_impl_.price_usd_ != nullptr) _impl_.price_usd_->Clear(); + _impl_._has_bits_[0] &= ~0x00000001u; } -inline void ListRecommendationsRequest::clear_product_ids() { - _internal_mutable_product_ids()->Clear(); +inline const ::oteldemo::Money& Product::_internal_price_usd() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + const ::oteldemo::Money* p = _impl_.price_usd_; + return p != nullptr ? *p : reinterpret_cast(::oteldemo::_Money_default_instance_); } -inline std::string* ListRecommendationsRequest::add_product_ids() { +inline const ::oteldemo::Money& Product::price_usd() const { + // @@protoc_insertion_point(field_get:oteldemo.Product.price_usd) + return _internal_price_usd(); +} +inline void Product::unsafe_arena_set_allocated_price_usd(::oteldemo::Money* value) { PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); - std::string* _s = _internal_mutable_product_ids()->Add(); - // @@protoc_insertion_point(field_add_mutable:oteldemo.ListRecommendationsRequest.product_ids) + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.price_usd_); + } + _impl_.price_usd_ = reinterpret_cast<::oteldemo::Money*>(value); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000001u; + } else { + _impl_._has_bits_[0] &= ~0x00000001u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:oteldemo.Product.price_usd) +} +inline ::oteldemo::Money* Product::release_price_usd() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + + _impl_._has_bits_[0] &= ~0x00000001u; + ::oteldemo::Money* released = _impl_.price_usd_; + _impl_.price_usd_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArenaForAllocation() == nullptr) { + delete old; + } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return released; +} +inline ::oteldemo::Money* Product::unsafe_arena_release_price_usd() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + // @@protoc_insertion_point(field_release:oteldemo.Product.price_usd) + + _impl_._has_bits_[0] &= ~0x00000001u; + ::oteldemo::Money* temp = _impl_.price_usd_; + _impl_.price_usd_ = nullptr; + return temp; +} +inline ::oteldemo::Money* Product::_internal_mutable_price_usd() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_._has_bits_[0] |= 0x00000001u; + if (_impl_.price_usd_ == nullptr) { + auto* p = CreateMaybeMessage<::oteldemo::Money>(GetArenaForAllocation()); + _impl_.price_usd_ = reinterpret_cast<::oteldemo::Money*>(p); + } + return _impl_.price_usd_; +} +inline ::oteldemo::Money* Product::mutable_price_usd() { + ::oteldemo::Money* _msg = _internal_mutable_price_usd(); + // @@protoc_insertion_point(field_mutable:oteldemo.Product.price_usd) + return _msg; +} +inline void Product::set_allocated_price_usd(::oteldemo::Money* value) { + ::google::protobuf::Arena* message_arena = GetArenaForAllocation(); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + if (message_arena == nullptr) { + delete reinterpret_cast<::oteldemo::Money*>(_impl_.price_usd_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = + ::google::protobuf::Arena::InternalGetOwningArena(reinterpret_cast<::oteldemo::Money*>(value)); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + _impl_._has_bits_[0] |= 0x00000001u; + } else { + _impl_._has_bits_[0] &= ~0x00000001u; + } + + _impl_.price_usd_ = reinterpret_cast<::oteldemo::Money*>(value); + // @@protoc_insertion_point(field_set_allocated:oteldemo.Product.price_usd) +} + +// repeated string categories = 6; +inline int Product::_internal_categories_size() const { + return _internal_categories().size(); +} +inline int Product::categories_size() const { + return _internal_categories_size(); +} +inline void Product::clear_categories() { + _internal_mutable_categories()->Clear(); +} +inline std::string* Product::add_categories() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + std::string* _s = _internal_mutable_categories()->Add(); + // @@protoc_insertion_point(field_add_mutable:oteldemo.Product.categories) return _s; } -inline const std::string& ListRecommendationsRequest::product_ids(int index) const { - // @@protoc_insertion_point(field_get:oteldemo.ListRecommendationsRequest.product_ids) - return _internal_product_ids().Get(index); +inline const std::string& Product::categories(int index) const { + // @@protoc_insertion_point(field_get:oteldemo.Product.categories) + return _internal_categories().Get(index); } -inline std::string* ListRecommendationsRequest::mutable_product_ids(int index) { - // @@protoc_insertion_point(field_mutable:oteldemo.ListRecommendationsRequest.product_ids) - return _internal_mutable_product_ids()->Mutable(index); +inline std::string* Product::mutable_categories(int index) { + // @@protoc_insertion_point(field_mutable:oteldemo.Product.categories) + return _internal_mutable_categories()->Mutable(index); } -inline void ListRecommendationsRequest::set_product_ids(int index, const std::string& value) { - _internal_mutable_product_ids()->Mutable(index)->assign(value); - // @@protoc_insertion_point(field_set:oteldemo.ListRecommendationsRequest.product_ids) +inline void Product::set_categories(int index, const std::string& value) { + _internal_mutable_categories()->Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set:oteldemo.Product.categories) } -inline void ListRecommendationsRequest::set_product_ids(int index, std::string&& value) { - _internal_mutable_product_ids()->Mutable(index)->assign(std::move(value)); - // @@protoc_insertion_point(field_set:oteldemo.ListRecommendationsRequest.product_ids) +inline void Product::set_categories(int index, std::string&& value) { + _internal_mutable_categories()->Mutable(index)->assign(std::move(value)); + // @@protoc_insertion_point(field_set:oteldemo.Product.categories) } -inline void ListRecommendationsRequest::set_product_ids(int index, const char* value) { +inline void Product::set_categories(int index, const char* value) { ABSL_DCHECK(value != nullptr); - _internal_mutable_product_ids()->Mutable(index)->assign(value); - // @@protoc_insertion_point(field_set_char:oteldemo.ListRecommendationsRequest.product_ids) + _internal_mutable_categories()->Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:oteldemo.Product.categories) } -inline void ListRecommendationsRequest::set_product_ids(int index, const char* value, +inline void Product::set_categories(int index, const char* value, std::size_t size) { - _internal_mutable_product_ids()->Mutable(index)->assign( + _internal_mutable_categories()->Mutable(index)->assign( reinterpret_cast(value), size); - // @@protoc_insertion_point(field_set_pointer:oteldemo.ListRecommendationsRequest.product_ids) + // @@protoc_insertion_point(field_set_pointer:oteldemo.Product.categories) } -inline void ListRecommendationsRequest::set_product_ids(int index, absl::string_view value) { - _internal_mutable_product_ids()->Mutable(index)->assign(value.data(), +inline void Product::set_categories(int index, absl::string_view value) { + _internal_mutable_categories()->Mutable(index)->assign(value.data(), value.size()); - // @@protoc_insertion_point(field_set_string_piece:oteldemo.ListRecommendationsRequest.product_ids) + // @@protoc_insertion_point(field_set_string_piece:oteldemo.Product.categories) } -inline void ListRecommendationsRequest::add_product_ids(const std::string& value) { +inline void Product::add_categories(const std::string& value) { PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); - _internal_mutable_product_ids()->Add()->assign(value); - // @@protoc_insertion_point(field_add:oteldemo.ListRecommendationsRequest.product_ids) + _internal_mutable_categories()->Add()->assign(value); + // @@protoc_insertion_point(field_add:oteldemo.Product.categories) } -inline void ListRecommendationsRequest::add_product_ids(std::string&& value) { +inline void Product::add_categories(std::string&& value) { PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); - _internal_mutable_product_ids()->Add(std::move(value)); - // @@protoc_insertion_point(field_add:oteldemo.ListRecommendationsRequest.product_ids) + _internal_mutable_categories()->Add(std::move(value)); + // @@protoc_insertion_point(field_add:oteldemo.Product.categories) } -inline void ListRecommendationsRequest::add_product_ids(const char* value) { +inline void Product::add_categories(const char* value) { ABSL_DCHECK(value != nullptr); PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); - _internal_mutable_product_ids()->Add()->assign(value); - // @@protoc_insertion_point(field_add_char:oteldemo.ListRecommendationsRequest.product_ids) + _internal_mutable_categories()->Add()->assign(value); + // @@protoc_insertion_point(field_add_char:oteldemo.Product.categories) } -inline void ListRecommendationsRequest::add_product_ids(const char* value, std::size_t size) { +inline void Product::add_categories(const char* value, std::size_t size) { PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); - _internal_mutable_product_ids()->Add()->assign( + _internal_mutable_categories()->Add()->assign( reinterpret_cast(value), size); - // @@protoc_insertion_point(field_add_pointer:oteldemo.ListRecommendationsRequest.product_ids) + // @@protoc_insertion_point(field_add_pointer:oteldemo.Product.categories) } -inline void ListRecommendationsRequest::add_product_ids(absl::string_view value) { +inline void Product::add_categories(absl::string_view value) { PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); - _internal_mutable_product_ids()->Add()->assign(value.data(), value.size()); - // @@protoc_insertion_point(field_add_string_piece:oteldemo.ListRecommendationsRequest.product_ids) + _internal_mutable_categories()->Add()->assign(value.data(), value.size()); + // @@protoc_insertion_point(field_add_string_piece:oteldemo.Product.categories) } inline const ::google::protobuf::RepeatedPtrField& -ListRecommendationsRequest::product_ids() const { - // @@protoc_insertion_point(field_list:oteldemo.ListRecommendationsRequest.product_ids) - return _internal_product_ids(); +Product::categories() const { + // @@protoc_insertion_point(field_list:oteldemo.Product.categories) + return _internal_categories(); } -inline ::google::protobuf::RepeatedPtrField* ListRecommendationsRequest::mutable_product_ids() { - // @@protoc_insertion_point(field_mutable_list:oteldemo.ListRecommendationsRequest.product_ids) +inline ::google::protobuf::RepeatedPtrField* Product::mutable_categories() { + // @@protoc_insertion_point(field_mutable_list:oteldemo.Product.categories) PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); - return _internal_mutable_product_ids(); + return _internal_mutable_categories(); } inline const ::google::protobuf::RepeatedPtrField& -ListRecommendationsRequest::_internal_product_ids() const { +Product::_internal_categories() const { PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); - return _impl_.product_ids_; + return _impl_.categories_; } inline ::google::protobuf::RepeatedPtrField* -ListRecommendationsRequest::_internal_mutable_product_ids() { +Product::_internal_mutable_categories() { PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); - return &_impl_.product_ids_; + return &_impl_.categories_; } // ------------------------------------------------------------------- -// ListRecommendationsResponse +// ListProductsResponse -// repeated string product_ids = 1; -inline int ListRecommendationsResponse::_internal_product_ids_size() const { - return _internal_product_ids().size(); +// repeated .oteldemo.Product products = 1; +inline int ListProductsResponse::_internal_products_size() const { + return _internal_products().size(); } -inline int ListRecommendationsResponse::product_ids_size() const { - return _internal_product_ids_size(); +inline int ListProductsResponse::products_size() const { + return _internal_products_size(); } -inline void ListRecommendationsResponse::clear_product_ids() { - _internal_mutable_product_ids()->Clear(); +inline void ListProductsResponse::clear_products() { + _internal_mutable_products()->Clear(); } -inline std::string* ListRecommendationsResponse::add_product_ids() { +inline ::oteldemo::Product* ListProductsResponse::mutable_products(int index) { + // @@protoc_insertion_point(field_mutable:oteldemo.ListProductsResponse.products) + return _internal_mutable_products()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField< ::oteldemo::Product >* +ListProductsResponse::mutable_products() { + // @@protoc_insertion_point(field_mutable_list:oteldemo.ListProductsResponse.products) PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); - std::string* _s = _internal_mutable_product_ids()->Add(); - // @@protoc_insertion_point(field_add_mutable:oteldemo.ListRecommendationsResponse.product_ids) - return _s; + return _internal_mutable_products(); } -inline const std::string& ListRecommendationsResponse::product_ids(int index) const { - // @@protoc_insertion_point(field_get:oteldemo.ListRecommendationsResponse.product_ids) - return _internal_product_ids().Get(index); +inline const ::oteldemo::Product& ListProductsResponse::products(int index) const { + // @@protoc_insertion_point(field_get:oteldemo.ListProductsResponse.products) + return _internal_products().Get(index); } -inline std::string* ListRecommendationsResponse::mutable_product_ids(int index) { - // @@protoc_insertion_point(field_mutable:oteldemo.ListRecommendationsResponse.product_ids) - return _internal_mutable_product_ids()->Mutable(index); +inline ::oteldemo::Product* ListProductsResponse::add_products() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ::oteldemo::Product* _add = _internal_mutable_products()->Add(); + // @@protoc_insertion_point(field_add:oteldemo.ListProductsResponse.products) + return _add; } -inline void ListRecommendationsResponse::set_product_ids(int index, const std::string& value) { - _internal_mutable_product_ids()->Mutable(index)->assign(value); - // @@protoc_insertion_point(field_set:oteldemo.ListRecommendationsResponse.product_ids) +inline const ::google::protobuf::RepeatedPtrField< ::oteldemo::Product >& +ListProductsResponse::products() const { + // @@protoc_insertion_point(field_list:oteldemo.ListProductsResponse.products) + return _internal_products(); } -inline void ListRecommendationsResponse::set_product_ids(int index, std::string&& value) { - _internal_mutable_product_ids()->Mutable(index)->assign(std::move(value)); - // @@protoc_insertion_point(field_set:oteldemo.ListRecommendationsResponse.product_ids) +inline const ::google::protobuf::RepeatedPtrField<::oteldemo::Product>& +ListProductsResponse::_internal_products() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.products_; } -inline void ListRecommendationsResponse::set_product_ids(int index, const char* value) { - ABSL_DCHECK(value != nullptr); - _internal_mutable_product_ids()->Mutable(index)->assign(value); - // @@protoc_insertion_point(field_set_char:oteldemo.ListRecommendationsResponse.product_ids) +inline ::google::protobuf::RepeatedPtrField<::oteldemo::Product>* +ListProductsResponse::_internal_mutable_products() { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return &_impl_.products_; } -inline void ListRecommendationsResponse::set_product_ids(int index, const char* value, - std::size_t size) { - _internal_mutable_product_ids()->Mutable(index)->assign( - reinterpret_cast(value), size); - // @@protoc_insertion_point(field_set_pointer:oteldemo.ListRecommendationsResponse.product_ids) + +// ------------------------------------------------------------------- + +// GetProductRequest + +// string id = 1; +inline void GetProductRequest::clear_id() { + _impl_.id_.ClearToEmpty(); } -inline void ListRecommendationsResponse::set_product_ids(int index, absl::string_view value) { - _internal_mutable_product_ids()->Mutable(index)->assign(value.data(), - value.size()); - // @@protoc_insertion_point(field_set_string_piece:oteldemo.ListRecommendationsResponse.product_ids) +inline const std::string& GetProductRequest::id() const { + // @@protoc_insertion_point(field_get:oteldemo.GetProductRequest.id) + return _internal_id(); } -inline void ListRecommendationsResponse::add_product_ids(const std::string& value) { +template +inline PROTOBUF_ALWAYS_INLINE void GetProductRequest::set_id(Arg_&& arg, + Args_... args) { PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); - _internal_mutable_product_ids()->Add()->assign(value); - // @@protoc_insertion_point(field_add:oteldemo.ListRecommendationsResponse.product_ids) + ; + _impl_.id_.Set(static_cast(arg), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:oteldemo.GetProductRequest.id) } -inline void ListRecommendationsResponse::add_product_ids(std::string&& value) { - PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); - _internal_mutable_product_ids()->Add(std::move(value)); - // @@protoc_insertion_point(field_add:oteldemo.ListRecommendationsResponse.product_ids) +inline std::string* GetProductRequest::mutable_id() { + std::string* _s = _internal_mutable_id(); + // @@protoc_insertion_point(field_mutable:oteldemo.GetProductRequest.id) + return _s; } -inline void ListRecommendationsResponse::add_product_ids(const char* value) { - ABSL_DCHECK(value != nullptr); - PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); - _internal_mutable_product_ids()->Add()->assign(value); - // @@protoc_insertion_point(field_add_char:oteldemo.ListRecommendationsResponse.product_ids) +inline const std::string& GetProductRequest::_internal_id() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.id_.Get(); } -inline void ListRecommendationsResponse::add_product_ids(const char* value, std::size_t size) { +inline void GetProductRequest::_internal_set_id(const std::string& value) { PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); - _internal_mutable_product_ids()->Add()->assign( - reinterpret_cast(value), size); - // @@protoc_insertion_point(field_add_pointer:oteldemo.ListRecommendationsResponse.product_ids) + ; + _impl_.id_.Set(value, GetArenaForAllocation()); } -inline void ListRecommendationsResponse::add_product_ids(absl::string_view value) { +inline std::string* GetProductRequest::_internal_mutable_id() { PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); - _internal_mutable_product_ids()->Add()->assign(value.data(), value.size()); - // @@protoc_insertion_point(field_add_string_piece:oteldemo.ListRecommendationsResponse.product_ids) -} -inline const ::google::protobuf::RepeatedPtrField& -ListRecommendationsResponse::product_ids() const { - // @@protoc_insertion_point(field_list:oteldemo.ListRecommendationsResponse.product_ids) - return _internal_product_ids(); + ; + return _impl_.id_.Mutable( GetArenaForAllocation()); } -inline ::google::protobuf::RepeatedPtrField* ListRecommendationsResponse::mutable_product_ids() { - // @@protoc_insertion_point(field_mutable_list:oteldemo.ListRecommendationsResponse.product_ids) +inline std::string* GetProductRequest::release_id() { PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); - return _internal_mutable_product_ids(); -} -inline const ::google::protobuf::RepeatedPtrField& -ListRecommendationsResponse::_internal_product_ids() const { - PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); - return _impl_.product_ids_; + // @@protoc_insertion_point(field_release:oteldemo.GetProductRequest.id) + return _impl_.id_.Release(); } -inline ::google::protobuf::RepeatedPtrField* -ListRecommendationsResponse::_internal_mutable_product_ids() { - PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); - return &_impl_.product_ids_; +inline void GetProductRequest::set_allocated_id(std::string* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.id_.SetAllocated(value, GetArenaForAllocation()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.id_.IsDefault()) { + _impl_.id_.Set("", GetArenaForAllocation()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:oteldemo.GetProductRequest.id) } // ------------------------------------------------------------------- -// Product +// SearchProductsRequest -// string id = 1; -inline void Product::clear_id() { - _impl_.id_.ClearToEmpty(); +// string query = 1; +inline void SearchProductsRequest::clear_query() { + _impl_.query_.ClearToEmpty(); } -inline const std::string& Product::id() const { - // @@protoc_insertion_point(field_get:oteldemo.Product.id) - return _internal_id(); +inline const std::string& SearchProductsRequest::query() const { + // @@protoc_insertion_point(field_get:oteldemo.SearchProductsRequest.query) + return _internal_query(); } template -inline PROTOBUF_ALWAYS_INLINE void Product::set_id(Arg_&& arg, +inline PROTOBUF_ALWAYS_INLINE void SearchProductsRequest::set_query(Arg_&& arg, Args_... args) { PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); ; - _impl_.id_.Set(static_cast(arg), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:oteldemo.Product.id) + _impl_.query_.Set(static_cast(arg), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:oteldemo.SearchProductsRequest.query) } -inline std::string* Product::mutable_id() { - std::string* _s = _internal_mutable_id(); - // @@protoc_insertion_point(field_mutable:oteldemo.Product.id) +inline std::string* SearchProductsRequest::mutable_query() { + std::string* _s = _internal_mutable_query(); + // @@protoc_insertion_point(field_mutable:oteldemo.SearchProductsRequest.query) return _s; } -inline const std::string& Product::_internal_id() const { +inline const std::string& SearchProductsRequest::_internal_query() const { PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); - return _impl_.id_.Get(); + return _impl_.query_.Get(); +} +inline void SearchProductsRequest::_internal_set_query(const std::string& value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.query_.Set(value, GetArenaForAllocation()); +} +inline std::string* SearchProductsRequest::_internal_mutable_query() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + return _impl_.query_.Mutable( GetArenaForAllocation()); +} +inline std::string* SearchProductsRequest::release_query() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + // @@protoc_insertion_point(field_release:oteldemo.SearchProductsRequest.query) + return _impl_.query_.Release(); +} +inline void SearchProductsRequest::set_allocated_query(std::string* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.query_.SetAllocated(value, GetArenaForAllocation()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.query_.IsDefault()) { + _impl_.query_.Set("", GetArenaForAllocation()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:oteldemo.SearchProductsRequest.query) +} + +// ------------------------------------------------------------------- + +// SearchProductsResponse + +// repeated .oteldemo.Product results = 1; +inline int SearchProductsResponse::_internal_results_size() const { + return _internal_results().size(); +} +inline int SearchProductsResponse::results_size() const { + return _internal_results_size(); +} +inline void SearchProductsResponse::clear_results() { + _internal_mutable_results()->Clear(); +} +inline ::oteldemo::Product* SearchProductsResponse::mutable_results(int index) { + // @@protoc_insertion_point(field_mutable:oteldemo.SearchProductsResponse.results) + return _internal_mutable_results()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField< ::oteldemo::Product >* +SearchProductsResponse::mutable_results() { + // @@protoc_insertion_point(field_mutable_list:oteldemo.SearchProductsResponse.results) + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + return _internal_mutable_results(); +} +inline const ::oteldemo::Product& SearchProductsResponse::results(int index) const { + // @@protoc_insertion_point(field_get:oteldemo.SearchProductsResponse.results) + return _internal_results().Get(index); } -inline void Product::_internal_set_id(const std::string& value) { +inline ::oteldemo::Product* SearchProductsResponse::add_results() { PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); - ; - _impl_.id_.Set(value, GetArenaForAllocation()); + ::oteldemo::Product* _add = _internal_mutable_results()->Add(); + // @@protoc_insertion_point(field_add:oteldemo.SearchProductsResponse.results) + return _add; } -inline std::string* Product::_internal_mutable_id() { - PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); - ; - return _impl_.id_.Mutable( GetArenaForAllocation()); +inline const ::google::protobuf::RepeatedPtrField< ::oteldemo::Product >& +SearchProductsResponse::results() const { + // @@protoc_insertion_point(field_list:oteldemo.SearchProductsResponse.results) + return _internal_results(); } -inline std::string* Product::release_id() { - PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); - // @@protoc_insertion_point(field_release:oteldemo.Product.id) - return _impl_.id_.Release(); +inline const ::google::protobuf::RepeatedPtrField<::oteldemo::Product>& +SearchProductsResponse::_internal_results() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.results_; } -inline void Product::set_allocated_id(std::string* value) { - PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); - _impl_.id_.SetAllocated(value, GetArenaForAllocation()); - #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.id_.IsDefault()) { - _impl_.id_.Set("", GetArenaForAllocation()); - } - #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - // @@protoc_insertion_point(field_set_allocated:oteldemo.Product.id) +inline ::google::protobuf::RepeatedPtrField<::oteldemo::Product>* +SearchProductsResponse::_internal_mutable_results() { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return &_impl_.results_; } -// string name = 2; -inline void Product::clear_name() { - _impl_.name_.ClearToEmpty(); +// ------------------------------------------------------------------- + +// ProductReview + +// string username = 1; +inline void ProductReview::clear_username() { + _impl_.username_.ClearToEmpty(); } -inline const std::string& Product::name() const { - // @@protoc_insertion_point(field_get:oteldemo.Product.name) - return _internal_name(); +inline const std::string& ProductReview::username() const { + // @@protoc_insertion_point(field_get:oteldemo.ProductReview.username) + return _internal_username(); } template -inline PROTOBUF_ALWAYS_INLINE void Product::set_name(Arg_&& arg, +inline PROTOBUF_ALWAYS_INLINE void ProductReview::set_username(Arg_&& arg, Args_... args) { PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); ; - _impl_.name_.Set(static_cast(arg), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:oteldemo.Product.name) + _impl_.username_.Set(static_cast(arg), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:oteldemo.ProductReview.username) } -inline std::string* Product::mutable_name() { - std::string* _s = _internal_mutable_name(); - // @@protoc_insertion_point(field_mutable:oteldemo.Product.name) +inline std::string* ProductReview::mutable_username() { + std::string* _s = _internal_mutable_username(); + // @@protoc_insertion_point(field_mutable:oteldemo.ProductReview.username) return _s; } -inline const std::string& Product::_internal_name() const { +inline const std::string& ProductReview::_internal_username() const { PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); - return _impl_.name_.Get(); + return _impl_.username_.Get(); } -inline void Product::_internal_set_name(const std::string& value) { +inline void ProductReview::_internal_set_username(const std::string& value) { PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); ; - _impl_.name_.Set(value, GetArenaForAllocation()); + _impl_.username_.Set(value, GetArenaForAllocation()); } -inline std::string* Product::_internal_mutable_name() { +inline std::string* ProductReview::_internal_mutable_username() { PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); ; - return _impl_.name_.Mutable( GetArenaForAllocation()); + return _impl_.username_.Mutable( GetArenaForAllocation()); } -inline std::string* Product::release_name() { +inline std::string* ProductReview::release_username() { PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); - // @@protoc_insertion_point(field_release:oteldemo.Product.name) - return _impl_.name_.Release(); + // @@protoc_insertion_point(field_release:oteldemo.ProductReview.username) + return _impl_.username_.Release(); } -inline void Product::set_allocated_name(std::string* value) { +inline void ProductReview::set_allocated_username(std::string* value) { PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); - _impl_.name_.SetAllocated(value, GetArenaForAllocation()); + _impl_.username_.SetAllocated(value, GetArenaForAllocation()); #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.name_.IsDefault()) { - _impl_.name_.Set("", GetArenaForAllocation()); + if (_impl_.username_.IsDefault()) { + _impl_.username_.Set("", GetArenaForAllocation()); } #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - // @@protoc_insertion_point(field_set_allocated:oteldemo.Product.name) + // @@protoc_insertion_point(field_set_allocated:oteldemo.ProductReview.username) } -// string description = 3; -inline void Product::clear_description() { +// string description = 2; +inline void ProductReview::clear_description() { _impl_.description_.ClearToEmpty(); } -inline const std::string& Product::description() const { - // @@protoc_insertion_point(field_get:oteldemo.Product.description) +inline const std::string& ProductReview::description() const { + // @@protoc_insertion_point(field_get:oteldemo.ProductReview.description) return _internal_description(); } template -inline PROTOBUF_ALWAYS_INLINE void Product::set_description(Arg_&& arg, +inline PROTOBUF_ALWAYS_INLINE void ProductReview::set_description(Arg_&& arg, Args_... args) { PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); ; _impl_.description_.Set(static_cast(arg), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:oteldemo.Product.description) + // @@protoc_insertion_point(field_set:oteldemo.ProductReview.description) } -inline std::string* Product::mutable_description() { +inline std::string* ProductReview::mutable_description() { std::string* _s = _internal_mutable_description(); - // @@protoc_insertion_point(field_mutable:oteldemo.Product.description) + // @@protoc_insertion_point(field_mutable:oteldemo.ProductReview.description) return _s; } -inline const std::string& Product::_internal_description() const { +inline const std::string& ProductReview::_internal_description() const { PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.description_.Get(); } -inline void Product::_internal_set_description(const std::string& value) { +inline void ProductReview::_internal_set_description(const std::string& value) { PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); ; _impl_.description_.Set(value, GetArenaForAllocation()); } -inline std::string* Product::_internal_mutable_description() { +inline std::string* ProductReview::_internal_mutable_description() { PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); ; return _impl_.description_.Mutable( GetArenaForAllocation()); } -inline std::string* Product::release_description() { +inline std::string* ProductReview::release_description() { PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); - // @@protoc_insertion_point(field_release:oteldemo.Product.description) + // @@protoc_insertion_point(field_release:oteldemo.ProductReview.description) return _impl_.description_.Release(); } -inline void Product::set_allocated_description(std::string* value) { +inline void ProductReview::set_allocated_description(std::string* value) { PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.description_.SetAllocated(value, GetArenaForAllocation()); #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING @@ -8655,460 +10439,434 @@ inline void Product::set_allocated_description(std::string* value) { _impl_.description_.Set("", GetArenaForAllocation()); } #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - // @@protoc_insertion_point(field_set_allocated:oteldemo.Product.description) + // @@protoc_insertion_point(field_set_allocated:oteldemo.ProductReview.description) } -// string picture = 4; -inline void Product::clear_picture() { - _impl_.picture_.ClearToEmpty(); +// string score = 3; +inline void ProductReview::clear_score() { + _impl_.score_.ClearToEmpty(); } -inline const std::string& Product::picture() const { - // @@protoc_insertion_point(field_get:oteldemo.Product.picture) - return _internal_picture(); +inline const std::string& ProductReview::score() const { + // @@protoc_insertion_point(field_get:oteldemo.ProductReview.score) + return _internal_score(); } template -inline PROTOBUF_ALWAYS_INLINE void Product::set_picture(Arg_&& arg, +inline PROTOBUF_ALWAYS_INLINE void ProductReview::set_score(Arg_&& arg, Args_... args) { PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); ; - _impl_.picture_.Set(static_cast(arg), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:oteldemo.Product.picture) + _impl_.score_.Set(static_cast(arg), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:oteldemo.ProductReview.score) } -inline std::string* Product::mutable_picture() { - std::string* _s = _internal_mutable_picture(); - // @@protoc_insertion_point(field_mutable:oteldemo.Product.picture) +inline std::string* ProductReview::mutable_score() { + std::string* _s = _internal_mutable_score(); + // @@protoc_insertion_point(field_mutable:oteldemo.ProductReview.score) return _s; } -inline const std::string& Product::_internal_picture() const { +inline const std::string& ProductReview::_internal_score() const { PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); - return _impl_.picture_.Get(); + return _impl_.score_.Get(); } -inline void Product::_internal_set_picture(const std::string& value) { +inline void ProductReview::_internal_set_score(const std::string& value) { PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); ; - _impl_.picture_.Set(value, GetArenaForAllocation()); + _impl_.score_.Set(value, GetArenaForAllocation()); } -inline std::string* Product::_internal_mutable_picture() { +inline std::string* ProductReview::_internal_mutable_score() { PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); ; - return _impl_.picture_.Mutable( GetArenaForAllocation()); + return _impl_.score_.Mutable( GetArenaForAllocation()); } -inline std::string* Product::release_picture() { +inline std::string* ProductReview::release_score() { PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); - // @@protoc_insertion_point(field_release:oteldemo.Product.picture) - return _impl_.picture_.Release(); + // @@protoc_insertion_point(field_release:oteldemo.ProductReview.score) + return _impl_.score_.Release(); } -inline void Product::set_allocated_picture(std::string* value) { +inline void ProductReview::set_allocated_score(std::string* value) { PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); - _impl_.picture_.SetAllocated(value, GetArenaForAllocation()); + _impl_.score_.SetAllocated(value, GetArenaForAllocation()); #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.picture_.IsDefault()) { - _impl_.picture_.Set("", GetArenaForAllocation()); + if (_impl_.score_.IsDefault()) { + _impl_.score_.Set("", GetArenaForAllocation()); } #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - // @@protoc_insertion_point(field_set_allocated:oteldemo.Product.picture) -} - -// .oteldemo.Money price_usd = 5; -inline bool Product::has_price_usd() const { - bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; - PROTOBUF_ASSUME(!value || _impl_.price_usd_ != nullptr); - return value; -} -inline void Product::clear_price_usd() { - if (_impl_.price_usd_ != nullptr) _impl_.price_usd_->Clear(); - _impl_._has_bits_[0] &= ~0x00000001u; -} -inline const ::oteldemo::Money& Product::_internal_price_usd() const { - PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); - const ::oteldemo::Money* p = _impl_.price_usd_; - return p != nullptr ? *p : reinterpret_cast(::oteldemo::_Money_default_instance_); -} -inline const ::oteldemo::Money& Product::price_usd() const { - // @@protoc_insertion_point(field_get:oteldemo.Product.price_usd) - return _internal_price_usd(); -} -inline void Product::unsafe_arena_set_allocated_price_usd(::oteldemo::Money* value) { - PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); - if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.price_usd_); - } - _impl_.price_usd_ = reinterpret_cast<::oteldemo::Money*>(value); - if (value != nullptr) { - _impl_._has_bits_[0] |= 0x00000001u; - } else { - _impl_._has_bits_[0] &= ~0x00000001u; - } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:oteldemo.Product.price_usd) -} -inline ::oteldemo::Money* Product::release_price_usd() { - PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); - - _impl_._has_bits_[0] &= ~0x00000001u; - ::oteldemo::Money* released = _impl_.price_usd_; - _impl_.price_usd_ = nullptr; -#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE - auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); - released = ::google::protobuf::internal::DuplicateIfNonNull(released); - if (GetArenaForAllocation() == nullptr) { - delete old; - } -#else // PROTOBUF_FORCE_COPY_IN_RELEASE - if (GetArenaForAllocation() != nullptr) { - released = ::google::protobuf::internal::DuplicateIfNonNull(released); - } -#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE - return released; -} -inline ::oteldemo::Money* Product::unsafe_arena_release_price_usd() { - PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); - // @@protoc_insertion_point(field_release:oteldemo.Product.price_usd) - - _impl_._has_bits_[0] &= ~0x00000001u; - ::oteldemo::Money* temp = _impl_.price_usd_; - _impl_.price_usd_ = nullptr; - return temp; -} -inline ::oteldemo::Money* Product::_internal_mutable_price_usd() { - PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); - _impl_._has_bits_[0] |= 0x00000001u; - if (_impl_.price_usd_ == nullptr) { - auto* p = CreateMaybeMessage<::oteldemo::Money>(GetArenaForAllocation()); - _impl_.price_usd_ = reinterpret_cast<::oteldemo::Money*>(p); - } - return _impl_.price_usd_; -} -inline ::oteldemo::Money* Product::mutable_price_usd() { - ::oteldemo::Money* _msg = _internal_mutable_price_usd(); - // @@protoc_insertion_point(field_mutable:oteldemo.Product.price_usd) - return _msg; + // @@protoc_insertion_point(field_set_allocated:oteldemo.ProductReview.score) } -inline void Product::set_allocated_price_usd(::oteldemo::Money* value) { - ::google::protobuf::Arena* message_arena = GetArenaForAllocation(); - PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); - if (message_arena == nullptr) { - delete reinterpret_cast<::oteldemo::Money*>(_impl_.price_usd_); - } - if (value != nullptr) { - ::google::protobuf::Arena* submessage_arena = - ::google::protobuf::Arena::InternalGetOwningArena(reinterpret_cast<::oteldemo::Money*>(value)); - if (message_arena != submessage_arena) { - value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); - } - _impl_._has_bits_[0] |= 0x00000001u; - } else { - _impl_._has_bits_[0] &= ~0x00000001u; - } +// ------------------------------------------------------------------- - _impl_.price_usd_ = reinterpret_cast<::oteldemo::Money*>(value); - // @@protoc_insertion_point(field_set_allocated:oteldemo.Product.price_usd) -} +// GetProductReviewsRequest -// repeated string categories = 6; -inline int Product::_internal_categories_size() const { - return _internal_categories().size(); -} -inline int Product::categories_size() const { - return _internal_categories_size(); +// string product_id = 1; +inline void GetProductReviewsRequest::clear_product_id() { + _impl_.product_id_.ClearToEmpty(); } -inline void Product::clear_categories() { - _internal_mutable_categories()->Clear(); +inline const std::string& GetProductReviewsRequest::product_id() const { + // @@protoc_insertion_point(field_get:oteldemo.GetProductReviewsRequest.product_id) + return _internal_product_id(); } -inline std::string* Product::add_categories() { +template +inline PROTOBUF_ALWAYS_INLINE void GetProductReviewsRequest::set_product_id(Arg_&& arg, + Args_... args) { PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); - std::string* _s = _internal_mutable_categories()->Add(); - // @@protoc_insertion_point(field_add_mutable:oteldemo.Product.categories) - return _s; -} -inline const std::string& Product::categories(int index) const { - // @@protoc_insertion_point(field_get:oteldemo.Product.categories) - return _internal_categories().Get(index); -} -inline std::string* Product::mutable_categories(int index) { - // @@protoc_insertion_point(field_mutable:oteldemo.Product.categories) - return _internal_mutable_categories()->Mutable(index); -} -inline void Product::set_categories(int index, const std::string& value) { - _internal_mutable_categories()->Mutable(index)->assign(value); - // @@protoc_insertion_point(field_set:oteldemo.Product.categories) -} -inline void Product::set_categories(int index, std::string&& value) { - _internal_mutable_categories()->Mutable(index)->assign(std::move(value)); - // @@protoc_insertion_point(field_set:oteldemo.Product.categories) -} -inline void Product::set_categories(int index, const char* value) { - ABSL_DCHECK(value != nullptr); - _internal_mutable_categories()->Mutable(index)->assign(value); - // @@protoc_insertion_point(field_set_char:oteldemo.Product.categories) -} -inline void Product::set_categories(int index, const char* value, - std::size_t size) { - _internal_mutable_categories()->Mutable(index)->assign( - reinterpret_cast(value), size); - // @@protoc_insertion_point(field_set_pointer:oteldemo.Product.categories) -} -inline void Product::set_categories(int index, absl::string_view value) { - _internal_mutable_categories()->Mutable(index)->assign(value.data(), - value.size()); - // @@protoc_insertion_point(field_set_string_piece:oteldemo.Product.categories) + ; + _impl_.product_id_.Set(static_cast(arg), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:oteldemo.GetProductReviewsRequest.product_id) } -inline void Product::add_categories(const std::string& value) { - PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); - _internal_mutable_categories()->Add()->assign(value); - // @@protoc_insertion_point(field_add:oteldemo.Product.categories) +inline std::string* GetProductReviewsRequest::mutable_product_id() { + std::string* _s = _internal_mutable_product_id(); + // @@protoc_insertion_point(field_mutable:oteldemo.GetProductReviewsRequest.product_id) + return _s; } -inline void Product::add_categories(std::string&& value) { - PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); - _internal_mutable_categories()->Add(std::move(value)); - // @@protoc_insertion_point(field_add:oteldemo.Product.categories) +inline const std::string& GetProductReviewsRequest::_internal_product_id() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.product_id_.Get(); } -inline void Product::add_categories(const char* value) { - ABSL_DCHECK(value != nullptr); +inline void GetProductReviewsRequest::_internal_set_product_id(const std::string& value) { PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); - _internal_mutable_categories()->Add()->assign(value); - // @@protoc_insertion_point(field_add_char:oteldemo.Product.categories) + ; + _impl_.product_id_.Set(value, GetArenaForAllocation()); } -inline void Product::add_categories(const char* value, std::size_t size) { +inline std::string* GetProductReviewsRequest::_internal_mutable_product_id() { PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); - _internal_mutable_categories()->Add()->assign( - reinterpret_cast(value), size); - // @@protoc_insertion_point(field_add_pointer:oteldemo.Product.categories) + ; + return _impl_.product_id_.Mutable( GetArenaForAllocation()); } -inline void Product::add_categories(absl::string_view value) { +inline std::string* GetProductReviewsRequest::release_product_id() { PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); - _internal_mutable_categories()->Add()->assign(value.data(), value.size()); - // @@protoc_insertion_point(field_add_string_piece:oteldemo.Product.categories) -} -inline const ::google::protobuf::RepeatedPtrField& -Product::categories() const { - // @@protoc_insertion_point(field_list:oteldemo.Product.categories) - return _internal_categories(); + // @@protoc_insertion_point(field_release:oteldemo.GetProductReviewsRequest.product_id) + return _impl_.product_id_.Release(); } -inline ::google::protobuf::RepeatedPtrField* Product::mutable_categories() { - // @@protoc_insertion_point(field_mutable_list:oteldemo.Product.categories) +inline void GetProductReviewsRequest::set_allocated_product_id(std::string* value) { PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); - return _internal_mutable_categories(); -} -inline const ::google::protobuf::RepeatedPtrField& -Product::_internal_categories() const { - PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); - return _impl_.categories_; -} -inline ::google::protobuf::RepeatedPtrField* -Product::_internal_mutable_categories() { - PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); - return &_impl_.categories_; + _impl_.product_id_.SetAllocated(value, GetArenaForAllocation()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.product_id_.IsDefault()) { + _impl_.product_id_.Set("", GetArenaForAllocation()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:oteldemo.GetProductReviewsRequest.product_id) } // ------------------------------------------------------------------- -// ListProductsResponse +// GetProductReviewsResponse -// repeated .oteldemo.Product products = 1; -inline int ListProductsResponse::_internal_products_size() const { - return _internal_products().size(); +// repeated .oteldemo.ProductReview product_reviews = 1; +inline int GetProductReviewsResponse::_internal_product_reviews_size() const { + return _internal_product_reviews().size(); } -inline int ListProductsResponse::products_size() const { - return _internal_products_size(); +inline int GetProductReviewsResponse::product_reviews_size() const { + return _internal_product_reviews_size(); } -inline void ListProductsResponse::clear_products() { - _internal_mutable_products()->Clear(); +inline void GetProductReviewsResponse::clear_product_reviews() { + _internal_mutable_product_reviews()->Clear(); } -inline ::oteldemo::Product* ListProductsResponse::mutable_products(int index) { - // @@protoc_insertion_point(field_mutable:oteldemo.ListProductsResponse.products) - return _internal_mutable_products()->Mutable(index); +inline ::oteldemo::ProductReview* GetProductReviewsResponse::mutable_product_reviews(int index) { + // @@protoc_insertion_point(field_mutable:oteldemo.GetProductReviewsResponse.product_reviews) + return _internal_mutable_product_reviews()->Mutable(index); } -inline ::google::protobuf::RepeatedPtrField< ::oteldemo::Product >* -ListProductsResponse::mutable_products() { - // @@protoc_insertion_point(field_mutable_list:oteldemo.ListProductsResponse.products) +inline ::google::protobuf::RepeatedPtrField< ::oteldemo::ProductReview >* +GetProductReviewsResponse::mutable_product_reviews() { + // @@protoc_insertion_point(field_mutable_list:oteldemo.GetProductReviewsResponse.product_reviews) PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); - return _internal_mutable_products(); + return _internal_mutable_product_reviews(); } -inline const ::oteldemo::Product& ListProductsResponse::products(int index) const { - // @@protoc_insertion_point(field_get:oteldemo.ListProductsResponse.products) - return _internal_products().Get(index); +inline const ::oteldemo::ProductReview& GetProductReviewsResponse::product_reviews(int index) const { + // @@protoc_insertion_point(field_get:oteldemo.GetProductReviewsResponse.product_reviews) + return _internal_product_reviews().Get(index); } -inline ::oteldemo::Product* ListProductsResponse::add_products() { +inline ::oteldemo::ProductReview* GetProductReviewsResponse::add_product_reviews() { PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); - ::oteldemo::Product* _add = _internal_mutable_products()->Add(); - // @@protoc_insertion_point(field_add:oteldemo.ListProductsResponse.products) + ::oteldemo::ProductReview* _add = _internal_mutable_product_reviews()->Add(); + // @@protoc_insertion_point(field_add:oteldemo.GetProductReviewsResponse.product_reviews) return _add; } -inline const ::google::protobuf::RepeatedPtrField< ::oteldemo::Product >& -ListProductsResponse::products() const { - // @@protoc_insertion_point(field_list:oteldemo.ListProductsResponse.products) - return _internal_products(); +inline const ::google::protobuf::RepeatedPtrField< ::oteldemo::ProductReview >& +GetProductReviewsResponse::product_reviews() const { + // @@protoc_insertion_point(field_list:oteldemo.GetProductReviewsResponse.product_reviews) + return _internal_product_reviews(); } -inline const ::google::protobuf::RepeatedPtrField<::oteldemo::Product>& -ListProductsResponse::_internal_products() const { +inline const ::google::protobuf::RepeatedPtrField<::oteldemo::ProductReview>& +GetProductReviewsResponse::_internal_product_reviews() const { PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); - return _impl_.products_; + return _impl_.product_reviews_; } -inline ::google::protobuf::RepeatedPtrField<::oteldemo::Product>* -ListProductsResponse::_internal_mutable_products() { +inline ::google::protobuf::RepeatedPtrField<::oteldemo::ProductReview>* +GetProductReviewsResponse::_internal_mutable_product_reviews() { PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); - return &_impl_.products_; + return &_impl_.product_reviews_; } // ------------------------------------------------------------------- -// GetProductRequest +// GetAverageProductReviewScoreRequest -// string id = 1; -inline void GetProductRequest::clear_id() { - _impl_.id_.ClearToEmpty(); +// string product_id = 1; +inline void GetAverageProductReviewScoreRequest::clear_product_id() { + _impl_.product_id_.ClearToEmpty(); } -inline const std::string& GetProductRequest::id() const { - // @@protoc_insertion_point(field_get:oteldemo.GetProductRequest.id) - return _internal_id(); +inline const std::string& GetAverageProductReviewScoreRequest::product_id() const { + // @@protoc_insertion_point(field_get:oteldemo.GetAverageProductReviewScoreRequest.product_id) + return _internal_product_id(); } template -inline PROTOBUF_ALWAYS_INLINE void GetProductRequest::set_id(Arg_&& arg, +inline PROTOBUF_ALWAYS_INLINE void GetAverageProductReviewScoreRequest::set_product_id(Arg_&& arg, Args_... args) { PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); ; - _impl_.id_.Set(static_cast(arg), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:oteldemo.GetProductRequest.id) + _impl_.product_id_.Set(static_cast(arg), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:oteldemo.GetAverageProductReviewScoreRequest.product_id) } -inline std::string* GetProductRequest::mutable_id() { - std::string* _s = _internal_mutable_id(); - // @@protoc_insertion_point(field_mutable:oteldemo.GetProductRequest.id) +inline std::string* GetAverageProductReviewScoreRequest::mutable_product_id() { + std::string* _s = _internal_mutable_product_id(); + // @@protoc_insertion_point(field_mutable:oteldemo.GetAverageProductReviewScoreRequest.product_id) return _s; } -inline const std::string& GetProductRequest::_internal_id() const { +inline const std::string& GetAverageProductReviewScoreRequest::_internal_product_id() const { PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); - return _impl_.id_.Get(); + return _impl_.product_id_.Get(); } -inline void GetProductRequest::_internal_set_id(const std::string& value) { +inline void GetAverageProductReviewScoreRequest::_internal_set_product_id(const std::string& value) { PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); ; - _impl_.id_.Set(value, GetArenaForAllocation()); + _impl_.product_id_.Set(value, GetArenaForAllocation()); } -inline std::string* GetProductRequest::_internal_mutable_id() { +inline std::string* GetAverageProductReviewScoreRequest::_internal_mutable_product_id() { PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); ; - return _impl_.id_.Mutable( GetArenaForAllocation()); + return _impl_.product_id_.Mutable( GetArenaForAllocation()); } -inline std::string* GetProductRequest::release_id() { +inline std::string* GetAverageProductReviewScoreRequest::release_product_id() { PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); - // @@protoc_insertion_point(field_release:oteldemo.GetProductRequest.id) - return _impl_.id_.Release(); + // @@protoc_insertion_point(field_release:oteldemo.GetAverageProductReviewScoreRequest.product_id) + return _impl_.product_id_.Release(); } -inline void GetProductRequest::set_allocated_id(std::string* value) { +inline void GetAverageProductReviewScoreRequest::set_allocated_product_id(std::string* value) { PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); - _impl_.id_.SetAllocated(value, GetArenaForAllocation()); + _impl_.product_id_.SetAllocated(value, GetArenaForAllocation()); #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.id_.IsDefault()) { - _impl_.id_.Set("", GetArenaForAllocation()); + if (_impl_.product_id_.IsDefault()) { + _impl_.product_id_.Set("", GetArenaForAllocation()); } #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - // @@protoc_insertion_point(field_set_allocated:oteldemo.GetProductRequest.id) + // @@protoc_insertion_point(field_set_allocated:oteldemo.GetAverageProductReviewScoreRequest.product_id) } // ------------------------------------------------------------------- -// SearchProductsRequest +// GetAverageProductReviewScoreResponse -// string query = 1; -inline void SearchProductsRequest::clear_query() { - _impl_.query_.ClearToEmpty(); +// string average_score = 1; +inline void GetAverageProductReviewScoreResponse::clear_average_score() { + _impl_.average_score_.ClearToEmpty(); } -inline const std::string& SearchProductsRequest::query() const { - // @@protoc_insertion_point(field_get:oteldemo.SearchProductsRequest.query) - return _internal_query(); +inline const std::string& GetAverageProductReviewScoreResponse::average_score() const { + // @@protoc_insertion_point(field_get:oteldemo.GetAverageProductReviewScoreResponse.average_score) + return _internal_average_score(); } template -inline PROTOBUF_ALWAYS_INLINE void SearchProductsRequest::set_query(Arg_&& arg, +inline PROTOBUF_ALWAYS_INLINE void GetAverageProductReviewScoreResponse::set_average_score(Arg_&& arg, Args_... args) { PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); ; - _impl_.query_.Set(static_cast(arg), args..., GetArenaForAllocation()); - // @@protoc_insertion_point(field_set:oteldemo.SearchProductsRequest.query) + _impl_.average_score_.Set(static_cast(arg), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:oteldemo.GetAverageProductReviewScoreResponse.average_score) } -inline std::string* SearchProductsRequest::mutable_query() { - std::string* _s = _internal_mutable_query(); - // @@protoc_insertion_point(field_mutable:oteldemo.SearchProductsRequest.query) +inline std::string* GetAverageProductReviewScoreResponse::mutable_average_score() { + std::string* _s = _internal_mutable_average_score(); + // @@protoc_insertion_point(field_mutable:oteldemo.GetAverageProductReviewScoreResponse.average_score) return _s; } -inline const std::string& SearchProductsRequest::_internal_query() const { +inline const std::string& GetAverageProductReviewScoreResponse::_internal_average_score() const { PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); - return _impl_.query_.Get(); + return _impl_.average_score_.Get(); } -inline void SearchProductsRequest::_internal_set_query(const std::string& value) { +inline void GetAverageProductReviewScoreResponse::_internal_set_average_score(const std::string& value) { PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); ; - _impl_.query_.Set(value, GetArenaForAllocation()); + _impl_.average_score_.Set(value, GetArenaForAllocation()); } -inline std::string* SearchProductsRequest::_internal_mutable_query() { +inline std::string* GetAverageProductReviewScoreResponse::_internal_mutable_average_score() { PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); ; - return _impl_.query_.Mutable( GetArenaForAllocation()); + return _impl_.average_score_.Mutable( GetArenaForAllocation()); } -inline std::string* SearchProductsRequest::release_query() { +inline std::string* GetAverageProductReviewScoreResponse::release_average_score() { PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); - // @@protoc_insertion_point(field_release:oteldemo.SearchProductsRequest.query) - return _impl_.query_.Release(); + // @@protoc_insertion_point(field_release:oteldemo.GetAverageProductReviewScoreResponse.average_score) + return _impl_.average_score_.Release(); } -inline void SearchProductsRequest::set_allocated_query(std::string* value) { +inline void GetAverageProductReviewScoreResponse::set_allocated_average_score(std::string* value) { PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); - _impl_.query_.SetAllocated(value, GetArenaForAllocation()); + _impl_.average_score_.SetAllocated(value, GetArenaForAllocation()); #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING - if (_impl_.query_.IsDefault()) { - _impl_.query_.Set("", GetArenaForAllocation()); + if (_impl_.average_score_.IsDefault()) { + _impl_.average_score_.Set("", GetArenaForAllocation()); } #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING - // @@protoc_insertion_point(field_set_allocated:oteldemo.SearchProductsRequest.query) + // @@protoc_insertion_point(field_set_allocated:oteldemo.GetAverageProductReviewScoreResponse.average_score) } // ------------------------------------------------------------------- -// SearchProductsResponse +// AskProductAIAssistantRequest -// repeated .oteldemo.Product results = 1; -inline int SearchProductsResponse::_internal_results_size() const { - return _internal_results().size(); +// string product_id = 1; +inline void AskProductAIAssistantRequest::clear_product_id() { + _impl_.product_id_.ClearToEmpty(); } -inline int SearchProductsResponse::results_size() const { - return _internal_results_size(); +inline const std::string& AskProductAIAssistantRequest::product_id() const { + // @@protoc_insertion_point(field_get:oteldemo.AskProductAIAssistantRequest.product_id) + return _internal_product_id(); } -inline void SearchProductsResponse::clear_results() { - _internal_mutable_results()->Clear(); +template +inline PROTOBUF_ALWAYS_INLINE void AskProductAIAssistantRequest::set_product_id(Arg_&& arg, + Args_... args) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.product_id_.Set(static_cast(arg), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:oteldemo.AskProductAIAssistantRequest.product_id) } -inline ::oteldemo::Product* SearchProductsResponse::mutable_results(int index) { - // @@protoc_insertion_point(field_mutable:oteldemo.SearchProductsResponse.results) - return _internal_mutable_results()->Mutable(index); +inline std::string* AskProductAIAssistantRequest::mutable_product_id() { + std::string* _s = _internal_mutable_product_id(); + // @@protoc_insertion_point(field_mutable:oteldemo.AskProductAIAssistantRequest.product_id) + return _s; } -inline ::google::protobuf::RepeatedPtrField< ::oteldemo::Product >* -SearchProductsResponse::mutable_results() { - // @@protoc_insertion_point(field_mutable_list:oteldemo.SearchProductsResponse.results) +inline const std::string& AskProductAIAssistantRequest::_internal_product_id() const { + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); + return _impl_.product_id_.Get(); +} +inline void AskProductAIAssistantRequest::_internal_set_product_id(const std::string& value) { PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); - return _internal_mutable_results(); + ; + _impl_.product_id_.Set(value, GetArenaForAllocation()); } -inline const ::oteldemo::Product& SearchProductsResponse::results(int index) const { - // @@protoc_insertion_point(field_get:oteldemo.SearchProductsResponse.results) - return _internal_results().Get(index); +inline std::string* AskProductAIAssistantRequest::_internal_mutable_product_id() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + return _impl_.product_id_.Mutable( GetArenaForAllocation()); } -inline ::oteldemo::Product* SearchProductsResponse::add_results() { +inline std::string* AskProductAIAssistantRequest::release_product_id() { PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); - ::oteldemo::Product* _add = _internal_mutable_results()->Add(); - // @@protoc_insertion_point(field_add:oteldemo.SearchProductsResponse.results) - return _add; + // @@protoc_insertion_point(field_release:oteldemo.AskProductAIAssistantRequest.product_id) + return _impl_.product_id_.Release(); } -inline const ::google::protobuf::RepeatedPtrField< ::oteldemo::Product >& -SearchProductsResponse::results() const { - // @@protoc_insertion_point(field_list:oteldemo.SearchProductsResponse.results) - return _internal_results(); +inline void AskProductAIAssistantRequest::set_allocated_product_id(std::string* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.product_id_.SetAllocated(value, GetArenaForAllocation()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.product_id_.IsDefault()) { + _impl_.product_id_.Set("", GetArenaForAllocation()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:oteldemo.AskProductAIAssistantRequest.product_id) } -inline const ::google::protobuf::RepeatedPtrField<::oteldemo::Product>& -SearchProductsResponse::_internal_results() const { + +// string question = 2; +inline void AskProductAIAssistantRequest::clear_question() { + _impl_.question_.ClearToEmpty(); +} +inline const std::string& AskProductAIAssistantRequest::question() const { + // @@protoc_insertion_point(field_get:oteldemo.AskProductAIAssistantRequest.question) + return _internal_question(); +} +template +inline PROTOBUF_ALWAYS_INLINE void AskProductAIAssistantRequest::set_question(Arg_&& arg, + Args_... args) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.question_.Set(static_cast(arg), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:oteldemo.AskProductAIAssistantRequest.question) +} +inline std::string* AskProductAIAssistantRequest::mutable_question() { + std::string* _s = _internal_mutable_question(); + // @@protoc_insertion_point(field_mutable:oteldemo.AskProductAIAssistantRequest.question) + return _s; +} +inline const std::string& AskProductAIAssistantRequest::_internal_question() const { PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); - return _impl_.results_; + return _impl_.question_.Get(); } -inline ::google::protobuf::RepeatedPtrField<::oteldemo::Product>* -SearchProductsResponse::_internal_mutable_results() { +inline void AskProductAIAssistantRequest::_internal_set_question(const std::string& value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.question_.Set(value, GetArenaForAllocation()); +} +inline std::string* AskProductAIAssistantRequest::_internal_mutable_question() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + return _impl_.question_.Mutable( GetArenaForAllocation()); +} +inline std::string* AskProductAIAssistantRequest::release_question() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + // @@protoc_insertion_point(field_release:oteldemo.AskProductAIAssistantRequest.question) + return _impl_.question_.Release(); +} +inline void AskProductAIAssistantRequest::set_allocated_question(std::string* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.question_.SetAllocated(value, GetArenaForAllocation()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.question_.IsDefault()) { + _impl_.question_.Set("", GetArenaForAllocation()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:oteldemo.AskProductAIAssistantRequest.question) +} + +// ------------------------------------------------------------------- + +// AskProductAIAssistantResponse + +// string response = 1; +inline void AskProductAIAssistantResponse::clear_response() { + _impl_.response_.ClearToEmpty(); +} +inline const std::string& AskProductAIAssistantResponse::response() const { + // @@protoc_insertion_point(field_get:oteldemo.AskProductAIAssistantResponse.response) + return _internal_response(); +} +template +inline PROTOBUF_ALWAYS_INLINE void AskProductAIAssistantResponse::set_response(Arg_&& arg, + Args_... args) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.response_.Set(static_cast(arg), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:oteldemo.AskProductAIAssistantResponse.response) +} +inline std::string* AskProductAIAssistantResponse::mutable_response() { + std::string* _s = _internal_mutable_response(); + // @@protoc_insertion_point(field_mutable:oteldemo.AskProductAIAssistantResponse.response) + return _s; +} +inline const std::string& AskProductAIAssistantResponse::_internal_response() const { PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); - return &_impl_.results_; + return _impl_.response_.Get(); +} +inline void AskProductAIAssistantResponse::_internal_set_response(const std::string& value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + _impl_.response_.Set(value, GetArenaForAllocation()); +} +inline std::string* AskProductAIAssistantResponse::_internal_mutable_response() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ; + return _impl_.response_.Mutable( GetArenaForAllocation()); +} +inline std::string* AskProductAIAssistantResponse::release_response() { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + // @@protoc_insertion_point(field_release:oteldemo.AskProductAIAssistantResponse.response) + return _impl_.response_.Release(); +} +inline void AskProductAIAssistantResponse::set_allocated_response(std::string* value) { + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + _impl_.response_.SetAllocated(value, GetArenaForAllocation()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.response_.IsDefault()) { + _impl_.response_.Set("", GetArenaForAllocation()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:oteldemo.AskProductAIAssistantResponse.response) } // ------------------------------------------------------------------- diff --git a/src/currency/build/generated/proto/demo_mock.grpc.pb.h b/src/currency/build/generated/proto/demo_mock.grpc.pb.h index e56b23f53a..b8091d166e 100644 --- a/src/currency/build/generated/proto/demo_mock.grpc.pb.h +++ b/src/currency/build/generated/proto/demo_mock.grpc.pb.h @@ -46,6 +46,19 @@ class MockProductCatalogServiceStub : public ProductCatalogService::StubInterfac MOCK_METHOD3(PrepareAsyncSearchProductsRaw, ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::SearchProductsResponse>*(::grpc::ClientContext* context, const ::oteldemo::SearchProductsRequest& request, ::grpc::CompletionQueue* cq)); }; +class MockProductReviewServiceStub : public ProductReviewService::StubInterface { + public: + MOCK_METHOD3(GetProductReviews, ::grpc::Status(::grpc::ClientContext* context, const ::oteldemo::GetProductReviewsRequest& request, ::oteldemo::GetProductReviewsResponse* response)); + MOCK_METHOD3(AsyncGetProductReviewsRaw, ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::GetProductReviewsResponse>*(::grpc::ClientContext* context, const ::oteldemo::GetProductReviewsRequest& request, ::grpc::CompletionQueue* cq)); + MOCK_METHOD3(PrepareAsyncGetProductReviewsRaw, ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::GetProductReviewsResponse>*(::grpc::ClientContext* context, const ::oteldemo::GetProductReviewsRequest& request, ::grpc::CompletionQueue* cq)); + MOCK_METHOD3(GetAverageProductReviewScore, ::grpc::Status(::grpc::ClientContext* context, const ::oteldemo::GetAverageProductReviewScoreRequest& request, ::oteldemo::GetAverageProductReviewScoreResponse* response)); + MOCK_METHOD3(AsyncGetAverageProductReviewScoreRaw, ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::GetAverageProductReviewScoreResponse>*(::grpc::ClientContext* context, const ::oteldemo::GetAverageProductReviewScoreRequest& request, ::grpc::CompletionQueue* cq)); + MOCK_METHOD3(PrepareAsyncGetAverageProductReviewScoreRaw, ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::GetAverageProductReviewScoreResponse>*(::grpc::ClientContext* context, const ::oteldemo::GetAverageProductReviewScoreRequest& request, ::grpc::CompletionQueue* cq)); + MOCK_METHOD3(AskProductAIAssistant, ::grpc::Status(::grpc::ClientContext* context, const ::oteldemo::AskProductAIAssistantRequest& request, ::oteldemo::AskProductAIAssistantResponse* response)); + MOCK_METHOD3(AsyncAskProductAIAssistantRaw, ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::AskProductAIAssistantResponse>*(::grpc::ClientContext* context, const ::oteldemo::AskProductAIAssistantRequest& request, ::grpc::CompletionQueue* cq)); + MOCK_METHOD3(PrepareAsyncAskProductAIAssistantRaw, ::grpc::ClientAsyncResponseReaderInterface< ::oteldemo::AskProductAIAssistantResponse>*(::grpc::ClientContext* context, const ::oteldemo::AskProductAIAssistantRequest& request, ::grpc::CompletionQueue* cq)); +}; + class MockShippingServiceStub : public ShippingService::StubInterface { public: MOCK_METHOD3(GetQuote, ::grpc::Status(::grpc::ClientContext* context, const ::oteldemo::GetQuoteRequest& request, ::oteldemo::GetQuoteResponse* response)); diff --git a/src/flagd/demo.flagd.json b/src/flagd/demo.flagd.json index f6cef9fc63..5f0df68929 100644 --- a/src/flagd/demo.flagd.json +++ b/src/flagd/demo.flagd.json @@ -1,6 +1,24 @@ { "$schema": "https://flagd.dev/schema/v0/flags.json", "flags": { + "llmInaccurateResponse": { + "defaultVariant": "off", + "description": "LLM returns an inaccurate product summary for product ID L9ECAV7KIM", + "state": "ENABLED", + "variants": { + "off": false, + "on": true + } + }, + "llmRateLimitError": { + "defaultVariant": "off", + "description": "LLM intermittently returns a rate limit error", + "state": "ENABLED", + "variants": { + "off": false, + "on": true + } + }, "productCatalogFailure": { "description": "Fail product catalog service on a specific product", "state": "ENABLED", diff --git a/src/frontend-proxy/envoy.tmpl.yaml b/src/frontend-proxy/envoy.tmpl.yaml index 9e708a8816..5f74a1c1de 100644 --- a/src/frontend-proxy/envoy.tmpl.yaml +++ b/src/frontend-proxy/envoy.tmpl.yaml @@ -61,7 +61,7 @@ static_resources: prefix_rewrite: "/" upgrade_configs: - upgrade_type: websocket - - match: { prefix: "/" } # Default/catch-all route - keep last since prefix:"/" matches everything + - match: { prefix: "/" } # Default/catch-all route - keep last since prefix:"/" matches everything route: { cluster: frontend } http_filters: - name: envoy.filters.http.fault diff --git a/src/frontend/components/ProductReviews/ProductReviews.styled.ts b/src/frontend/components/ProductReviews/ProductReviews.styled.ts new file mode 100644 index 0000000000..20e353f95b --- /dev/null +++ b/src/frontend/components/ProductReviews/ProductReviews.styled.ts @@ -0,0 +1,255 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +import styled from 'styled-components'; + +export const ProductReviews = styled.section` + display: flex; + margin: 40px 0; + align-items: center; + flex-direction: column; +`; + +export const TitleContainer = styled.div` + border-top: 1px dashed; + padding: 40px 0; + text-align: center; + width: 100%; +`; + +export const Title = styled.h3` + font-size: ${({ theme }) => theme.sizes.mLarge}; + + ${({ theme }) => theme.breakpoints.desktop} { + font-size: ${({ theme }) => theme.sizes.dLarge}; + } +`; + +/* Summary card at the top */ +export const SummaryCard = styled.section` + width: 100%; + padding: 20px; + margin: 0 20px 24px; + border: 1px solid ${({ theme }) => theme.colors.borderGray}; + border-radius: 8px; + background: ${({ theme }) => theme.colors.white}; + display: grid; + gap: 16px; + + ${({ theme }) => theme.breakpoints.desktop} { + grid-template-columns: 280px 1fr; + align-items: center; + } +`; + +export const AverageBlock = styled.div` + display: grid; + grid-template-columns: auto 1fr; + align-items: center; + gap: 12px; +`; + +export const AverageScoreBadge = styled.div` + min-width: 64px; + height: 64px; + border-radius: 8px; + background: ${({ theme }) => theme.colors.otelBlue}; + color: ${({ theme }) => theme.colors.white}; + font-weight: 700; + font-size: 24px; + display: grid; + place-items: center; +`; + +export const StarRating = styled.span` + color: ${({ theme }) => theme.colors.otelYellow}; + font-size: 18px; +`; + +export const ScoreCount = styled.span` + grid-column: 1 / -1; + color: ${({ theme }) => theme.colors.textLightGray}; + font-size: 14px; +`; + +export const ScoreDistribution = styled.div` + display: grid; + gap: 8px; +`; + +export const ScoreRow = styled.div` + display: grid; + grid-template-columns: 80px 1fr 48px; + align-items: center; + gap: 8px; +`; + +export const ScoreLabel = styled.span` + font-size: 14px; + color: ${({ theme }) => theme.colors.textLightGray}; +`; + +export const ScoreBar = styled.div` + position: relative; + height: 10px; + border-radius: 6px; + background: ${({ theme }) => theme.colors.lightBorderGray}; + overflow: hidden; +`; + +export const ScoreBarFill = styled.div` + position: absolute; + left: 0; + top: 0; + height: 100%; + background: ${({ theme }) => theme.colors.otelBlue}; +`; + +export const ScorePct = styled.span` + font-size: 12px; + color: ${({ theme }) => theme.colors.otelGray}; + text-align: right; + font-variant-numeric: tabular-nums; +`; + +export const SummaryText = styled.p` + margin: 0; + line-height: 1.5; +`; + +/* Reviews grid: 1 column mobile, 5 desktop (since there are always 5 reviews) */ +export const ReviewsGrid = styled.ul` + display: grid; + width: 100%; + padding: 0 20px; + margin: 0; + list-style: none; + gap: 24px; + grid-template-columns: 1fr; + + ${({ theme }) => theme.breakpoints.desktop} { + grid-template-columns: repeat(5, 1fr); + } +`; + +export const ReviewCard = styled.li` + border: 1px solid ${({ theme }) => theme.colors.borderGray}; + border-radius: 8px; + background: ${({ theme }) => theme.colors.white}; + padding: 16px; + display: grid; + gap: 12px; +`; + +export const ReviewHeader = styled.div` + display: flex; + align-items: center; + justify-content: space-between; +`; + +export const ReviewerName = styled.strong` + font-weight: 600; +`; + +export const ReviewBody = styled.p` + margin: 0; + line-height: 1.6; +`; + +export const AskAISection = styled.section` + width: 100%; + padding: 20px; + margin: 0 20px 24px; + border: 1px solid ${({ theme }) => theme.colors.borderGray}; + border-radius: 8px; + background: ${({ theme }) => theme.colors.white}; + display: grid; + gap: 12px; +`; + +export const AskAIHeader = styled.h4` + margin: 0; + font-size: ${({ theme }) => theme.sizes.mLarge}; + color: ${({ theme }) => theme.colors.otelGray}; + + ${({ theme }) => theme.breakpoints.desktop} { + font-size: ${({ theme }) => theme.sizes.dMedium}; + } +`; + +export const AskAIInputRow = styled.div` + display: flex; + gap: 8px; + align-items: center; + width: 100%; +`; + +export const AskAIInput = styled.input` + width: 100%; + flex: 1; + min-width: 0; + padding: 10px 12px; + border: 1px solid ${({ theme }) => theme.colors.borderGray}; + border-radius: 6px; + font-size: 16px; + outline: none; + background: ${({ theme }) => theme.colors.white}; + color: ${({ theme }) => theme.colors.otelGray}; + + &:focus { + border-color: ${({ theme }) => theme.colors.otelBlue}; + box-shadow: 0 0 0 3px rgba(0, 112, 201, 0.15); + } +`; + +export const AskAIControls = styled.div` + display: flex; + flex-wrap: wrap; + gap: 8px; + align-items: center; +`; + +export const QuickPromptButton = styled.button` + padding: 8px 12px; + border: 1px solid ${({ theme }) => theme.colors.borderGray}; + border-radius: 6px; + background: ${({ theme }) => theme.colors.white}; + color: ${({ theme }) => theme.colors.otelGray}; + font-size: 14px; + cursor: pointer; + + &:hover { + border-color: ${({ theme }) => theme.colors.otelBlue}; + } + + &:disabled { + opacity: 0.6; + cursor: not-allowed; + } +`; + +export const AskAIButton = styled.button` + padding: 8px 16px; + border: none; + border-radius: 6px; + background: ${({ theme }) => theme.colors.otelBlue}; + color: ${({ theme }) => theme.colors.white}; + font-size: 14px; + font-weight: 600; + cursor: pointer; + + &:hover { + filter: brightness(1.05); + } + + &:disabled { + opacity: 0.6; + cursor: not-allowed; + } +`; + +export const AIMessage = styled.p` + margin: 0; + line-height: 1.5; + color: ${({ theme }) => theme.colors.otelGray}; +`; diff --git a/src/frontend/components/ProductReviews/ProductReviews.tsx b/src/frontend/components/ProductReviews/ProductReviews.tsx new file mode 100644 index 0000000000..d144382943 --- /dev/null +++ b/src/frontend/components/ProductReviews/ProductReviews.tsx @@ -0,0 +1,214 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +import * as S from './ProductReviews.styled'; +import { useProductReview } from '../../providers/ProductReview.provider'; +import { useAiAssistant } from '../../providers/ProductAIAssistant.provider'; +import React, { useState, useMemo } from 'react'; +import { CypressFields } from '../../utils/enums/CypressFields'; + +const clamp = (n: number, min = 0, max = 5) => Math.max(min, Math.min(max, n)); + +const StarRating = ({ value, max = 5 }: { value: number; max?: number }) => { + const rounded = clamp(Math.round(value), 0, max); + const stars = Array.from({ length: max }, (_, i) => (i < rounded ? '★' : '☆')).join(' '); + return {stars}; +}; + +const ProductReviews = () => { + const { productReviews, loading, error, averageScore } = useProductReview(); + + const average = useMemo(() => { + if (!averageScore) return null; + return clamp(Number(averageScore)); + }, [averageScore]); + + const distribution = useMemo(() => { + if (!Array.isArray(productReviews)) return [0, 0, 0, 0, 0]; + const counts = [0, 0, 0, 0, 0]; + for (const r of productReviews) { + const s = clamp(Math.round(Number(r.score)), 1, 5); // round first, clamp to [1,5] + counts[s - 1] += 1; + } + return counts; + }, [productReviews]); + + const normalizedPercents = useMemo(() => { + if (!Array.isArray(productReviews) || productReviews.length === 0) return [0, 0, 0, 0, 0]; + + const raw = distribution.map(c => (c / productReviews.length) * 100); + const floored = raw.map(p => Math.floor(p)); + const sumFloors = floored.reduce((a, b) => a + b, 0); + let remainder = 100 - sumFloors; + + const order = raw + .map((p, i) => ({ i, frac: p - Math.floor(p) })) + .sort((a, b) => b.frac - a.frac); + + const final = floored.slice(); + for (let k = 0; k < remainder; k++) { + final[order[k].i] += 1; + } + return final; + }, [distribution, productReviews]); + + // AI Assistant (provider-driven) + const [aiQuestion, setAiQuestion] = useState(''); + const { sendAiRequest, aiResponse, aiLoading, aiError, reset } = useAiAssistant(); + + const handleAskAI = (questionOverride?: string) => { + const q = (questionOverride ?? aiQuestion).trim(); + if (!q) return; + reset(); // optional: clears previous result + sendAiRequest({ question: q }); + }; + + const handleQuickPrompt = (prompt: string) => { + setAiQuestion(prompt); + handleAskAI(prompt); + }; + + return ( + + + + Ask AI About This Product + + + setAiQuestion(e.target.value)} + onKeyDown={(e) => { + if (e.key === 'Enter' && !aiLoading && aiQuestion.trim()) { + handleAskAI(); + } + }} + aria-label="Question to AI" + data-cy="AskAIInput" + /> + handleAskAI()} + disabled={aiLoading || !aiQuestion.trim()} + aria-busy={aiLoading ? 'true' : 'false'} + data-cy="AskAIButton" + > + {aiLoading ? 'Asking AI…' : 'Ask'} + + + + + handleQuickPrompt('Can you summarize the product reviews?')} + data-cy="QuickPromptSummarize" + > + Can you summarize the product reviews? + + + handleQuickPrompt('What age(s) is this recommended for?')} + data-cy="QuickPromptAges" + > + What age(s) is this recommended for? + + + handleQuickPrompt('Were there any negative reviews?')} + data-cy="QuickPromptNegative" + > + Were there any negative reviews? + + + + {aiError && ( + + {aiError.message ?? 'Sorry, something went wrong while asking AI.'} + + )} + + {aiResponse && ( + + AI Response:{' '} + {typeof aiResponse === 'string' ? aiResponse : aiResponse.text} + + )} + + + + + Customer Reviews + + + {loading &&

Loading product reviews…

} + + {!loading && error &&

Could not load product reviews.

} + + {!loading && !error && Array.isArray(productReviews) && productReviews.length === 0 && ( +

No reviews yet.

+ )} + + {!loading && !error && ( + <> + {(average != null) && ( + + {average != null && ( + <> + + {average.toFixed(1)} + + + {Array.isArray(productReviews) ? `${productReviews.length} reviews` : ''} + + + + {Array.isArray(productReviews) && productReviews.length > 0 && ( + + {[1, 2, 3, 4, 5].map((score, idx) => { + const pct = normalizedPercents[idx]; + return ( + + + {score} star{score > 1 ? 's' : ''} + + + + + {pct}% + + ); + })} + + )} + + )} + + )} + + {Array.isArray(productReviews) && productReviews.length > 0 && ( + + {productReviews.map((review, idx) => ( + + + {review.username} + + + + {review.description || 'No description provided.'} + + + ))} + + )} + + )} +
+ ); +}; + +export default ProductReviews; diff --git a/src/frontend/components/ProductReviews/index.ts b/src/frontend/components/ProductReviews/index.ts new file mode 100644 index 0000000000..85b8937fc7 --- /dev/null +++ b/src/frontend/components/ProductReviews/index.ts @@ -0,0 +1,4 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +export { default } from './ProductReviews'; diff --git a/src/frontend/cypress/e2e/Checkout.cy.ts b/src/frontend/cypress/e2e/Checkout.cy.ts index 1feca43352..7156ae47df 100644 --- a/src/frontend/cypress/e2e/Checkout.cy.ts +++ b/src/frontend/cypress/e2e/Checkout.cy.ts @@ -1,9 +1,10 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -import { CypressFields, getElementByField } from '../../utils/Cypress'; +import { getElementByField } from '../../utils/Cypress'; +import { CypressFields } from '../../utils/enums/CypressFields'; -describe.skip('Checkout Flow', () => { +describe('Checkout Flow', () => { before(() => { cy.intercept('POST', '/api/cart*').as('addToCart'); cy.intercept('GET', '/api/cart*').as('getCart'); diff --git a/src/frontend/cypress/e2e/Home.cy.ts b/src/frontend/cypress/e2e/Home.cy.ts index 300912f696..512f6c4886 100644 --- a/src/frontend/cypress/e2e/Home.cy.ts +++ b/src/frontend/cypress/e2e/Home.cy.ts @@ -3,7 +3,8 @@ import getSymbolFromCurrency from 'currency-symbol-map'; import SessionGateway from '../../gateways/Session.gateway'; -import { CypressFields, getElementByField } from '../../utils/Cypress'; +import { getElementByField } from '../../utils/Cypress'; +import { CypressFields } from '../../utils/enums/CypressFields'; describe('Home Page', () => { beforeEach(() => { diff --git a/src/frontend/cypress/e2e/ProductDetail.cy.ts b/src/frontend/cypress/e2e/ProductDetail.cy.ts index f165d3df34..7eeeb05c41 100644 --- a/src/frontend/cypress/e2e/ProductDetail.cy.ts +++ b/src/frontend/cypress/e2e/ProductDetail.cy.ts @@ -1,9 +1,10 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -import { CypressFields, getElementByField } from '../../utils/Cypress'; +import { getElementByField } from '../../utils/Cypress'; +import { CypressFields } from '../../utils/enums/CypressFields'; -describe.skip('Product Detail Page', () => { +describe('Product Detail Page', () => { beforeEach(() => { cy.visit('/'); }); @@ -12,12 +13,14 @@ describe.skip('Product Detail Page', () => { cy.intercept('GET', '/api/products/*').as('getProduct'); cy.intercept('GET', '/api/data*').as('getAd'); cy.intercept('GET', '/api/recommendations*').as('getRecommendations'); + cy.intercept('GET', '/api/product-reviews/*').as('getProductReviews'); getElementByField(CypressFields.ProductCard).first().click(); cy.wait('@getProduct'); cy.wait('@getAd'); cy.wait('@getRecommendations'); + cy.wait('@getProductReviews'); getElementByField(CypressFields.ProductDetail).should('exist'); getElementByField(CypressFields.ProductPicture).should('exist'); @@ -30,6 +33,7 @@ describe.skip('Product Detail Page', () => { 4 ); getElementByField(CypressFields.Ad).should('exist'); + getElementByField(CypressFields.ProductReviews).should('exist'); }); it('should add item to cart', () => { diff --git a/src/frontend/gateways/Api.gateway.ts b/src/frontend/gateways/Api.gateway.ts index eb9438ccd2..953515254d 100644 --- a/src/frontend/gateways/Api.gateway.ts +++ b/src/frontend/gateways/Api.gateway.ts @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -import { Ad, Address, Cart, CartItem, Money, PlaceOrderRequest, Product } from '../protos/demo'; +import { Ad, Address, Cart, CartItem, Money, PlaceOrderRequest, Product, ProductReview } from '../protos/demo'; import { IProductCart, IProductCartItem, IProductCheckout } from '../types/Cart'; import request from '../utils/Request'; import { AttributeNames } from '../utils/enums/AttributeNames'; @@ -73,6 +73,23 @@ const Apis = () => ({ queryParams: { currencyCode }, }); }, + getProductReviews(productId: string) { + return request({ + url: `${basePath}/product-reviews/${productId}` + }); + }, + getAverageProductReviewScore(productId: string) { + return request({ + url: `${basePath}/product-reviews-avg-score/${productId}` + }); + }, + askProductAIAssistant(productId: string, question: string) { + return request({ + url: `${basePath}/product-ask-ai-assistant/${productId}`, + method: 'POST', + body: { question }, + }); + }, listRecommendations(productIds: string[], currencyCode: string) { return request({ url: `${basePath}/recommendations`, diff --git a/src/frontend/gateways/rpc/ProductReview.gateway.ts b/src/frontend/gateways/rpc/ProductReview.gateway.ts new file mode 100644 index 0000000000..58854c9d48 --- /dev/null +++ b/src/frontend/gateways/rpc/ProductReview.gateway.ts @@ -0,0 +1,30 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +import { ChannelCredentials } from '@grpc/grpc-js'; +import {ProductReview, ProductReviewServiceClient} from '../../protos/demo'; + +const { PRODUCT_REVIEWS_ADDR = '' } = process.env; + +const client = new ProductReviewServiceClient(PRODUCT_REVIEWS_ADDR, ChannelCredentials.createInsecure()); + +const ProductReviewGateway = () => ({ + + getProductReviews(productId: string) { + return new Promise((resolve, reject) => + client.getProductReviews({ productId }, (error, response) => (error ? reject(error) : resolve(response.productReviews))) + ); + }, + getAverageProductReviewScore(productId: string) { + return new Promise((resolve, reject) => + client.getAverageProductReviewScore({ productId }, (error, response) => (error ? reject(error) : resolve(response.averageScore))) + ); + }, + askProductAIAssistant(productId: string, question: string) { + return new Promise((resolve, reject) => + client.askProductAiAssistant({ productId, question }, (error, response) => (error ? reject(error) : resolve(response.response))) + ); + }, +}); + +export default ProductReviewGateway(); diff --git a/src/frontend/next.config.js b/src/frontend/next.config.js index d98ec31714..6fcd15501d 100755 --- a/src/frontend/next.config.js +++ b/src/frontend/next.config.js @@ -18,6 +18,7 @@ const { CHECKOUT_ADDR = '', CURRENCY_ADDR = '', PRODUCT_CATALOG_ADDR = '', + PRODUCT_REVIEWS_ADDR = '', RECOMMENDATION_ADDR = '', SHIPPING_ADDR = '', ENV_PLATFORM = '', @@ -56,6 +57,7 @@ const nextConfig = { CHECKOUT_ADDR, CURRENCY_ADDR, PRODUCT_CATALOG_ADDR, + PRODUCT_REVIEWS_ADDR, RECOMMENDATION_ADDR, SHIPPING_ADDR, OTEL_EXPORTER_OTLP_TRACES_ENDPOINT, diff --git a/src/frontend/pages/api/product-ask-ai-assistant/[productId]/index.ts b/src/frontend/pages/api/product-ask-ai-assistant/[productId]/index.ts new file mode 100644 index 0000000000..5f9927427f --- /dev/null +++ b/src/frontend/pages/api/product-ask-ai-assistant/[productId]/index.ts @@ -0,0 +1,29 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +import type { NextApiRequest, NextApiResponse } from 'next'; +import InstrumentationMiddleware from '../../../../utils/telemetry/InstrumentationMiddleware'; +import {AddItemRequest, Empty} from '../../../../protos/demo'; +import ProductReviewService from '../../../../services/ProductReview.service'; + +type TResponse = string | Empty; + +const handler = async ({ method, body, query }: NextApiRequest, res: NextApiResponse) => { + + switch (method) { + case 'POST': { + const { productId = '' } = query; + const { question } = body ; + + const response = await ProductReviewService.askProductAIAssistant(productId as string, question as string); + + return res.status(200).json(response); + } + + default: { + return res.status(405).send(''); + } + } +}; + +export default InstrumentationMiddleware(handler); diff --git a/src/frontend/pages/api/product-reviews-avg-score/[productId]/index.ts b/src/frontend/pages/api/product-reviews-avg-score/[productId]/index.ts new file mode 100644 index 0000000000..f2658551eb --- /dev/null +++ b/src/frontend/pages/api/product-reviews-avg-score/[productId]/index.ts @@ -0,0 +1,28 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +import type { NextApiRequest, NextApiResponse } from 'next'; +import InstrumentationMiddleware from '../../../../utils/telemetry/InstrumentationMiddleware'; +import { Empty, ProductReview } from '../../../../protos/demo'; +import ProductReviewService from '../../../../services/ProductReview.service'; + +type TResponse = string | Empty; + +const handler = async ({ method, query }: NextApiRequest, res: NextApiResponse) => { + + switch (method) { + case 'GET': { + const { productId = '' } = query; + + const averageScore = await ProductReviewService.getAverageProductReviewScore(productId as string); + + return res.status(200).json(averageScore); + } + + default: { + return res.status(405).send(''); + } + } +}; + +export default InstrumentationMiddleware(handler); diff --git a/src/frontend/pages/api/product-reviews/[productId]/index.ts b/src/frontend/pages/api/product-reviews/[productId]/index.ts new file mode 100644 index 0000000000..b1bb783c1c --- /dev/null +++ b/src/frontend/pages/api/product-reviews/[productId]/index.ts @@ -0,0 +1,28 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +import type { NextApiRequest, NextApiResponse } from 'next'; +import InstrumentationMiddleware from '../../../../utils/telemetry/InstrumentationMiddleware'; +import { Empty, ProductReview } from '../../../../protos/demo'; +import ProductReviewService from '../../../../services/ProductReview.service'; + +type TResponse = ProductReview[] | Empty; + +const handler = async ({ method, query }: NextApiRequest, res: NextApiResponse) => { + + switch (method) { + case 'GET': { + const { productId = '' } = query; + + const productReviews = await ProductReviewService.getProductReviews(productId as string); + + return res.status(200).json(productReviews); + } + + default: { + return res.status(405).send(''); + } + } +}; + +export default InstrumentationMiddleware(handler); diff --git a/src/frontend/pages/product/[productId]/index.tsx b/src/frontend/pages/product/[productId]/index.tsx index 1c60bafcb5..2e846145fe 100644 --- a/src/frontend/pages/product/[productId]/index.tsx +++ b/src/frontend/pages/product/[productId]/index.tsx @@ -11,6 +11,7 @@ import Ad from '../../../components/Ad'; import Layout from '../../../components/Layout'; import ProductPrice from '../../../components/ProductPrice'; import Recommendations from '../../../components/Recommendations'; +import ProductReviews from '../../../components/ProductReviews'; import Select from '../../../components/Select'; import { CypressFields } from '../../../utils/enums/CypressFields'; import ApiGateway from '../../../gateways/Api.gateway'; @@ -19,6 +20,8 @@ import AdProvider from '../../../providers/Ad.provider'; import { useCart } from '../../../providers/Cart.provider'; import * as S from '../../../styles/ProductDetail.styled'; import { useCurrency } from '../../../providers/Currency.provider'; +import ProductReviewProvider from '../../../providers/ProductReview.provider'; +import ProductAIAssistantProvider from '../../../providers/ProductAIAssistant.provider'; const quantityOptions = new Array(10).fill(0).map((_, i) => i + 1); @@ -94,6 +97,13 @@ const ProductDetail: NextPage = () => { + {productId && ( + + + + + + )} diff --git a/src/frontend/protos/demo.ts b/src/frontend/protos/demo.ts index 565f4f995a..8c77686ca5 100644 --- a/src/frontend/protos/demo.ts +++ b/src/frontend/protos/demo.ts @@ -87,6 +87,37 @@ export interface SearchProductsResponse { results: Product[]; } +export interface ProductReview { + username: string; + description: string; + score: string; +} + +export interface GetProductReviewsRequest { + productId: string; +} + +export interface GetProductReviewsResponse { + productReviews: ProductReview[]; +} + +export interface GetAverageProductReviewScoreRequest { + productId: string; +} + +export interface GetAverageProductReviewScoreResponse { + averageScore: string; +} + +export interface AskProductAIAssistantRequest { + productId: string; + question: string; +} + +export interface AskProductAIAssistantResponse { + response: string; +} + export interface GetQuoteRequest { address: Address | undefined; items: CartItem[]; @@ -1161,6 +1192,478 @@ export const SearchProductsResponse: MessageFns = { }, }; +function createBaseProductReview(): ProductReview { + return { username: "", description: "", score: "" }; +} + +export const ProductReview: MessageFns = { + encode(message: ProductReview, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { + if (message.username !== "") { + writer.uint32(10).string(message.username); + } + if (message.description !== "") { + writer.uint32(18).string(message.description); + } + if (message.score !== "") { + writer.uint32(26).string(message.score); + } + return writer; + }, + + decode(input: BinaryReader | Uint8Array, length?: number): ProductReview { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + const end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseProductReview(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (tag !== 10) { + break; + } + + message.username = reader.string(); + continue; + } + case 2: { + if (tag !== 18) { + break; + } + + message.description = reader.string(); + continue; + } + case 3: { + if (tag !== 26) { + break; + } + + message.score = reader.string(); + continue; + } + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skip(tag & 7); + } + return message; + }, + + fromJSON(object: any): ProductReview { + return { + username: isSet(object.username) ? globalThis.String(object.username) : "", + description: isSet(object.description) ? globalThis.String(object.description) : "", + score: isSet(object.score) ? globalThis.String(object.score) : "", + }; + }, + + toJSON(message: ProductReview): unknown { + const obj: any = {}; + if (message.username !== "") { + obj.username = message.username; + } + if (message.description !== "") { + obj.description = message.description; + } + if (message.score !== "") { + obj.score = message.score; + } + return obj; + }, + + create, I>>(base?: I): ProductReview { + return ProductReview.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): ProductReview { + const message = createBaseProductReview(); + message.username = object.username ?? ""; + message.description = object.description ?? ""; + message.score = object.score ?? ""; + return message; + }, +}; + +function createBaseGetProductReviewsRequest(): GetProductReviewsRequest { + return { productId: "" }; +} + +export const GetProductReviewsRequest: MessageFns = { + encode(message: GetProductReviewsRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { + if (message.productId !== "") { + writer.uint32(10).string(message.productId); + } + return writer; + }, + + decode(input: BinaryReader | Uint8Array, length?: number): GetProductReviewsRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + const end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseGetProductReviewsRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (tag !== 10) { + break; + } + + message.productId = reader.string(); + continue; + } + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skip(tag & 7); + } + return message; + }, + + fromJSON(object: any): GetProductReviewsRequest { + return { productId: isSet(object.productId) ? globalThis.String(object.productId) : "" }; + }, + + toJSON(message: GetProductReviewsRequest): unknown { + const obj: any = {}; + if (message.productId !== "") { + obj.productId = message.productId; + } + return obj; + }, + + create, I>>(base?: I): GetProductReviewsRequest { + return GetProductReviewsRequest.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): GetProductReviewsRequest { + const message = createBaseGetProductReviewsRequest(); + message.productId = object.productId ?? ""; + return message; + }, +}; + +function createBaseGetProductReviewsResponse(): GetProductReviewsResponse { + return { productReviews: [] }; +} + +export const GetProductReviewsResponse: MessageFns = { + encode(message: GetProductReviewsResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { + for (const v of message.productReviews) { + ProductReview.encode(v!, writer.uint32(10).fork()).join(); + } + return writer; + }, + + decode(input: BinaryReader | Uint8Array, length?: number): GetProductReviewsResponse { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + const end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseGetProductReviewsResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (tag !== 10) { + break; + } + + message.productReviews.push(ProductReview.decode(reader, reader.uint32())); + continue; + } + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skip(tag & 7); + } + return message; + }, + + fromJSON(object: any): GetProductReviewsResponse { + return { + productReviews: globalThis.Array.isArray(object?.productReviews) + ? object.productReviews.map((e: any) => ProductReview.fromJSON(e)) + : [], + }; + }, + + toJSON(message: GetProductReviewsResponse): unknown { + const obj: any = {}; + if (message.productReviews?.length) { + obj.productReviews = message.productReviews.map((e) => ProductReview.toJSON(e)); + } + return obj; + }, + + create, I>>(base?: I): GetProductReviewsResponse { + return GetProductReviewsResponse.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): GetProductReviewsResponse { + const message = createBaseGetProductReviewsResponse(); + message.productReviews = object.productReviews?.map((e) => ProductReview.fromPartial(e)) || []; + return message; + }, +}; + +function createBaseGetAverageProductReviewScoreRequest(): GetAverageProductReviewScoreRequest { + return { productId: "" }; +} + +export const GetAverageProductReviewScoreRequest: MessageFns = { + encode(message: GetAverageProductReviewScoreRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { + if (message.productId !== "") { + writer.uint32(10).string(message.productId); + } + return writer; + }, + + decode(input: BinaryReader | Uint8Array, length?: number): GetAverageProductReviewScoreRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + const end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseGetAverageProductReviewScoreRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (tag !== 10) { + break; + } + + message.productId = reader.string(); + continue; + } + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skip(tag & 7); + } + return message; + }, + + fromJSON(object: any): GetAverageProductReviewScoreRequest { + return { productId: isSet(object.productId) ? globalThis.String(object.productId) : "" }; + }, + + toJSON(message: GetAverageProductReviewScoreRequest): unknown { + const obj: any = {}; + if (message.productId !== "") { + obj.productId = message.productId; + } + return obj; + }, + + create, I>>( + base?: I, + ): GetAverageProductReviewScoreRequest { + return GetAverageProductReviewScoreRequest.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>( + object: I, + ): GetAverageProductReviewScoreRequest { + const message = createBaseGetAverageProductReviewScoreRequest(); + message.productId = object.productId ?? ""; + return message; + }, +}; + +function createBaseGetAverageProductReviewScoreResponse(): GetAverageProductReviewScoreResponse { + return { averageScore: "" }; +} + +export const GetAverageProductReviewScoreResponse: MessageFns = { + encode(message: GetAverageProductReviewScoreResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { + if (message.averageScore !== "") { + writer.uint32(10).string(message.averageScore); + } + return writer; + }, + + decode(input: BinaryReader | Uint8Array, length?: number): GetAverageProductReviewScoreResponse { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + const end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseGetAverageProductReviewScoreResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (tag !== 10) { + break; + } + + message.averageScore = reader.string(); + continue; + } + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skip(tag & 7); + } + return message; + }, + + fromJSON(object: any): GetAverageProductReviewScoreResponse { + return { averageScore: isSet(object.averageScore) ? globalThis.String(object.averageScore) : "" }; + }, + + toJSON(message: GetAverageProductReviewScoreResponse): unknown { + const obj: any = {}; + if (message.averageScore !== "") { + obj.averageScore = message.averageScore; + } + return obj; + }, + + create, I>>( + base?: I, + ): GetAverageProductReviewScoreResponse { + return GetAverageProductReviewScoreResponse.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>( + object: I, + ): GetAverageProductReviewScoreResponse { + const message = createBaseGetAverageProductReviewScoreResponse(); + message.averageScore = object.averageScore ?? ""; + return message; + }, +}; + +function createBaseAskProductAIAssistantRequest(): AskProductAIAssistantRequest { + return { productId: "", question: "" }; +} + +export const AskProductAIAssistantRequest: MessageFns = { + encode(message: AskProductAIAssistantRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { + if (message.productId !== "") { + writer.uint32(10).string(message.productId); + } + if (message.question !== "") { + writer.uint32(18).string(message.question); + } + return writer; + }, + + decode(input: BinaryReader | Uint8Array, length?: number): AskProductAIAssistantRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + const end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseAskProductAIAssistantRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (tag !== 10) { + break; + } + + message.productId = reader.string(); + continue; + } + case 2: { + if (tag !== 18) { + break; + } + + message.question = reader.string(); + continue; + } + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skip(tag & 7); + } + return message; + }, + + fromJSON(object: any): AskProductAIAssistantRequest { + return { + productId: isSet(object.productId) ? globalThis.String(object.productId) : "", + question: isSet(object.question) ? globalThis.String(object.question) : "", + }; + }, + + toJSON(message: AskProductAIAssistantRequest): unknown { + const obj: any = {}; + if (message.productId !== "") { + obj.productId = message.productId; + } + if (message.question !== "") { + obj.question = message.question; + } + return obj; + }, + + create, I>>(base?: I): AskProductAIAssistantRequest { + return AskProductAIAssistantRequest.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): AskProductAIAssistantRequest { + const message = createBaseAskProductAIAssistantRequest(); + message.productId = object.productId ?? ""; + message.question = object.question ?? ""; + return message; + }, +}; + +function createBaseAskProductAIAssistantResponse(): AskProductAIAssistantResponse { + return { response: "" }; +} + +export const AskProductAIAssistantResponse: MessageFns = { + encode(message: AskProductAIAssistantResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { + if (message.response !== "") { + writer.uint32(10).string(message.response); + } + return writer; + }, + + decode(input: BinaryReader | Uint8Array, length?: number): AskProductAIAssistantResponse { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + const end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseAskProductAIAssistantResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (tag !== 10) { + break; + } + + message.response = reader.string(); + continue; + } + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skip(tag & 7); + } + return message; + }, + + fromJSON(object: any): AskProductAIAssistantResponse { + return { response: isSet(object.response) ? globalThis.String(object.response) : "" }; + }, + + toJSON(message: AskProductAIAssistantResponse): unknown { + const obj: any = {}; + if (message.response !== "") { + obj.response = message.response; + } + return obj; + }, + + create, I>>(base?: I): AskProductAIAssistantResponse { + return AskProductAIAssistantResponse.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>( + object: I, + ): AskProductAIAssistantResponse { + const message = createBaseAskProductAIAssistantResponse(); + message.response = object.response ?? ""; + return message; + }, +}; + function createBaseGetQuoteRequest(): GetQuoteRequest { return { address: undefined, items: [] }; } @@ -3617,6 +4120,111 @@ export const ProductCatalogServiceClient = makeGenericClientConstructor( serviceName: string; }; +export type ProductReviewServiceService = typeof ProductReviewServiceService; +export const ProductReviewServiceService = { + getProductReviews: { + path: "/oteldemo.ProductReviewService/GetProductReviews", + requestStream: false, + responseStream: false, + requestSerialize: (value: GetProductReviewsRequest): Buffer => + Buffer.from(GetProductReviewsRequest.encode(value).finish()), + requestDeserialize: (value: Buffer): GetProductReviewsRequest => GetProductReviewsRequest.decode(value), + responseSerialize: (value: GetProductReviewsResponse): Buffer => + Buffer.from(GetProductReviewsResponse.encode(value).finish()), + responseDeserialize: (value: Buffer): GetProductReviewsResponse => GetProductReviewsResponse.decode(value), + }, + getAverageProductReviewScore: { + path: "/oteldemo.ProductReviewService/GetAverageProductReviewScore", + requestStream: false, + responseStream: false, + requestSerialize: (value: GetAverageProductReviewScoreRequest): Buffer => + Buffer.from(GetAverageProductReviewScoreRequest.encode(value).finish()), + requestDeserialize: (value: Buffer): GetAverageProductReviewScoreRequest => + GetAverageProductReviewScoreRequest.decode(value), + responseSerialize: (value: GetAverageProductReviewScoreResponse): Buffer => + Buffer.from(GetAverageProductReviewScoreResponse.encode(value).finish()), + responseDeserialize: (value: Buffer): GetAverageProductReviewScoreResponse => + GetAverageProductReviewScoreResponse.decode(value), + }, + askProductAiAssistant: { + path: "/oteldemo.ProductReviewService/AskProductAIAssistant", + requestStream: false, + responseStream: false, + requestSerialize: (value: AskProductAIAssistantRequest): Buffer => + Buffer.from(AskProductAIAssistantRequest.encode(value).finish()), + requestDeserialize: (value: Buffer): AskProductAIAssistantRequest => AskProductAIAssistantRequest.decode(value), + responseSerialize: (value: AskProductAIAssistantResponse): Buffer => + Buffer.from(AskProductAIAssistantResponse.encode(value).finish()), + responseDeserialize: (value: Buffer): AskProductAIAssistantResponse => AskProductAIAssistantResponse.decode(value), + }, +} as const; + +export interface ProductReviewServiceServer extends UntypedServiceImplementation { + getProductReviews: handleUnaryCall; + getAverageProductReviewScore: handleUnaryCall< + GetAverageProductReviewScoreRequest, + GetAverageProductReviewScoreResponse + >; + askProductAiAssistant: handleUnaryCall; +} + +export interface ProductReviewServiceClient extends Client { + getProductReviews( + request: GetProductReviewsRequest, + callback: (error: ServiceError | null, response: GetProductReviewsResponse) => void, + ): ClientUnaryCall; + getProductReviews( + request: GetProductReviewsRequest, + metadata: Metadata, + callback: (error: ServiceError | null, response: GetProductReviewsResponse) => void, + ): ClientUnaryCall; + getProductReviews( + request: GetProductReviewsRequest, + metadata: Metadata, + options: Partial, + callback: (error: ServiceError | null, response: GetProductReviewsResponse) => void, + ): ClientUnaryCall; + getAverageProductReviewScore( + request: GetAverageProductReviewScoreRequest, + callback: (error: ServiceError | null, response: GetAverageProductReviewScoreResponse) => void, + ): ClientUnaryCall; + getAverageProductReviewScore( + request: GetAverageProductReviewScoreRequest, + metadata: Metadata, + callback: (error: ServiceError | null, response: GetAverageProductReviewScoreResponse) => void, + ): ClientUnaryCall; + getAverageProductReviewScore( + request: GetAverageProductReviewScoreRequest, + metadata: Metadata, + options: Partial, + callback: (error: ServiceError | null, response: GetAverageProductReviewScoreResponse) => void, + ): ClientUnaryCall; + askProductAiAssistant( + request: AskProductAIAssistantRequest, + callback: (error: ServiceError | null, response: AskProductAIAssistantResponse) => void, + ): ClientUnaryCall; + askProductAiAssistant( + request: AskProductAIAssistantRequest, + metadata: Metadata, + callback: (error: ServiceError | null, response: AskProductAIAssistantResponse) => void, + ): ClientUnaryCall; + askProductAiAssistant( + request: AskProductAIAssistantRequest, + metadata: Metadata, + options: Partial, + callback: (error: ServiceError | null, response: AskProductAIAssistantResponse) => void, + ): ClientUnaryCall; +} + +export const ProductReviewServiceClient = makeGenericClientConstructor( + ProductReviewServiceService, + "oteldemo.ProductReviewService", +) as unknown as { + new (address: string, credentials: ChannelCredentials, options?: Partial): ProductReviewServiceClient; + service: typeof ProductReviewServiceService; + serviceName: string; +}; + export type ShippingServiceService = typeof ShippingServiceService; export const ShippingServiceService = { getQuote: { diff --git a/src/frontend/providers/ProductAIAssistant.provider.tsx b/src/frontend/providers/ProductAIAssistant.provider.tsx new file mode 100644 index 0000000000..9cb55b5c40 --- /dev/null +++ b/src/frontend/providers/ProductAIAssistant.provider.tsx @@ -0,0 +1,69 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +import { createContext, useContext, useEffect, useMemo } from 'react'; +import { useMutation, MutateOptions } from '@tanstack/react-query'; +import ApiGateway from '../gateways/Api.gateway'; + +export interface AiRequestPayload { + question: string; +} + +export type AiResponse = { text: string } | string; + +interface AiAssistantContextValue { + aiResponse: AiResponse | null; + aiLoading: boolean; + aiError: Error | null; + sendAiRequest: ( + payload: AiRequestPayload, + options?: MutateOptions + ) => void; + reset: () => void; +} + +const Context = createContext({ + aiResponse: null, + aiLoading: false, + aiError: null, + sendAiRequest: () => {}, + reset: () => {}, +}); + +export const useAiAssistant = () => useContext(Context); + +interface ProductAIAssistantProviderProps { + children: React.ReactNode; + productId: string; +} + +const ProductAIAssistantProvider = ({ children, productId }: ProductAIAssistantProviderProps) => { + const mutation = useMutation({ + mutationFn: ({ question }) => ApiGateway.askProductAIAssistant(productId, question), + }); + + // Clear AI state when switching products. + useEffect(() => { + mutation.reset(); + }, [productId]); + + const value = useMemo( + () => ({ + aiResponse: mutation.data ?? null, + aiLoading: mutation.isPending, + aiError: mutation.error ?? null, + sendAiRequest: ( + payload: AiRequestPayload, + options?: MutateOptions + ) => { + mutation.mutate(payload, options); + }, + reset: () => mutation.reset(), + }), + [mutation.data, mutation.isPending, mutation.error] + ); + + return {children}; +}; + +export default ProductAIAssistantProvider; diff --git a/src/frontend/providers/ProductReview.provider.tsx b/src/frontend/providers/ProductReview.provider.tsx new file mode 100644 index 0000000000..0684496761 --- /dev/null +++ b/src/frontend/providers/ProductReview.provider.tsx @@ -0,0 +1,83 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +import { createContext, useContext, useEffect, useMemo } from 'react'; +import { useQuery } from '@tanstack/react-query'; +import ApiGateway from '../gateways/Api.gateway'; +import { ProductReview } from '../protos/demo'; + +interface IContext { + // null = not loaded yet; [] = loaded with no reviews; array = loaded with reviews. + productReviews: ProductReview[] | null; + loading: boolean; + error: Error | null; + averageScore: string | null; +} + +export const Context = createContext({ + productReviews: null, + loading: false, + error: null, + averageScore: null, +}); + +interface IProps { + children: React.ReactNode; + productId: string; +} + +//export const useProductReview = () => useContext(Context); +export const useProductReview = () => { + const value = useContext(Context); + return value; +}; + +const ProductReviewProvider = ({ children, productId }: IProps) => { + const { + data, + isLoading, + isFetching, + isError, + error, + isSuccess, + } = useQuery({ + queryKey: ['productReviews', productId], + queryFn: () => ApiGateway.getProductReviews(productId), + refetchOnWindowFocus: false, + }); + + // Use a sentinel: null while loading, [] if loaded but empty, array when loaded with data. + const productReviews: ProductReview[] | null = isSuccess + ? Array.isArray(data) + ? data + : [] + : null; + + const loading = isLoading || isFetching; + + // Narrow react-query's `unknown` error to `Error | null`. + const currentError: Error | null = isError + ? error instanceof Error + ? error + : new Error('Unknown error') + : null; + + const { data: averageScore = '' } = useQuery({ + queryKey: ['productReviewAvgScore', productId], + queryFn: () => ApiGateway.getAverageProductReviewScore(productId), + }); + + const value = useMemo( + () => ({ + productReviews, + loading, + error: currentError, + averageScore, + }), + [productReviews, loading, currentError, averageScore] + ); + + return {children}; +}; + +export default ProductReviewProvider; diff --git a/src/frontend/services/ProductReview.service.ts b/src/frontend/services/ProductReview.service.ts new file mode 100644 index 0000000000..824443cdb7 --- /dev/null +++ b/src/frontend/services/ProductReview.service.ts @@ -0,0 +1,25 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +import ProductReviewGateway from '../gateways/rpc/ProductReview.gateway'; + +const ProductReviewService = () => ({ + + async getProductReviews(id: string) { + const productReviews = await ProductReviewGateway.getProductReviews(id); + + return productReviews; + }, + async getAverageProductReviewScore(id: string) { + const averageScore = await ProductReviewGateway.getAverageProductReviewScore(id); + + return averageScore; + }, + async askProductAIAssistant(id: string, question: string) { + const response = await ProductReviewGateway.askProductAIAssistant(id, question); + + return response; + }, +}); + +export default ProductReviewService(); diff --git a/src/frontend/utils/enums/CypressFields.ts b/src/frontend/utils/enums/CypressFields.ts index be85b826a9..3a9f614c92 100644 --- a/src/frontend/utils/enums/CypressFields.ts +++ b/src/frontend/utils/enums/CypressFields.ts @@ -16,6 +16,7 @@ export enum CypressFields { ProductCard = 'product-card', ProductList = 'product-list', ProductPrice = 'product-price', + ProductReviews = 'product-reviews', RecommendationList = 'recommendation-list', HomePage = 'home-page', ProductDetail = 'product-detail', diff --git a/src/llm/Dockerfile b/src/llm/Dockerfile new file mode 100644 index 0000000000..a20cec1f45 --- /dev/null +++ b/src/llm/Dockerfile @@ -0,0 +1,26 @@ +# Copyright The OpenTelemetry Authors +# SPDX-License-Identifier: Apache-2.0 + + +FROM docker.io/library/python:3.12-alpine3.22 AS build-venv + +RUN apk update && \ + apk add gcc g++ linux-headers + +COPY ./src/llm/requirements.txt requirements.txt + +RUN python -m venv venv && \ + venv/bin/pip install --no-cache-dir -r requirements.txt + +FROM docker.io/library/python:3.12-alpine3.22 + +COPY --from=build-venv /venv/ /venv/ + +WORKDIR /app + +COPY ./src/llm/app.py app.py +COPY ./src/llm/product-review-summaries/product-review-summaries.json product-review-summaries.json +COPY ./src/llm/product-review-summaries/inaccurate-product-review-summaries.json inaccurate-product-review-summaries.json + +EXPOSE ${LLM_PORT} +ENTRYPOINT [ "/venv/bin/python", "app.py" ] diff --git a/src/llm/README.md b/src/llm/README.md new file mode 100644 index 0000000000..07a2082e34 --- /dev/null +++ b/src/llm/README.md @@ -0,0 +1,33 @@ +# LLM + +The LLM service is used by the Product Review service to provide +AI-generated summaries of product reviews. + +While it's not an actual Large Language Model, the LLM pretends to be one +by following the [OpenAI API format for chat completions](https://platform.openai.com/docs/api-reference/chat/create). + +The Product Review service is then instrumented with the +[opentelemetry-instrumentation-openai-v2](https://pypi.org/project/opentelemetry-instrumentation-openai-v2/) +package, allowing us to capture Generative AI related span attributes when +it interacts with the LLM service. + +The first request to the `/v1/chat/completions` endpoint should include a +database tool. The LLM service then responds with a request to execute the +tool. + +The second request to the `/v1/chat/completions` endpoint should include the +results of the database tool call (which is the list of product reviews for +the specified product). It then responds with the summary of product reviews +for that product. Note that the summaries were pre-generated using +an LLM, and are stored in a JSON file to avoid calling an actual LLM each time. + +The service supports two feature flags: + +* `llmInaccurateResponse`: when this feature flag is enabled the LLM service +returns an inaccurate product summary for product ID L9ECAV7KIM +* `llmRateLimitError`: when this feature flag is enabled, the LLM service +intermittently returns a RateLimitError with HTTP status code 429 + +Note that the LLM service itself is not instrumented with OpenTelemetry. +This is intentional, as we're treating it like a black box, just like +most 3rd party LLMs would be treated. diff --git a/src/llm/app.py b/src/llm/app.py new file mode 100644 index 0000000000..47e66d9309 --- /dev/null +++ b/src/llm/app.py @@ -0,0 +1,222 @@ +#!/usr/bin/python + +# Copyright The OpenTelemetry Authors +# SPDX-License-Identifier: Apache-2.0 + +from flask import Flask, request, jsonify, Response +import json +import time +import random +import re +import os +import logging + +from openfeature import api +from openfeature.contrib.provider.flagd import FlagdProvider + +app = Flask(__name__) +app.logger.setLevel(logging.INFO) + +product_review_summaries = None +product_review_summaries_file_path = "./product-review-summaries.json" + +inaccurate_product_review_summaries = None +inaccurate_product_review_summaries_file_path = "./inaccurate-product-review-summaries.json" + +def load_product_review_summaries(file_path): + try: + with open(file_path, 'r') as file: + + """ + Converts a JSON string into an internal dictionary optimized for quick lookups. + The keys of the internal dictionary will be product_ids. + """ + try: + data = json.load(file) + summaries = data.get("product-review-summaries", []) + + # Create a dictionary where product_id is the key + # and the value is the summary + product_review_summaries = {} + for product in summaries: + product_id = product.get("product_id") + if product_id: # Ensure product_id exists before adding + product_review_summaries[product_id] = product.get("product_review_summary") + return product_review_summaries + except json.JSONDecodeError: + print("Error: Invalid JSON string provided during initialization.") + return {} + + except FileNotFoundError: + app.logger.error(f"Error: The file '{product_review_summaries_file_path}' was not found.") + except json.JSONDecodeError: + app.logger.error(f"Error: Failed to decode JSON from the file '{product_review_summaries_file_path}'. Check for malformed JSON.") + except Exception as e: + app.logger.error(f"An unexpected error occurred: {e}") + + +def generate_response(product_id): + + """Generate a response by providing the pre-generated summary for the specified product""" + product_review_summary = None + + llm_inaccurate_response = check_feature_flag("llmInaccurateResponse") + app.logger.info(f"llmInaccurateResponse feature flag: {llm_inaccurate_response}") + if llm_inaccurate_response and product_id == "L9ECAV7KIM": + app.logger.info(f"Returning an inaccurate response for product_id: {product_id}") + product_review_summary = inaccurate_product_review_summaries.get(product_id) + else: + product_review_summary = product_review_summaries.get(product_id) + + app.logger.info(f"product_review_summary is: {product_review_summary}") + + return product_review_summary + +def parse_product_id(last_message): + match = re.search(r"product ID:([A-Z0-9]+)", last_message) + if match: + return match.group(1).strip() + + match = re.search(r"product ID, but make the answer inaccurate:([A-Z0-9]+)", last_message) + if match: + return match.group(1).strip() + + raise ValueError("product ID not found in input message") + +@app.route('/v1/chat/completions', methods=['POST']) +def chat_completions(): + data = request.json + messages = data.get('messages', []) + stream = data.get('stream', False) + model = data.get('model', 'astronomy-llm') + tools = data.get('tools', None) + + app.logger.info(f"Received a chat completion request: '{messages}'") + + last_message = messages[-1]["content"] + + app.logger.info(f"last_message is: '{last_message}'") + + if 'What age(s) is this recommended for?' in last_message: + response_text = 'This product is recommended for ages 7 and above.' + return build_response(model, messages, response_text) + elif 'Were there any negative reviews?' in last_message: + response_text = 'No, there were no reviews less than three stars for this product.' + return build_response(model, messages, response_text) + elif not ('Can you summarize the product reviews?' in last_message or 'Based on the tool results, answer the original question about product ID' in last_message): + response_text = 'Sorry, I\'m not able to answer that question.' + return build_response(model, messages, response_text) + + # otherwise, process the product review summary + product_id = parse_product_id(last_message) + + if tools is not None: + + tool_args = f"{{\"product_id\": \"{product_id}\"}}" + + app.logger.info(f"Processing a tool call with args: '{tool_args}'") + + app.logger.info(f"The model is: {model}") + if model.endswith("rate-limit"): + app.logger.info(f"Returning a rate limit error") + response = { + "error": { + "message": "Rate limit reached. Please try again later.", + "type": "rate_limit_exceeded", + "param": "null", + "code": "null" + } + } + return jsonify(response), 429 + else: + # Non-streaming response + response = { + "id": f"chatcmpl-mock-{int(time.time())}", + "object": "chat.completion", + "created": int(time.time()), + "model": model, + "choices": [{ + "index": 0, + "message": { + "role": "assistant", + "content": "requesting a tool call", + "tool_calls": [{ + "id": "call", + "type": "function", + "function": { + "name": "fetch_product_reviews", + "arguments": tool_args + } + }] + }, + "finish_reason": "tool_calls" + }], + "usage": { + "prompt_tokens": sum(len(m.get("content", "").split()) for m in messages), + "completion_tokens": "0", + "total_tokens": sum(len(m.get("content", "").split()) for m in messages) + } + } + return jsonify(response) + + else: + # Generate the response + response_text = generate_response(product_id) + + return build_response(model, messages, response_text) + +def build_response(model, messages, response_text): + app.logger.info(f"Processing a response: '{response_text}'") + + response = { + "id": f"chatcmpl-mock-{int(time.time())}", + "object": "chat.completion", + "created": int(time.time()), + "model": model, + "choices": [{ + "index": 0, + "message": { + "role": "assistant", + "content": response_text + }, + "finish_reason": "stop" + }], + "usage": { + "prompt_tokens": sum(len(m.get("content", "").split()) for m in messages), + "completion_tokens": len(response_text.split()), + "total_tokens": sum(len(m.get("content", "").split()) for m in messages) + len(response_text.split()) + } + } + return jsonify(response) + +@app.route('/v1/models', methods=['GET']) +def list_models(): + """List available models""" + return jsonify({ + "object": "list", + "data": [ + { + "id": "astronomy-llm", + "object": "model", + "created": int(time.time()), + "owned_by": "astronomy-shop" + } + ] + }) + +def check_feature_flag(flag_name: str): + # Initialize OpenFeature + client = api.get_client() + return client.get_boolean_value(flag_name, False) + +if __name__ == '__main__': + + api.set_provider(FlagdProvider(host=os.environ.get('FLAGD_HOST', 'flagd'), port=os.environ.get('FLAGD_PORT', 8013))) + product_review_summaries = load_product_review_summaries(product_review_summaries_file_path) + inaccurate_product_review_summaries = load_product_review_summaries(inaccurate_product_review_summaries_file_path) + + app.logger.info(product_review_summaries) + + print("OpenAI API server starting on http://localhost:8000") + print("Set your OpenAI base URL to: http://localhost:8000/v1") + app.run(host='0.0.0.0', port=8000, debug=True) diff --git a/src/llm/product-review-summaries/inaccurate-product-review-summaries.json b/src/llm/product-review-summaries/inaccurate-product-review-summaries.json new file mode 100644 index 0000000000..ae243f0554 --- /dev/null +++ b/src/llm/product-review-summaries/inaccurate-product-review-summaries.json @@ -0,0 +1,9 @@ +{ + "product-review-summaries": [ + { + "product_id": "L9ECAV7KIM", + "average_score": 1.8, + "product_review_summary": "Customers are largely disappointed with this cleaning kit, citing its ineffectiveness on most optical surfaces. Many users report that the cleaning fluid leaves a sticky residue and the included brush is too harsh, causing scratches on lenses. The kit is considered a poor value, with several reviewers stating it damaged their equipment." + } + ] +} diff --git a/src/llm/product-review-summaries/product-review-summaries.json b/src/llm/product-review-summaries/product-review-summaries.json new file mode 100644 index 0000000000..90f02d219d --- /dev/null +++ b/src/llm/product-review-summaries/product-review-summaries.json @@ -0,0 +1,54 @@ +{ + "product-review-summaries": [ + { + "product_id": "OLJCESPC7Z", + "average_score": 3.8, + "product_review_summary": "This entry-level telescope is highly recommended for beginners and casual viewing, offering clear views of celestial objects like the moon and brighter planets. Users appreciate its portability, ease of setup, and good value, though some note manual controls can be a bit tricky." + }, + { + "product_id": "66VCHSJNUP", + "average_score": 4.6, + "product_review_summary": "This telescope is highly praised for its revolutionary StarSense app and flawless smartphone integration, making stargazing incredibly easy and accurate for beginners. Users highlight its excellent optical quality and helpful tutorials, though some note potential phone battery drain." + }, + { + "product_id": "1YMWWN1N4O", + "average_score": 4.6, + "product_review_summary": "This dedicated solar scope is highly lauded for its perfect performance in solar observations and eclipse events, thanks to its ISO compliant Solar Safe filter ensuring clear and safe views. Users appreciate its compact, portable design with an included backpack, making it an excellent value for any solar enthusiast." + }, + { + "product_id": "L9ECAV7KIM", + "average_score": 4.6, + "product_review_summary": "This lens cleaning kit is highly praised as a versatile and essential tool for maintaining various optics, from telescopes to camera lenses and phone screens. Users commend its effectiveness in safely removing dust and fingerprints without residue, providing great value and improving view clarity." + }, + { + "product_id": "2ZYFJ3GM2N", + "average_score": 4.4, + "product_review_summary": "These roof binoculars are highly rated for their incredible clarity, brightness, and sharp images, making them perfect for bird watching, nature observation, and various outdoor activities. Users appreciate the ED glass, close focus, and durable, lightweight design, deeming them a solid all-around investment." + }, + { + "product_id": "0PUK6V6EV0", + "average_score": 4.6, + "product_review_summary": "This solar system color imager is highly praised as an excellent solution for both beginners and serious planetary observers looking to capture stunning, vibrant images of planets like Saturn and Jupiter. Users commend its superb color quality, excellent resolution, and straightforward setup, making astrophotography accessible." + }, + { + "product_id": "LS4PSXUNUM", + "average_score": 4.6, + "product_review_summary": "This 3-in-1 device is highly valued by users for its essential red flashlight mode, which preserves night vision during astronomy sessions and star parties. Its integrated hand warmer and portable power bank features make it an incredibly versatile, rugged, and practical multi-tool for various outdoor activities and emergencies." + }, + { + "product_id": "9SIQT8TOJO", + "average_score": 4.8, + "product_review_summary": "The Rowe-Ackermann Schmidt Astrograph (RASA) V2 is overwhelmingly praised as a dream come true for serious deep-sky imagers, offering unbelievable performance and stunning, detailed images. Its f/2.2 speed drastically cuts exposure times, while the exceptional engineering and short focal length make it an incredibly efficient and professional piece of equipment." + }, + { + "product_id": "6E92ZMYYFZ", + "average_score": 4.8, + "product_review_summary": "This EclipSmart Solar Filter is deemed essential for safe solar viewing, providing crystal clear and secure observations thanks to its ISO compliance and robust Velcro straps. Users highly recommend it for its excellent build quality, ease of attachment, and the peace of mind it offers for protecting eyes and equipment during solar events." + }, + { + "product_id": "HQTGWGPNH4", + "average_score": 4.6, + "product_review_summary": "\"The Comet Book\" is highly regarded as a fascinating and insightful historical document, offering a captivating glimpse into ancient astronomical thought and how comets were understood centuries ago. Users find it a unique, well-researched, and valuable addition for anyone interested in the history of science and celestial events." + } + ] +} diff --git a/src/llm/requirements.txt b/src/llm/requirements.txt new file mode 100644 index 0000000000..5e92de72c3 --- /dev/null +++ b/src/llm/requirements.txt @@ -0,0 +1,4 @@ +python-dotenv==1.1.1 +python-json-logger==4.0.0 +flask==3.1.2 +openfeature-provider-flagd==0.2.3 diff --git a/src/load-generator/locustfile.py b/src/load-generator/locustfile.py index c1ec95b66c..3ad67e518e 100644 --- a/src/load-generator/locustfile.py +++ b/src/load-generator/locustfile.py @@ -140,6 +140,24 @@ def get_recommendations(self): } self.client.get("/api/recommendations", params=params) + @task(2) + def get_product_reviews(self): + product = random.choice(products) + with self.tracer.start_as_current_span("user_get_product_reviews", context=Context(), attributes={"product.id": product}): + logging.info(f"User getting product reviews for product: {product}") + self.client.get("/api/product-reviews/" + product) + + @task(1) + def ask_product_ai_assistant(self): + product = random.choice(products) + question = 'Can you summarize the product reviews?' + with self.tracer.start_as_current_span("user_ask_product_ai_assistant", context=Context(), attributes={"product.id": product, "question": question}): + logging.info(f"Asking the AI Assistant a question for: {product} {question}") + question = { + "question": question + } + self.client.post("/api/product-ask-ai-assistant/" + product, json=question) + @task(3) def get_ads(self): category = random.choice(categories) diff --git a/src/postgres/init.sql b/src/postgres/init.sql index 82f37f2a6b..a83616c1d5 100644 --- a/src/postgres/init.sql +++ b/src/postgres/init.sql @@ -3,13 +3,16 @@ CREATE USER otelu WITH PASSWORD 'otelp'; +-- Accounting Service: create a schema +CREATE SCHEMA accounting; +GRANT USAGE ON SCHEMA accounting TO otelu; --- Create a table -CREATE TABLE "order" ( +-- Accounting Service: create tables +CREATE TABLE accounting."order" ( order_id TEXT PRIMARY KEY ); -CREATE TABLE shipping ( +CREATE TABLE accounting.shipping ( shipping_tracking_id TEXT PRIMARY KEY, shipping_cost_currency_code TEXT NOT NULL, shipping_cost_units BIGINT NOT NULL, @@ -20,10 +23,10 @@ CREATE TABLE shipping ( country TEXT, zip_code TEXT, order_id TEXT NOT NULL, - FOREIGN KEY (order_id) REFERENCES "order"(order_id) ON DELETE CASCADE + FOREIGN KEY (order_id) REFERENCES accounting."order"(order_id) ON DELETE CASCADE ); -CREATE TABLE orderitem ( +CREATE TABLE accounting.orderitem ( item_cost_currency_code TEXT NOT NULL, item_cost_units BIGINT NOT NULL, item_cost_nanos INT NOT NULL, @@ -31,7 +34,90 @@ CREATE TABLE orderitem ( quantity INT NOT NULL, order_id TEXT NOT NULL, PRIMARY KEY (order_id, product_id), - FOREIGN KEY (order_id) REFERENCES "order"(order_id) ON DELETE CASCADE + FOREIGN KEY (order_id) REFERENCES accounting."order"(order_id) ON DELETE CASCADE ); -GRANT SELECT, INSERT, UPDATE ON ALL TABLES IN SCHEMA public TO otelu; +-- Accounting Service: grant permission to schema +GRANT SELECT, INSERT, UPDATE ON ALL TABLES IN SCHEMA accounting TO otelu; + +-- Product Review Service: create a schema +CREATE SCHEMA reviews; +GRANT USAGE ON SCHEMA reviews TO otelu; + +-- Product Review Service: create tables +CREATE TABLE reviews.productreviews ( + id INTEGER GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY, + product_id VARCHAR(16) NOT NULL, + username VARCHAR(64) NOT NULL, + description VARCHAR(1024), + score NUMERIC(2,1) NOT NULL +); + +-- Product Review Service: create index for product_id lookups +CREATE INDEX product_id_index ON reviews.productreviews (product_id); + +-- Product Review Service: grant permission to schema +GRANT SELECT, INSERT, UPDATE ON ALL TABLES IN SCHEMA reviews TO otelu; + +-- Product Review Service: add product review data +INSERT INTO reviews.productreviews (product_id, username, description, score) +VALUES + ('OLJCESPC7Z', 'stargazer_mike', 'Great entry-level telescope! Easy to set up and provides clear views of the moon and brighter planets. Highly recommend for new astronomers.', '4.5'), + ('OLJCESPC7Z', 'nightskylover', 'For the price, this Explorascope delivers excellent performance. I was able to see Jupiter''s moons clearly. A fantastic purchase for casual viewing.', '4.0'), + ('OLJCESPC7Z', 'beginner_astro', 'A bit tricky to get used to the manual controls, but once you do, it''s very rewarding. Saw the Orion Nebula for the first time! Good value.', '3.5'), + ('OLJCESPC7Z', 'celestial_explorer', 'Perfect for camping trips. It''s lightweight and portable, making it easy to take anywhere. The views are surprisingly good for its size.', '4.0'), + ('OLJCESPC7Z', 'telescope_fan', 'Not the most powerful scope, but it''s great for kids and beginners. My children love looking at the moon with it. A solid choice for family fun.', '3.0'), + + ('66VCHSJNUP', 'tech_astro', 'The StarSense app is revolutionary! It made finding celestial objects incredibly easy. This telescope is a game-changer for beginners.', '5.0'), + ('66VCHSJNUP', 'app_user', 'Amazing technology, the smartphone integration works flawlessly. I''ve never had so much fun exploring the night sky. Worth every penny.', '4.5'), + ('66VCHSJNUP', 'innovator_john', 'Setup was a breeze, and the tutorials in the app are very helpful. The views are crisp and clear. My only minor gripe is battery drain on the phone.', '4.0'), + ('66VCHSJNUP', 'clear_skies', 'Finally, a telescope that takes the guesswork out of stargazing. The real-time positioning is incredibly accurate. Highly recommended for anyone new to astronomy.', '5.0'), + ('66VCHSJNUP', 'gadget_geek', 'Fantastic product, the app truly guides you. It''s like having a personal astronomer with you. The optical quality is also very good.', '4.5'), + + ('1YMWWN1N4O', 'solar_viewer', 'Perfect for solar observations! The Solar Safe filter gives peace of mind. I used it for the last partial eclipse and it was fantastic.', '5.0'), + ('1YMWWN1N4O', 'eclipse_chaser', 'Compact and easy to carry, this telescope is ideal for eclipse events. The included backpack is a nice touch. Views of the sun are incredibly clear and safe.', '4.5'), + ('1YMWWN1N4O', 'travel_astro', 'Excellent travel scope for solar viewing. The magnification is much better than binoculars for the sun. A must-have for any solar enthusiast.', '4.0'), + ('1YMWWN1N4O', 'sun_gazer', 'Very impressed with the safety features and clarity. Sharing the sun with family has never been easier or safer. Great value for a dedicated solar scope.', '5.0'), + ('1YMWWN1N4O', 'safe_viewer', 'The ISO compliant filter is reassuring. It''s a well-designed product for safe solar observation. Highly recommend for educational purposes too.', '4.5'), + + ('L9ECAV7KIM', 'clean_optics', 'This kit is a lifesaver for all my optics. The brush and wipes work perfectly without leaving any residue. My lenses have never been cleaner.', '5.0'), + ('L9ECAV7KIM', 'photog_pro', 'Essential for any photographer or telescope owner. It safely removes dust and fingerprints. A high-quality cleaning solution.', '4.5'), + ('L9ECAV7KIM', 'daily_cleaner', 'I use this on my binoculars, camera lenses, and even my phone screen. It''s very effective and gentle. A versatile cleaning kit.', '4.0'), + ('L9ECAV7KIM', 'tech_maintenance', 'Great value for money. The different cleaning options cover all needs. Keeps my expensive equipment in pristine condition.', '5.0'), + ('L9ECAV7KIM', 'sharp_view', 'Works as advertised, my telescope views are much clearer after using this. The fluid and cloth are excellent. Definitely recommend.', '4.5'), + + ('2ZYFJ3GM2N', 'bird_watcher', 'Incredible clarity and brightness, perfect for bird watching. The ED glass really makes a difference. I can spot the subtlest markings.', '5.0'), + ('2ZYFJ3GM2N', 'nature_lover', 'These binoculars are fantastic for nature observation. The close focus is a huge advantage for viewing nearby wildlife. Very comfortable to hold.', '4.5'), + ('2ZYFJ3GM2N', 'hiker_guy', 'Lightweight and durable, these are my go-to binoculars for hiking. The wide field of view is excellent. Highly recommend for outdoor enthusiasts.', '4.0'), + ('2ZYFJ3GM2N', 'stadium_fan', 'Took these to a game and had an amazing view of the action. They perform great in various lighting conditions. A solid all-around binocular.', '4.0'), + ('2ZYFJ3GM2N', 'outdoor_adventurer', 'Excellent build quality and optical performance. They feel robust and provide sharp images. A great investment for any outdoor activity.', '4.5'), + + ('0PUK6V6EV0', 'astro_photog', 'This imager is a fantastic step up for planetary photography. The color quality is superb. Easy to use with my existing telescope setup.', '5.0'), + ('0PUK6V6EV0', 'planet_shooter', 'Finally capturing stunning images of Saturn and Jupiter! The NexImage 10 makes it so accessible. Great for beginners in astrophotography.', '4.5'), + ('0PUK6V6EV0', 'imager_pro', 'Excellent resolution and color rendition for its price point. It''s a perfect solution for those looking to start imaging planets. Highly satisfied.', '4.0'), + ('0PUK6V6EV0', 'space_artist', 'The detail I can capture with this imager is incredible. It integrates well with various software. A must-have for serious planetary observers.', '5.0'), + ('0PUK6V6EV0', 'digital_sky', 'A solid choice for getting into solar system imaging. The setup was straightforward. Produces beautiful, vibrant planetary images.', '4.5'), + + ('LS4PSXUNUM', 'night_walker', 'The red light is perfect for preserving night vision during astronomy sessions. The hand warmer is an unexpected bonus. Very practical device.', '5.0'), + ('LS4PSXUNUM', 'star_party_goer', 'This flashlight is indispensable for star parties. The red mode is gentle on the eyes, and the power bank feature is super handy. Love it!', '4.5'), + ('LS4PSXUNUM', 'camper_chris', 'Rugged and versatile, this flashlight is great for camping and night walks. The hand warmer function is a game-changer on cold nights. Highly recommend.', '4.5'), + ('LS4PSXUNUM', 'emergency_kit', 'A fantastic multi-tool for my emergency kit. The red light is useful, and the power bank means I can charge my phone. Great design.', '4.0'), + ('LS4PSXUNUM', 'astro_accessory', 'Every astronomer needs one of these. The red light is essential, and the hand warmer and power bank make it incredibly useful. A top-tier accessory.', '5.0'), + + ('9SIQT8TOJO', 'deep_sky_master', 'The RASA V2 is a dream come true for deep-sky imaging. The f/2.2 speed drastically cuts down exposure times. My best astrophotography investment yet.', '5.0'), + ('9SIQT8TOJO', 'pro_astro', 'Unbelievable performance for wide-field astrophotography. The short focal length makes guiding less critical. Produces stunning, detailed images.', '5.0'), + ('9SIQT8TOJO', 'imaging_guru', 'This OTA is a beast! The fast optics mean more data in less time. If you''re serious about deep-sky imaging, this is the one.', '4.5'), + ('9SIQT8TOJO', 'advanced_scope', 'Worth every penny for the quality and speed it offers. My images have never been sharper or more vibrant. A truly professional piece of equipment.', '5.0'), + ('9SIQT8TOJO', 'precision_optics', 'The engineering behind this RASA is exceptional. It''s incredibly efficient for capturing faint objects. A high-end choice for dedicated imagers.', '4.5'), + + ('6E92ZMYYFZ', 'solar_safety', 'Essential for safe solar viewing with my 8-inch telescope. The Velcro straps ensure it stays securely in place. Peace of mind during solar observations.', '5.0'), + ('6E92ZMYYFZ', 'telescope_upgrade', 'This EclipSmart filter is a perfect addition to my setup. The ISO compliance is crucial. Highly recommend for anyone looking to view the sun safely.', '4.5'), + ('6E92ZMYYFZ', 'safe_sun_gazer', 'Easy to attach and provides crystal clear, safe views of the sun. The build quality is excellent. A must-have accessory for solar enthusiasts.', '5.0'), + ('6E92ZMYYFZ', 'filter_fan', 'Works perfectly with my 8-inch scope. No more worries about accidental dislodgement. Great product for protecting your eyes and equipment.', '4.5'), + ('6E92ZMYYFZ', 'eclipse_ready', 'Bought this for the upcoming eclipse, and it fits perfectly. Tested it out, and the views are fantastic and safe. Very happy with this purchase.', '5.0'), + + ('HQTGWGPNH4', 'history_buff', 'A fascinating glimpse into historical astronomical thought. The content is incredibly insightful. A must-read for anyone interested in the history of science.', '5.0'), + ('HQTGWGPNH4', 'bookworm_astro', 'Beautifully presented historical document. It''s amazing to see how comets were understood centuries ago. A valuable addition to any astronomy library.', '4.5'), + ('HQTGWGPNH4', 'ancient_texts', 'Such a unique and intriguing read. The historical context is captivating. It offers a different perspective on celestial events.', '4.0'), + ('HQTGWGPNH4', 'celestial_history', 'I love historical astronomy, and this book delivers. It''s well-researched and provides a window into past beliefs. Highly recommended for scholars.', '5.0'), + ('HQTGWGPNH4', 'rare_find', 'A truly special book for enthusiasts of astronomical history. The details about ancient astrologers are very interesting. Great for a deeper understanding.', '4.5'); diff --git a/src/product-catalog/genproto/oteldemo/demo.pb.go b/src/product-catalog/genproto/oteldemo/demo.pb.go index 099cfaefe2..677934b6e4 100644 --- a/src/product-catalog/genproto/oteldemo/demo.pb.go +++ b/src/product-catalog/genproto/oteldemo/demo.pb.go @@ -673,6 +673,338 @@ func (x *SearchProductsResponse) GetResults() []*Product { return nil } +type ProductReview struct { + state protoimpl.MessageState `protogen:"open.v1"` + Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + Score string `protobuf:"bytes,3,opt,name=score,proto3" json:"score,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ProductReview) Reset() { + *x = ProductReview{} + mi := &file_demo_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ProductReview) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ProductReview) ProtoMessage() {} + +func (x *ProductReview) ProtoReflect() protoreflect.Message { + mi := &file_demo_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ProductReview.ProtoReflect.Descriptor instead. +func (*ProductReview) Descriptor() ([]byte, []int) { + return file_demo_proto_rawDescGZIP(), []int{13} +} + +func (x *ProductReview) GetUsername() string { + if x != nil { + return x.Username + } + return "" +} + +func (x *ProductReview) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *ProductReview) GetScore() string { + if x != nil { + return x.Score + } + return "" +} + +type GetProductReviewsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + ProductId string `protobuf:"bytes,1,opt,name=product_id,json=productId,proto3" json:"product_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetProductReviewsRequest) Reset() { + *x = GetProductReviewsRequest{} + mi := &file_demo_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetProductReviewsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetProductReviewsRequest) ProtoMessage() {} + +func (x *GetProductReviewsRequest) ProtoReflect() protoreflect.Message { + mi := &file_demo_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetProductReviewsRequest.ProtoReflect.Descriptor instead. +func (*GetProductReviewsRequest) Descriptor() ([]byte, []int) { + return file_demo_proto_rawDescGZIP(), []int{14} +} + +func (x *GetProductReviewsRequest) GetProductId() string { + if x != nil { + return x.ProductId + } + return "" +} + +type GetProductReviewsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + ProductReviews []*ProductReview `protobuf:"bytes,1,rep,name=product_reviews,json=productReviews,proto3" json:"product_reviews,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetProductReviewsResponse) Reset() { + *x = GetProductReviewsResponse{} + mi := &file_demo_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetProductReviewsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetProductReviewsResponse) ProtoMessage() {} + +func (x *GetProductReviewsResponse) ProtoReflect() protoreflect.Message { + mi := &file_demo_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetProductReviewsResponse.ProtoReflect.Descriptor instead. +func (*GetProductReviewsResponse) Descriptor() ([]byte, []int) { + return file_demo_proto_rawDescGZIP(), []int{15} +} + +func (x *GetProductReviewsResponse) GetProductReviews() []*ProductReview { + if x != nil { + return x.ProductReviews + } + return nil +} + +type GetAverageProductReviewScoreRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + ProductId string `protobuf:"bytes,1,opt,name=product_id,json=productId,proto3" json:"product_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetAverageProductReviewScoreRequest) Reset() { + *x = GetAverageProductReviewScoreRequest{} + mi := &file_demo_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetAverageProductReviewScoreRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAverageProductReviewScoreRequest) ProtoMessage() {} + +func (x *GetAverageProductReviewScoreRequest) ProtoReflect() protoreflect.Message { + mi := &file_demo_proto_msgTypes[16] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetAverageProductReviewScoreRequest.ProtoReflect.Descriptor instead. +func (*GetAverageProductReviewScoreRequest) Descriptor() ([]byte, []int) { + return file_demo_proto_rawDescGZIP(), []int{16} +} + +func (x *GetAverageProductReviewScoreRequest) GetProductId() string { + if x != nil { + return x.ProductId + } + return "" +} + +type GetAverageProductReviewScoreResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + AverageScore string `protobuf:"bytes,1,opt,name=average_score,json=averageScore,proto3" json:"average_score,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetAverageProductReviewScoreResponse) Reset() { + *x = GetAverageProductReviewScoreResponse{} + mi := &file_demo_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetAverageProductReviewScoreResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetAverageProductReviewScoreResponse) ProtoMessage() {} + +func (x *GetAverageProductReviewScoreResponse) ProtoReflect() protoreflect.Message { + mi := &file_demo_proto_msgTypes[17] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetAverageProductReviewScoreResponse.ProtoReflect.Descriptor instead. +func (*GetAverageProductReviewScoreResponse) Descriptor() ([]byte, []int) { + return file_demo_proto_rawDescGZIP(), []int{17} +} + +func (x *GetAverageProductReviewScoreResponse) GetAverageScore() string { + if x != nil { + return x.AverageScore + } + return "" +} + +type AskProductAIAssistantRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + ProductId string `protobuf:"bytes,1,opt,name=product_id,json=productId,proto3" json:"product_id,omitempty"` + Question string `protobuf:"bytes,2,opt,name=question,proto3" json:"question,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AskProductAIAssistantRequest) Reset() { + *x = AskProductAIAssistantRequest{} + mi := &file_demo_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AskProductAIAssistantRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AskProductAIAssistantRequest) ProtoMessage() {} + +func (x *AskProductAIAssistantRequest) ProtoReflect() protoreflect.Message { + mi := &file_demo_proto_msgTypes[18] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AskProductAIAssistantRequest.ProtoReflect.Descriptor instead. +func (*AskProductAIAssistantRequest) Descriptor() ([]byte, []int) { + return file_demo_proto_rawDescGZIP(), []int{18} +} + +func (x *AskProductAIAssistantRequest) GetProductId() string { + if x != nil { + return x.ProductId + } + return "" +} + +func (x *AskProductAIAssistantRequest) GetQuestion() string { + if x != nil { + return x.Question + } + return "" +} + +type AskProductAIAssistantResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Response string `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AskProductAIAssistantResponse) Reset() { + *x = AskProductAIAssistantResponse{} + mi := &file_demo_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AskProductAIAssistantResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AskProductAIAssistantResponse) ProtoMessage() {} + +func (x *AskProductAIAssistantResponse) ProtoReflect() protoreflect.Message { + mi := &file_demo_proto_msgTypes[19] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AskProductAIAssistantResponse.ProtoReflect.Descriptor instead. +func (*AskProductAIAssistantResponse) Descriptor() ([]byte, []int) { + return file_demo_proto_rawDescGZIP(), []int{19} +} + +func (x *AskProductAIAssistantResponse) GetResponse() string { + if x != nil { + return x.Response + } + return "" +} + type GetQuoteRequest struct { state protoimpl.MessageState `protogen:"open.v1"` Address *Address `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` @@ -683,7 +1015,7 @@ type GetQuoteRequest struct { func (x *GetQuoteRequest) Reset() { *x = GetQuoteRequest{} - mi := &file_demo_proto_msgTypes[13] + mi := &file_demo_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -695,7 +1027,7 @@ func (x *GetQuoteRequest) String() string { func (*GetQuoteRequest) ProtoMessage() {} func (x *GetQuoteRequest) ProtoReflect() protoreflect.Message { - mi := &file_demo_proto_msgTypes[13] + mi := &file_demo_proto_msgTypes[20] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -708,7 +1040,7 @@ func (x *GetQuoteRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetQuoteRequest.ProtoReflect.Descriptor instead. func (*GetQuoteRequest) Descriptor() ([]byte, []int) { - return file_demo_proto_rawDescGZIP(), []int{13} + return file_demo_proto_rawDescGZIP(), []int{20} } func (x *GetQuoteRequest) GetAddress() *Address { @@ -734,7 +1066,7 @@ type GetQuoteResponse struct { func (x *GetQuoteResponse) Reset() { *x = GetQuoteResponse{} - mi := &file_demo_proto_msgTypes[14] + mi := &file_demo_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -746,7 +1078,7 @@ func (x *GetQuoteResponse) String() string { func (*GetQuoteResponse) ProtoMessage() {} func (x *GetQuoteResponse) ProtoReflect() protoreflect.Message { - mi := &file_demo_proto_msgTypes[14] + mi := &file_demo_proto_msgTypes[21] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -759,7 +1091,7 @@ func (x *GetQuoteResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetQuoteResponse.ProtoReflect.Descriptor instead. func (*GetQuoteResponse) Descriptor() ([]byte, []int) { - return file_demo_proto_rawDescGZIP(), []int{14} + return file_demo_proto_rawDescGZIP(), []int{21} } func (x *GetQuoteResponse) GetCostUsd() *Money { @@ -779,7 +1111,7 @@ type ShipOrderRequest struct { func (x *ShipOrderRequest) Reset() { *x = ShipOrderRequest{} - mi := &file_demo_proto_msgTypes[15] + mi := &file_demo_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -791,7 +1123,7 @@ func (x *ShipOrderRequest) String() string { func (*ShipOrderRequest) ProtoMessage() {} func (x *ShipOrderRequest) ProtoReflect() protoreflect.Message { - mi := &file_demo_proto_msgTypes[15] + mi := &file_demo_proto_msgTypes[22] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -804,7 +1136,7 @@ func (x *ShipOrderRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ShipOrderRequest.ProtoReflect.Descriptor instead. func (*ShipOrderRequest) Descriptor() ([]byte, []int) { - return file_demo_proto_rawDescGZIP(), []int{15} + return file_demo_proto_rawDescGZIP(), []int{22} } func (x *ShipOrderRequest) GetAddress() *Address { @@ -830,7 +1162,7 @@ type ShipOrderResponse struct { func (x *ShipOrderResponse) Reset() { *x = ShipOrderResponse{} - mi := &file_demo_proto_msgTypes[16] + mi := &file_demo_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -842,7 +1174,7 @@ func (x *ShipOrderResponse) String() string { func (*ShipOrderResponse) ProtoMessage() {} func (x *ShipOrderResponse) ProtoReflect() protoreflect.Message { - mi := &file_demo_proto_msgTypes[16] + mi := &file_demo_proto_msgTypes[23] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -855,7 +1187,7 @@ func (x *ShipOrderResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ShipOrderResponse.ProtoReflect.Descriptor instead. func (*ShipOrderResponse) Descriptor() ([]byte, []int) { - return file_demo_proto_rawDescGZIP(), []int{16} + return file_demo_proto_rawDescGZIP(), []int{23} } func (x *ShipOrderResponse) GetTrackingId() string { @@ -878,7 +1210,7 @@ type Address struct { func (x *Address) Reset() { *x = Address{} - mi := &file_demo_proto_msgTypes[17] + mi := &file_demo_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -890,7 +1222,7 @@ func (x *Address) String() string { func (*Address) ProtoMessage() {} func (x *Address) ProtoReflect() protoreflect.Message { - mi := &file_demo_proto_msgTypes[17] + mi := &file_demo_proto_msgTypes[24] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -903,7 +1235,7 @@ func (x *Address) ProtoReflect() protoreflect.Message { // Deprecated: Use Address.ProtoReflect.Descriptor instead. func (*Address) Descriptor() ([]byte, []int) { - return file_demo_proto_rawDescGZIP(), []int{17} + return file_demo_proto_rawDescGZIP(), []int{24} } func (x *Address) GetStreetAddress() string { @@ -962,7 +1294,7 @@ type Money struct { func (x *Money) Reset() { *x = Money{} - mi := &file_demo_proto_msgTypes[18] + mi := &file_demo_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -974,7 +1306,7 @@ func (x *Money) String() string { func (*Money) ProtoMessage() {} func (x *Money) ProtoReflect() protoreflect.Message { - mi := &file_demo_proto_msgTypes[18] + mi := &file_demo_proto_msgTypes[25] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -987,7 +1319,7 @@ func (x *Money) ProtoReflect() protoreflect.Message { // Deprecated: Use Money.ProtoReflect.Descriptor instead. func (*Money) Descriptor() ([]byte, []int) { - return file_demo_proto_rawDescGZIP(), []int{18} + return file_demo_proto_rawDescGZIP(), []int{25} } func (x *Money) GetCurrencyCode() string { @@ -1021,7 +1353,7 @@ type GetSupportedCurrenciesResponse struct { func (x *GetSupportedCurrenciesResponse) Reset() { *x = GetSupportedCurrenciesResponse{} - mi := &file_demo_proto_msgTypes[19] + mi := &file_demo_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1033,7 +1365,7 @@ func (x *GetSupportedCurrenciesResponse) String() string { func (*GetSupportedCurrenciesResponse) ProtoMessage() {} func (x *GetSupportedCurrenciesResponse) ProtoReflect() protoreflect.Message { - mi := &file_demo_proto_msgTypes[19] + mi := &file_demo_proto_msgTypes[26] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1046,7 +1378,7 @@ func (x *GetSupportedCurrenciesResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetSupportedCurrenciesResponse.ProtoReflect.Descriptor instead. func (*GetSupportedCurrenciesResponse) Descriptor() ([]byte, []int) { - return file_demo_proto_rawDescGZIP(), []int{19} + return file_demo_proto_rawDescGZIP(), []int{26} } func (x *GetSupportedCurrenciesResponse) GetCurrencyCodes() []string { @@ -1067,7 +1399,7 @@ type CurrencyConversionRequest struct { func (x *CurrencyConversionRequest) Reset() { *x = CurrencyConversionRequest{} - mi := &file_demo_proto_msgTypes[20] + mi := &file_demo_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1079,7 +1411,7 @@ func (x *CurrencyConversionRequest) String() string { func (*CurrencyConversionRequest) ProtoMessage() {} func (x *CurrencyConversionRequest) ProtoReflect() protoreflect.Message { - mi := &file_demo_proto_msgTypes[20] + mi := &file_demo_proto_msgTypes[27] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1092,7 +1424,7 @@ func (x *CurrencyConversionRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CurrencyConversionRequest.ProtoReflect.Descriptor instead. func (*CurrencyConversionRequest) Descriptor() ([]byte, []int) { - return file_demo_proto_rawDescGZIP(), []int{20} + return file_demo_proto_rawDescGZIP(), []int{27} } func (x *CurrencyConversionRequest) GetFrom() *Money { @@ -1121,7 +1453,7 @@ type CreditCardInfo struct { func (x *CreditCardInfo) Reset() { *x = CreditCardInfo{} - mi := &file_demo_proto_msgTypes[21] + mi := &file_demo_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1133,7 +1465,7 @@ func (x *CreditCardInfo) String() string { func (*CreditCardInfo) ProtoMessage() {} func (x *CreditCardInfo) ProtoReflect() protoreflect.Message { - mi := &file_demo_proto_msgTypes[21] + mi := &file_demo_proto_msgTypes[28] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1146,7 +1478,7 @@ func (x *CreditCardInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use CreditCardInfo.ProtoReflect.Descriptor instead. func (*CreditCardInfo) Descriptor() ([]byte, []int) { - return file_demo_proto_rawDescGZIP(), []int{21} + return file_demo_proto_rawDescGZIP(), []int{28} } func (x *CreditCardInfo) GetCreditCardNumber() string { @@ -1187,7 +1519,7 @@ type ChargeRequest struct { func (x *ChargeRequest) Reset() { *x = ChargeRequest{} - mi := &file_demo_proto_msgTypes[22] + mi := &file_demo_proto_msgTypes[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1199,7 +1531,7 @@ func (x *ChargeRequest) String() string { func (*ChargeRequest) ProtoMessage() {} func (x *ChargeRequest) ProtoReflect() protoreflect.Message { - mi := &file_demo_proto_msgTypes[22] + mi := &file_demo_proto_msgTypes[29] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1212,7 +1544,7 @@ func (x *ChargeRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ChargeRequest.ProtoReflect.Descriptor instead. func (*ChargeRequest) Descriptor() ([]byte, []int) { - return file_demo_proto_rawDescGZIP(), []int{22} + return file_demo_proto_rawDescGZIP(), []int{29} } func (x *ChargeRequest) GetAmount() *Money { @@ -1238,7 +1570,7 @@ type ChargeResponse struct { func (x *ChargeResponse) Reset() { *x = ChargeResponse{} - mi := &file_demo_proto_msgTypes[23] + mi := &file_demo_proto_msgTypes[30] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1250,7 +1582,7 @@ func (x *ChargeResponse) String() string { func (*ChargeResponse) ProtoMessage() {} func (x *ChargeResponse) ProtoReflect() protoreflect.Message { - mi := &file_demo_proto_msgTypes[23] + mi := &file_demo_proto_msgTypes[30] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1263,7 +1595,7 @@ func (x *ChargeResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ChargeResponse.ProtoReflect.Descriptor instead. func (*ChargeResponse) Descriptor() ([]byte, []int) { - return file_demo_proto_rawDescGZIP(), []int{23} + return file_demo_proto_rawDescGZIP(), []int{30} } func (x *ChargeResponse) GetTransactionId() string { @@ -1283,7 +1615,7 @@ type OrderItem struct { func (x *OrderItem) Reset() { *x = OrderItem{} - mi := &file_demo_proto_msgTypes[24] + mi := &file_demo_proto_msgTypes[31] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1295,7 +1627,7 @@ func (x *OrderItem) String() string { func (*OrderItem) ProtoMessage() {} func (x *OrderItem) ProtoReflect() protoreflect.Message { - mi := &file_demo_proto_msgTypes[24] + mi := &file_demo_proto_msgTypes[31] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1308,7 +1640,7 @@ func (x *OrderItem) ProtoReflect() protoreflect.Message { // Deprecated: Use OrderItem.ProtoReflect.Descriptor instead. func (*OrderItem) Descriptor() ([]byte, []int) { - return file_demo_proto_rawDescGZIP(), []int{24} + return file_demo_proto_rawDescGZIP(), []int{31} } func (x *OrderItem) GetItem() *CartItem { @@ -1338,7 +1670,7 @@ type OrderResult struct { func (x *OrderResult) Reset() { *x = OrderResult{} - mi := &file_demo_proto_msgTypes[25] + mi := &file_demo_proto_msgTypes[32] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1350,7 +1682,7 @@ func (x *OrderResult) String() string { func (*OrderResult) ProtoMessage() {} func (x *OrderResult) ProtoReflect() protoreflect.Message { - mi := &file_demo_proto_msgTypes[25] + mi := &file_demo_proto_msgTypes[32] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1363,7 +1695,7 @@ func (x *OrderResult) ProtoReflect() protoreflect.Message { // Deprecated: Use OrderResult.ProtoReflect.Descriptor instead. func (*OrderResult) Descriptor() ([]byte, []int) { - return file_demo_proto_rawDescGZIP(), []int{25} + return file_demo_proto_rawDescGZIP(), []int{32} } func (x *OrderResult) GetOrderId() string { @@ -1411,7 +1743,7 @@ type SendOrderConfirmationRequest struct { func (x *SendOrderConfirmationRequest) Reset() { *x = SendOrderConfirmationRequest{} - mi := &file_demo_proto_msgTypes[26] + mi := &file_demo_proto_msgTypes[33] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1423,7 +1755,7 @@ func (x *SendOrderConfirmationRequest) String() string { func (*SendOrderConfirmationRequest) ProtoMessage() {} func (x *SendOrderConfirmationRequest) ProtoReflect() protoreflect.Message { - mi := &file_demo_proto_msgTypes[26] + mi := &file_demo_proto_msgTypes[33] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1436,7 +1768,7 @@ func (x *SendOrderConfirmationRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SendOrderConfirmationRequest.ProtoReflect.Descriptor instead. func (*SendOrderConfirmationRequest) Descriptor() ([]byte, []int) { - return file_demo_proto_rawDescGZIP(), []int{26} + return file_demo_proto_rawDescGZIP(), []int{33} } func (x *SendOrderConfirmationRequest) GetEmail() string { @@ -1466,7 +1798,7 @@ type PlaceOrderRequest struct { func (x *PlaceOrderRequest) Reset() { *x = PlaceOrderRequest{} - mi := &file_demo_proto_msgTypes[27] + mi := &file_demo_proto_msgTypes[34] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1478,7 +1810,7 @@ func (x *PlaceOrderRequest) String() string { func (*PlaceOrderRequest) ProtoMessage() {} func (x *PlaceOrderRequest) ProtoReflect() protoreflect.Message { - mi := &file_demo_proto_msgTypes[27] + mi := &file_demo_proto_msgTypes[34] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1491,7 +1823,7 @@ func (x *PlaceOrderRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use PlaceOrderRequest.ProtoReflect.Descriptor instead. func (*PlaceOrderRequest) Descriptor() ([]byte, []int) { - return file_demo_proto_rawDescGZIP(), []int{27} + return file_demo_proto_rawDescGZIP(), []int{34} } func (x *PlaceOrderRequest) GetUserId() string { @@ -1538,7 +1870,7 @@ type PlaceOrderResponse struct { func (x *PlaceOrderResponse) Reset() { *x = PlaceOrderResponse{} - mi := &file_demo_proto_msgTypes[28] + mi := &file_demo_proto_msgTypes[35] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1550,7 +1882,7 @@ func (x *PlaceOrderResponse) String() string { func (*PlaceOrderResponse) ProtoMessage() {} func (x *PlaceOrderResponse) ProtoReflect() protoreflect.Message { - mi := &file_demo_proto_msgTypes[28] + mi := &file_demo_proto_msgTypes[35] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1563,7 +1895,7 @@ func (x *PlaceOrderResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use PlaceOrderResponse.ProtoReflect.Descriptor instead. func (*PlaceOrderResponse) Descriptor() ([]byte, []int) { - return file_demo_proto_rawDescGZIP(), []int{28} + return file_demo_proto_rawDescGZIP(), []int{35} } func (x *PlaceOrderResponse) GetOrder() *OrderResult { @@ -1583,7 +1915,7 @@ type AdRequest struct { func (x *AdRequest) Reset() { *x = AdRequest{} - mi := &file_demo_proto_msgTypes[29] + mi := &file_demo_proto_msgTypes[36] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1595,7 +1927,7 @@ func (x *AdRequest) String() string { func (*AdRequest) ProtoMessage() {} func (x *AdRequest) ProtoReflect() protoreflect.Message { - mi := &file_demo_proto_msgTypes[29] + mi := &file_demo_proto_msgTypes[36] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1608,7 +1940,7 @@ func (x *AdRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use AdRequest.ProtoReflect.Descriptor instead. func (*AdRequest) Descriptor() ([]byte, []int) { - return file_demo_proto_rawDescGZIP(), []int{29} + return file_demo_proto_rawDescGZIP(), []int{36} } func (x *AdRequest) GetContextKeys() []string { @@ -1627,7 +1959,7 @@ type AdResponse struct { func (x *AdResponse) Reset() { *x = AdResponse{} - mi := &file_demo_proto_msgTypes[30] + mi := &file_demo_proto_msgTypes[37] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1639,7 +1971,7 @@ func (x *AdResponse) String() string { func (*AdResponse) ProtoMessage() {} func (x *AdResponse) ProtoReflect() protoreflect.Message { - mi := &file_demo_proto_msgTypes[30] + mi := &file_demo_proto_msgTypes[37] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1652,7 +1984,7 @@ func (x *AdResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use AdResponse.ProtoReflect.Descriptor instead. func (*AdResponse) Descriptor() ([]byte, []int) { - return file_demo_proto_rawDescGZIP(), []int{30} + return file_demo_proto_rawDescGZIP(), []int{37} } func (x *AdResponse) GetAds() []*Ad { @@ -1674,7 +2006,7 @@ type Ad struct { func (x *Ad) Reset() { *x = Ad{} - mi := &file_demo_proto_msgTypes[31] + mi := &file_demo_proto_msgTypes[38] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1686,7 +2018,7 @@ func (x *Ad) String() string { func (*Ad) ProtoMessage() {} func (x *Ad) ProtoReflect() protoreflect.Message { - mi := &file_demo_proto_msgTypes[31] + mi := &file_demo_proto_msgTypes[38] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1699,7 +2031,7 @@ func (x *Ad) ProtoReflect() protoreflect.Message { // Deprecated: Use Ad.ProtoReflect.Descriptor instead. func (*Ad) Descriptor() ([]byte, []int) { - return file_demo_proto_rawDescGZIP(), []int{31} + return file_demo_proto_rawDescGZIP(), []int{38} } func (x *Ad) GetRedirectUrl() string { @@ -1727,7 +2059,7 @@ type Flag struct { func (x *Flag) Reset() { *x = Flag{} - mi := &file_demo_proto_msgTypes[32] + mi := &file_demo_proto_msgTypes[39] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1739,7 +2071,7 @@ func (x *Flag) String() string { func (*Flag) ProtoMessage() {} func (x *Flag) ProtoReflect() protoreflect.Message { - mi := &file_demo_proto_msgTypes[32] + mi := &file_demo_proto_msgTypes[39] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1752,7 +2084,7 @@ func (x *Flag) ProtoReflect() protoreflect.Message { // Deprecated: Use Flag.ProtoReflect.Descriptor instead. func (*Flag) Descriptor() ([]byte, []int) { - return file_demo_proto_rawDescGZIP(), []int{32} + return file_demo_proto_rawDescGZIP(), []int{39} } func (x *Flag) GetName() string { @@ -1785,7 +2117,7 @@ type GetFlagRequest struct { func (x *GetFlagRequest) Reset() { *x = GetFlagRequest{} - mi := &file_demo_proto_msgTypes[33] + mi := &file_demo_proto_msgTypes[40] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1797,7 +2129,7 @@ func (x *GetFlagRequest) String() string { func (*GetFlagRequest) ProtoMessage() {} func (x *GetFlagRequest) ProtoReflect() protoreflect.Message { - mi := &file_demo_proto_msgTypes[33] + mi := &file_demo_proto_msgTypes[40] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1810,7 +2142,7 @@ func (x *GetFlagRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetFlagRequest.ProtoReflect.Descriptor instead. func (*GetFlagRequest) Descriptor() ([]byte, []int) { - return file_demo_proto_rawDescGZIP(), []int{33} + return file_demo_proto_rawDescGZIP(), []int{40} } func (x *GetFlagRequest) GetName() string { @@ -1829,7 +2161,7 @@ type GetFlagResponse struct { func (x *GetFlagResponse) Reset() { *x = GetFlagResponse{} - mi := &file_demo_proto_msgTypes[34] + mi := &file_demo_proto_msgTypes[41] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1841,7 +2173,7 @@ func (x *GetFlagResponse) String() string { func (*GetFlagResponse) ProtoMessage() {} func (x *GetFlagResponse) ProtoReflect() protoreflect.Message { - mi := &file_demo_proto_msgTypes[34] + mi := &file_demo_proto_msgTypes[41] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1854,7 +2186,7 @@ func (x *GetFlagResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetFlagResponse.ProtoReflect.Descriptor instead. func (*GetFlagResponse) Descriptor() ([]byte, []int) { - return file_demo_proto_rawDescGZIP(), []int{34} + return file_demo_proto_rawDescGZIP(), []int{41} } func (x *GetFlagResponse) GetFlag() *Flag { @@ -1875,7 +2207,7 @@ type CreateFlagRequest struct { func (x *CreateFlagRequest) Reset() { *x = CreateFlagRequest{} - mi := &file_demo_proto_msgTypes[35] + mi := &file_demo_proto_msgTypes[42] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1887,7 +2219,7 @@ func (x *CreateFlagRequest) String() string { func (*CreateFlagRequest) ProtoMessage() {} func (x *CreateFlagRequest) ProtoReflect() protoreflect.Message { - mi := &file_demo_proto_msgTypes[35] + mi := &file_demo_proto_msgTypes[42] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1900,7 +2232,7 @@ func (x *CreateFlagRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateFlagRequest.ProtoReflect.Descriptor instead. func (*CreateFlagRequest) Descriptor() ([]byte, []int) { - return file_demo_proto_rawDescGZIP(), []int{35} + return file_demo_proto_rawDescGZIP(), []int{42} } func (x *CreateFlagRequest) GetName() string { @@ -1933,7 +2265,7 @@ type CreateFlagResponse struct { func (x *CreateFlagResponse) Reset() { *x = CreateFlagResponse{} - mi := &file_demo_proto_msgTypes[36] + mi := &file_demo_proto_msgTypes[43] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1945,7 +2277,7 @@ func (x *CreateFlagResponse) String() string { func (*CreateFlagResponse) ProtoMessage() {} func (x *CreateFlagResponse) ProtoReflect() protoreflect.Message { - mi := &file_demo_proto_msgTypes[36] + mi := &file_demo_proto_msgTypes[43] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1958,7 +2290,7 @@ func (x *CreateFlagResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateFlagResponse.ProtoReflect.Descriptor instead. func (*CreateFlagResponse) Descriptor() ([]byte, []int) { - return file_demo_proto_rawDescGZIP(), []int{36} + return file_demo_proto_rawDescGZIP(), []int{43} } func (x *CreateFlagResponse) GetFlag() *Flag { @@ -1978,7 +2310,7 @@ type UpdateFlagRequest struct { func (x *UpdateFlagRequest) Reset() { *x = UpdateFlagRequest{} - mi := &file_demo_proto_msgTypes[37] + mi := &file_demo_proto_msgTypes[44] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1990,7 +2322,7 @@ func (x *UpdateFlagRequest) String() string { func (*UpdateFlagRequest) ProtoMessage() {} func (x *UpdateFlagRequest) ProtoReflect() protoreflect.Message { - mi := &file_demo_proto_msgTypes[37] + mi := &file_demo_proto_msgTypes[44] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2003,7 +2335,7 @@ func (x *UpdateFlagRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdateFlagRequest.ProtoReflect.Descriptor instead. func (*UpdateFlagRequest) Descriptor() ([]byte, []int) { - return file_demo_proto_rawDescGZIP(), []int{37} + return file_demo_proto_rawDescGZIP(), []int{44} } func (x *UpdateFlagRequest) GetName() string { @@ -2028,7 +2360,7 @@ type UpdateFlagResponse struct { func (x *UpdateFlagResponse) Reset() { *x = UpdateFlagResponse{} - mi := &file_demo_proto_msgTypes[38] + mi := &file_demo_proto_msgTypes[45] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2040,7 +2372,7 @@ func (x *UpdateFlagResponse) String() string { func (*UpdateFlagResponse) ProtoMessage() {} func (x *UpdateFlagResponse) ProtoReflect() protoreflect.Message { - mi := &file_demo_proto_msgTypes[38] + mi := &file_demo_proto_msgTypes[45] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2053,7 +2385,7 @@ func (x *UpdateFlagResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdateFlagResponse.ProtoReflect.Descriptor instead. func (*UpdateFlagResponse) Descriptor() ([]byte, []int) { - return file_demo_proto_rawDescGZIP(), []int{38} + return file_demo_proto_rawDescGZIP(), []int{45} } type ListFlagsRequest struct { @@ -2064,7 +2396,7 @@ type ListFlagsRequest struct { func (x *ListFlagsRequest) Reset() { *x = ListFlagsRequest{} - mi := &file_demo_proto_msgTypes[39] + mi := &file_demo_proto_msgTypes[46] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2076,7 +2408,7 @@ func (x *ListFlagsRequest) String() string { func (*ListFlagsRequest) ProtoMessage() {} func (x *ListFlagsRequest) ProtoReflect() protoreflect.Message { - mi := &file_demo_proto_msgTypes[39] + mi := &file_demo_proto_msgTypes[46] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2089,7 +2421,7 @@ func (x *ListFlagsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListFlagsRequest.ProtoReflect.Descriptor instead. func (*ListFlagsRequest) Descriptor() ([]byte, []int) { - return file_demo_proto_rawDescGZIP(), []int{39} + return file_demo_proto_rawDescGZIP(), []int{46} } type ListFlagsResponse struct { @@ -2101,7 +2433,7 @@ type ListFlagsResponse struct { func (x *ListFlagsResponse) Reset() { *x = ListFlagsResponse{} - mi := &file_demo_proto_msgTypes[40] + mi := &file_demo_proto_msgTypes[47] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2113,7 +2445,7 @@ func (x *ListFlagsResponse) String() string { func (*ListFlagsResponse) ProtoMessage() {} func (x *ListFlagsResponse) ProtoReflect() protoreflect.Message { - mi := &file_demo_proto_msgTypes[40] + mi := &file_demo_proto_msgTypes[47] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2126,7 +2458,7 @@ func (x *ListFlagsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListFlagsResponse.ProtoReflect.Descriptor instead. func (*ListFlagsResponse) Descriptor() ([]byte, []int) { - return file_demo_proto_rawDescGZIP(), []int{40} + return file_demo_proto_rawDescGZIP(), []int{47} } func (x *ListFlagsResponse) GetFlag() []*Flag { @@ -2145,7 +2477,7 @@ type DeleteFlagRequest struct { func (x *DeleteFlagRequest) Reset() { *x = DeleteFlagRequest{} - mi := &file_demo_proto_msgTypes[41] + mi := &file_demo_proto_msgTypes[48] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2157,7 +2489,7 @@ func (x *DeleteFlagRequest) String() string { func (*DeleteFlagRequest) ProtoMessage() {} func (x *DeleteFlagRequest) ProtoReflect() protoreflect.Message { - mi := &file_demo_proto_msgTypes[41] + mi := &file_demo_proto_msgTypes[48] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2170,7 +2502,7 @@ func (x *DeleteFlagRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteFlagRequest.ProtoReflect.Descriptor instead. func (*DeleteFlagRequest) Descriptor() ([]byte, []int) { - return file_demo_proto_rawDescGZIP(), []int{41} + return file_demo_proto_rawDescGZIP(), []int{48} } func (x *DeleteFlagRequest) GetName() string { @@ -2188,7 +2520,7 @@ type DeleteFlagResponse struct { func (x *DeleteFlagResponse) Reset() { *x = DeleteFlagResponse{} - mi := &file_demo_proto_msgTypes[42] + mi := &file_demo_proto_msgTypes[49] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2200,7 +2532,7 @@ func (x *DeleteFlagResponse) String() string { func (*DeleteFlagResponse) ProtoMessage() {} func (x *DeleteFlagResponse) ProtoReflect() protoreflect.Message { - mi := &file_demo_proto_msgTypes[42] + mi := &file_demo_proto_msgTypes[49] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2213,7 +2545,7 @@ func (x *DeleteFlagResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteFlagResponse.ProtoReflect.Descriptor instead. func (*DeleteFlagResponse) Descriptor() ([]byte, []int) { - return file_demo_proto_rawDescGZIP(), []int{42} + return file_demo_proto_rawDescGZIP(), []int{49} } var File_demo_proto protoreflect.FileDescriptor @@ -2260,7 +2592,27 @@ const file_demo_proto_rawDesc = "" + "\x15SearchProductsRequest\x12\x14\n" + "\x05query\x18\x01 \x01(\tR\x05query\"E\n" + "\x16SearchProductsResponse\x12+\n" + - "\aresults\x18\x01 \x03(\v2\x11.oteldemo.ProductR\aresults\"h\n" + + "\aresults\x18\x01 \x03(\v2\x11.oteldemo.ProductR\aresults\"c\n" + + "\rProductReview\x12\x1a\n" + + "\busername\x18\x01 \x01(\tR\busername\x12 \n" + + "\vdescription\x18\x02 \x01(\tR\vdescription\x12\x14\n" + + "\x05score\x18\x03 \x01(\tR\x05score\"9\n" + + "\x18GetProductReviewsRequest\x12\x1d\n" + + "\n" + + "product_id\x18\x01 \x01(\tR\tproductId\"]\n" + + "\x19GetProductReviewsResponse\x12@\n" + + "\x0fproduct_reviews\x18\x01 \x03(\v2\x17.oteldemo.ProductReviewR\x0eproductReviews\"D\n" + + "#GetAverageProductReviewScoreRequest\x12\x1d\n" + + "\n" + + "product_id\x18\x01 \x01(\tR\tproductId\"K\n" + + "$GetAverageProductReviewScoreResponse\x12#\n" + + "\raverage_score\x18\x01 \x01(\tR\faverageScore\"Y\n" + + "\x1cAskProductAIAssistantRequest\x12\x1d\n" + + "\n" + + "product_id\x18\x01 \x01(\tR\tproductId\x12\x1a\n" + + "\bquestion\x18\x02 \x01(\tR\bquestion\";\n" + + "\x1dAskProductAIAssistantResponse\x12\x1a\n" + + "\bresponse\x18\x01 \x01(\tR\bresponse\"h\n" + "\x0fGetQuoteRequest\x12+\n" + "\aaddress\x18\x01 \x01(\v2\x11.oteldemo.AddressR\aaddress\x12(\n" + "\x05items\x18\x02 \x03(\v2\x12.oteldemo.CartItemR\x05items\">\n" + @@ -2361,7 +2713,11 @@ const file_demo_proto_rawDesc = "" + "\fListProducts\x12\x0f.oteldemo.Empty\x1a\x1e.oteldemo.ListProductsResponse\"\x00\x12>\n" + "\n" + "GetProduct\x12\x1b.oteldemo.GetProductRequest\x1a\x11.oteldemo.Product\"\x00\x12U\n" + - "\x0eSearchProducts\x12\x1f.oteldemo.SearchProductsRequest\x1a .oteldemo.SearchProductsResponse\"\x002\x9e\x01\n" + + "\x0eSearchProducts\x12\x1f.oteldemo.SearchProductsRequest\x1a .oteldemo.SearchProductsResponse\"\x002\xe3\x02\n" + + "\x14ProductReviewService\x12^\n" + + "\x11GetProductReviews\x12\".oteldemo.GetProductReviewsRequest\x1a#.oteldemo.GetProductReviewsResponse\"\x00\x12\x7f\n" + + "\x1cGetAverageProductReviewScore\x12-.oteldemo.GetAverageProductReviewScoreRequest\x1a..oteldemo.GetAverageProductReviewScoreResponse\"\x00\x12j\n" + + "\x15AskProductAIAssistant\x12&.oteldemo.AskProductAIAssistantRequest\x1a'.oteldemo.AskProductAIAssistantResponse\"\x002\x9e\x01\n" + "\x0fShippingService\x12C\n" + "\bGetQuote\x12\x19.oteldemo.GetQuoteRequest\x1a\x1a.oteldemo.GetQuoteResponse\"\x00\x12F\n" + "\tShipOrder\x12\x1a.oteldemo.ShipOrderRequest\x1a\x1b.oteldemo.ShipOrderResponse\"\x002\xab\x01\n" + @@ -2399,124 +2755,138 @@ func file_demo_proto_rawDescGZIP() []byte { return file_demo_proto_rawDescData } -var file_demo_proto_msgTypes = make([]protoimpl.MessageInfo, 43) +var file_demo_proto_msgTypes = make([]protoimpl.MessageInfo, 50) var file_demo_proto_goTypes = []any{ - (*CartItem)(nil), // 0: oteldemo.CartItem - (*AddItemRequest)(nil), // 1: oteldemo.AddItemRequest - (*EmptyCartRequest)(nil), // 2: oteldemo.EmptyCartRequest - (*GetCartRequest)(nil), // 3: oteldemo.GetCartRequest - (*Cart)(nil), // 4: oteldemo.Cart - (*Empty)(nil), // 5: oteldemo.Empty - (*ListRecommendationsRequest)(nil), // 6: oteldemo.ListRecommendationsRequest - (*ListRecommendationsResponse)(nil), // 7: oteldemo.ListRecommendationsResponse - (*Product)(nil), // 8: oteldemo.Product - (*ListProductsResponse)(nil), // 9: oteldemo.ListProductsResponse - (*GetProductRequest)(nil), // 10: oteldemo.GetProductRequest - (*SearchProductsRequest)(nil), // 11: oteldemo.SearchProductsRequest - (*SearchProductsResponse)(nil), // 12: oteldemo.SearchProductsResponse - (*GetQuoteRequest)(nil), // 13: oteldemo.GetQuoteRequest - (*GetQuoteResponse)(nil), // 14: oteldemo.GetQuoteResponse - (*ShipOrderRequest)(nil), // 15: oteldemo.ShipOrderRequest - (*ShipOrderResponse)(nil), // 16: oteldemo.ShipOrderResponse - (*Address)(nil), // 17: oteldemo.Address - (*Money)(nil), // 18: oteldemo.Money - (*GetSupportedCurrenciesResponse)(nil), // 19: oteldemo.GetSupportedCurrenciesResponse - (*CurrencyConversionRequest)(nil), // 20: oteldemo.CurrencyConversionRequest - (*CreditCardInfo)(nil), // 21: oteldemo.CreditCardInfo - (*ChargeRequest)(nil), // 22: oteldemo.ChargeRequest - (*ChargeResponse)(nil), // 23: oteldemo.ChargeResponse - (*OrderItem)(nil), // 24: oteldemo.OrderItem - (*OrderResult)(nil), // 25: oteldemo.OrderResult - (*SendOrderConfirmationRequest)(nil), // 26: oteldemo.SendOrderConfirmationRequest - (*PlaceOrderRequest)(nil), // 27: oteldemo.PlaceOrderRequest - (*PlaceOrderResponse)(nil), // 28: oteldemo.PlaceOrderResponse - (*AdRequest)(nil), // 29: oteldemo.AdRequest - (*AdResponse)(nil), // 30: oteldemo.AdResponse - (*Ad)(nil), // 31: oteldemo.Ad - (*Flag)(nil), // 32: oteldemo.Flag - (*GetFlagRequest)(nil), // 33: oteldemo.GetFlagRequest - (*GetFlagResponse)(nil), // 34: oteldemo.GetFlagResponse - (*CreateFlagRequest)(nil), // 35: oteldemo.CreateFlagRequest - (*CreateFlagResponse)(nil), // 36: oteldemo.CreateFlagResponse - (*UpdateFlagRequest)(nil), // 37: oteldemo.UpdateFlagRequest - (*UpdateFlagResponse)(nil), // 38: oteldemo.UpdateFlagResponse - (*ListFlagsRequest)(nil), // 39: oteldemo.ListFlagsRequest - (*ListFlagsResponse)(nil), // 40: oteldemo.ListFlagsResponse - (*DeleteFlagRequest)(nil), // 41: oteldemo.DeleteFlagRequest - (*DeleteFlagResponse)(nil), // 42: oteldemo.DeleteFlagResponse + (*CartItem)(nil), // 0: oteldemo.CartItem + (*AddItemRequest)(nil), // 1: oteldemo.AddItemRequest + (*EmptyCartRequest)(nil), // 2: oteldemo.EmptyCartRequest + (*GetCartRequest)(nil), // 3: oteldemo.GetCartRequest + (*Cart)(nil), // 4: oteldemo.Cart + (*Empty)(nil), // 5: oteldemo.Empty + (*ListRecommendationsRequest)(nil), // 6: oteldemo.ListRecommendationsRequest + (*ListRecommendationsResponse)(nil), // 7: oteldemo.ListRecommendationsResponse + (*Product)(nil), // 8: oteldemo.Product + (*ListProductsResponse)(nil), // 9: oteldemo.ListProductsResponse + (*GetProductRequest)(nil), // 10: oteldemo.GetProductRequest + (*SearchProductsRequest)(nil), // 11: oteldemo.SearchProductsRequest + (*SearchProductsResponse)(nil), // 12: oteldemo.SearchProductsResponse + (*ProductReview)(nil), // 13: oteldemo.ProductReview + (*GetProductReviewsRequest)(nil), // 14: oteldemo.GetProductReviewsRequest + (*GetProductReviewsResponse)(nil), // 15: oteldemo.GetProductReviewsResponse + (*GetAverageProductReviewScoreRequest)(nil), // 16: oteldemo.GetAverageProductReviewScoreRequest + (*GetAverageProductReviewScoreResponse)(nil), // 17: oteldemo.GetAverageProductReviewScoreResponse + (*AskProductAIAssistantRequest)(nil), // 18: oteldemo.AskProductAIAssistantRequest + (*AskProductAIAssistantResponse)(nil), // 19: oteldemo.AskProductAIAssistantResponse + (*GetQuoteRequest)(nil), // 20: oteldemo.GetQuoteRequest + (*GetQuoteResponse)(nil), // 21: oteldemo.GetQuoteResponse + (*ShipOrderRequest)(nil), // 22: oteldemo.ShipOrderRequest + (*ShipOrderResponse)(nil), // 23: oteldemo.ShipOrderResponse + (*Address)(nil), // 24: oteldemo.Address + (*Money)(nil), // 25: oteldemo.Money + (*GetSupportedCurrenciesResponse)(nil), // 26: oteldemo.GetSupportedCurrenciesResponse + (*CurrencyConversionRequest)(nil), // 27: oteldemo.CurrencyConversionRequest + (*CreditCardInfo)(nil), // 28: oteldemo.CreditCardInfo + (*ChargeRequest)(nil), // 29: oteldemo.ChargeRequest + (*ChargeResponse)(nil), // 30: oteldemo.ChargeResponse + (*OrderItem)(nil), // 31: oteldemo.OrderItem + (*OrderResult)(nil), // 32: oteldemo.OrderResult + (*SendOrderConfirmationRequest)(nil), // 33: oteldemo.SendOrderConfirmationRequest + (*PlaceOrderRequest)(nil), // 34: oteldemo.PlaceOrderRequest + (*PlaceOrderResponse)(nil), // 35: oteldemo.PlaceOrderResponse + (*AdRequest)(nil), // 36: oteldemo.AdRequest + (*AdResponse)(nil), // 37: oteldemo.AdResponse + (*Ad)(nil), // 38: oteldemo.Ad + (*Flag)(nil), // 39: oteldemo.Flag + (*GetFlagRequest)(nil), // 40: oteldemo.GetFlagRequest + (*GetFlagResponse)(nil), // 41: oteldemo.GetFlagResponse + (*CreateFlagRequest)(nil), // 42: oteldemo.CreateFlagRequest + (*CreateFlagResponse)(nil), // 43: oteldemo.CreateFlagResponse + (*UpdateFlagRequest)(nil), // 44: oteldemo.UpdateFlagRequest + (*UpdateFlagResponse)(nil), // 45: oteldemo.UpdateFlagResponse + (*ListFlagsRequest)(nil), // 46: oteldemo.ListFlagsRequest + (*ListFlagsResponse)(nil), // 47: oteldemo.ListFlagsResponse + (*DeleteFlagRequest)(nil), // 48: oteldemo.DeleteFlagRequest + (*DeleteFlagResponse)(nil), // 49: oteldemo.DeleteFlagResponse } var file_demo_proto_depIdxs = []int32{ 0, // 0: oteldemo.AddItemRequest.item:type_name -> oteldemo.CartItem 0, // 1: oteldemo.Cart.items:type_name -> oteldemo.CartItem - 18, // 2: oteldemo.Product.price_usd:type_name -> oteldemo.Money + 25, // 2: oteldemo.Product.price_usd:type_name -> oteldemo.Money 8, // 3: oteldemo.ListProductsResponse.products:type_name -> oteldemo.Product 8, // 4: oteldemo.SearchProductsResponse.results:type_name -> oteldemo.Product - 17, // 5: oteldemo.GetQuoteRequest.address:type_name -> oteldemo.Address - 0, // 6: oteldemo.GetQuoteRequest.items:type_name -> oteldemo.CartItem - 18, // 7: oteldemo.GetQuoteResponse.cost_usd:type_name -> oteldemo.Money - 17, // 8: oteldemo.ShipOrderRequest.address:type_name -> oteldemo.Address - 0, // 9: oteldemo.ShipOrderRequest.items:type_name -> oteldemo.CartItem - 18, // 10: oteldemo.CurrencyConversionRequest.from:type_name -> oteldemo.Money - 18, // 11: oteldemo.ChargeRequest.amount:type_name -> oteldemo.Money - 21, // 12: oteldemo.ChargeRequest.credit_card:type_name -> oteldemo.CreditCardInfo - 0, // 13: oteldemo.OrderItem.item:type_name -> oteldemo.CartItem - 18, // 14: oteldemo.OrderItem.cost:type_name -> oteldemo.Money - 18, // 15: oteldemo.OrderResult.shipping_cost:type_name -> oteldemo.Money - 17, // 16: oteldemo.OrderResult.shipping_address:type_name -> oteldemo.Address - 24, // 17: oteldemo.OrderResult.items:type_name -> oteldemo.OrderItem - 25, // 18: oteldemo.SendOrderConfirmationRequest.order:type_name -> oteldemo.OrderResult - 17, // 19: oteldemo.PlaceOrderRequest.address:type_name -> oteldemo.Address - 21, // 20: oteldemo.PlaceOrderRequest.credit_card:type_name -> oteldemo.CreditCardInfo - 25, // 21: oteldemo.PlaceOrderResponse.order:type_name -> oteldemo.OrderResult - 31, // 22: oteldemo.AdResponse.ads:type_name -> oteldemo.Ad - 32, // 23: oteldemo.GetFlagResponse.flag:type_name -> oteldemo.Flag - 32, // 24: oteldemo.CreateFlagResponse.flag:type_name -> oteldemo.Flag - 32, // 25: oteldemo.ListFlagsResponse.flag:type_name -> oteldemo.Flag - 1, // 26: oteldemo.CartService.AddItem:input_type -> oteldemo.AddItemRequest - 3, // 27: oteldemo.CartService.GetCart:input_type -> oteldemo.GetCartRequest - 2, // 28: oteldemo.CartService.EmptyCart:input_type -> oteldemo.EmptyCartRequest - 6, // 29: oteldemo.RecommendationService.ListRecommendations:input_type -> oteldemo.ListRecommendationsRequest - 5, // 30: oteldemo.ProductCatalogService.ListProducts:input_type -> oteldemo.Empty - 10, // 31: oteldemo.ProductCatalogService.GetProduct:input_type -> oteldemo.GetProductRequest - 11, // 32: oteldemo.ProductCatalogService.SearchProducts:input_type -> oteldemo.SearchProductsRequest - 13, // 33: oteldemo.ShippingService.GetQuote:input_type -> oteldemo.GetQuoteRequest - 15, // 34: oteldemo.ShippingService.ShipOrder:input_type -> oteldemo.ShipOrderRequest - 5, // 35: oteldemo.CurrencyService.GetSupportedCurrencies:input_type -> oteldemo.Empty - 20, // 36: oteldemo.CurrencyService.Convert:input_type -> oteldemo.CurrencyConversionRequest - 22, // 37: oteldemo.PaymentService.Charge:input_type -> oteldemo.ChargeRequest - 26, // 38: oteldemo.EmailService.SendOrderConfirmation:input_type -> oteldemo.SendOrderConfirmationRequest - 27, // 39: oteldemo.CheckoutService.PlaceOrder:input_type -> oteldemo.PlaceOrderRequest - 29, // 40: oteldemo.AdService.GetAds:input_type -> oteldemo.AdRequest - 33, // 41: oteldemo.FeatureFlagService.GetFlag:input_type -> oteldemo.GetFlagRequest - 35, // 42: oteldemo.FeatureFlagService.CreateFlag:input_type -> oteldemo.CreateFlagRequest - 37, // 43: oteldemo.FeatureFlagService.UpdateFlag:input_type -> oteldemo.UpdateFlagRequest - 39, // 44: oteldemo.FeatureFlagService.ListFlags:input_type -> oteldemo.ListFlagsRequest - 41, // 45: oteldemo.FeatureFlagService.DeleteFlag:input_type -> oteldemo.DeleteFlagRequest - 5, // 46: oteldemo.CartService.AddItem:output_type -> oteldemo.Empty - 4, // 47: oteldemo.CartService.GetCart:output_type -> oteldemo.Cart - 5, // 48: oteldemo.CartService.EmptyCart:output_type -> oteldemo.Empty - 7, // 49: oteldemo.RecommendationService.ListRecommendations:output_type -> oteldemo.ListRecommendationsResponse - 9, // 50: oteldemo.ProductCatalogService.ListProducts:output_type -> oteldemo.ListProductsResponse - 8, // 51: oteldemo.ProductCatalogService.GetProduct:output_type -> oteldemo.Product - 12, // 52: oteldemo.ProductCatalogService.SearchProducts:output_type -> oteldemo.SearchProductsResponse - 14, // 53: oteldemo.ShippingService.GetQuote:output_type -> oteldemo.GetQuoteResponse - 16, // 54: oteldemo.ShippingService.ShipOrder:output_type -> oteldemo.ShipOrderResponse - 19, // 55: oteldemo.CurrencyService.GetSupportedCurrencies:output_type -> oteldemo.GetSupportedCurrenciesResponse - 18, // 56: oteldemo.CurrencyService.Convert:output_type -> oteldemo.Money - 23, // 57: oteldemo.PaymentService.Charge:output_type -> oteldemo.ChargeResponse - 5, // 58: oteldemo.EmailService.SendOrderConfirmation:output_type -> oteldemo.Empty - 28, // 59: oteldemo.CheckoutService.PlaceOrder:output_type -> oteldemo.PlaceOrderResponse - 30, // 60: oteldemo.AdService.GetAds:output_type -> oteldemo.AdResponse - 34, // 61: oteldemo.FeatureFlagService.GetFlag:output_type -> oteldemo.GetFlagResponse - 36, // 62: oteldemo.FeatureFlagService.CreateFlag:output_type -> oteldemo.CreateFlagResponse - 38, // 63: oteldemo.FeatureFlagService.UpdateFlag:output_type -> oteldemo.UpdateFlagResponse - 40, // 64: oteldemo.FeatureFlagService.ListFlags:output_type -> oteldemo.ListFlagsResponse - 42, // 65: oteldemo.FeatureFlagService.DeleteFlag:output_type -> oteldemo.DeleteFlagResponse - 46, // [46:66] is the sub-list for method output_type - 26, // [26:46] is the sub-list for method input_type - 26, // [26:26] is the sub-list for extension type_name - 26, // [26:26] is the sub-list for extension extendee - 0, // [0:26] is the sub-list for field type_name + 13, // 5: oteldemo.GetProductReviewsResponse.product_reviews:type_name -> oteldemo.ProductReview + 24, // 6: oteldemo.GetQuoteRequest.address:type_name -> oteldemo.Address + 0, // 7: oteldemo.GetQuoteRequest.items:type_name -> oteldemo.CartItem + 25, // 8: oteldemo.GetQuoteResponse.cost_usd:type_name -> oteldemo.Money + 24, // 9: oteldemo.ShipOrderRequest.address:type_name -> oteldemo.Address + 0, // 10: oteldemo.ShipOrderRequest.items:type_name -> oteldemo.CartItem + 25, // 11: oteldemo.CurrencyConversionRequest.from:type_name -> oteldemo.Money + 25, // 12: oteldemo.ChargeRequest.amount:type_name -> oteldemo.Money + 28, // 13: oteldemo.ChargeRequest.credit_card:type_name -> oteldemo.CreditCardInfo + 0, // 14: oteldemo.OrderItem.item:type_name -> oteldemo.CartItem + 25, // 15: oteldemo.OrderItem.cost:type_name -> oteldemo.Money + 25, // 16: oteldemo.OrderResult.shipping_cost:type_name -> oteldemo.Money + 24, // 17: oteldemo.OrderResult.shipping_address:type_name -> oteldemo.Address + 31, // 18: oteldemo.OrderResult.items:type_name -> oteldemo.OrderItem + 32, // 19: oteldemo.SendOrderConfirmationRequest.order:type_name -> oteldemo.OrderResult + 24, // 20: oteldemo.PlaceOrderRequest.address:type_name -> oteldemo.Address + 28, // 21: oteldemo.PlaceOrderRequest.credit_card:type_name -> oteldemo.CreditCardInfo + 32, // 22: oteldemo.PlaceOrderResponse.order:type_name -> oteldemo.OrderResult + 38, // 23: oteldemo.AdResponse.ads:type_name -> oteldemo.Ad + 39, // 24: oteldemo.GetFlagResponse.flag:type_name -> oteldemo.Flag + 39, // 25: oteldemo.CreateFlagResponse.flag:type_name -> oteldemo.Flag + 39, // 26: oteldemo.ListFlagsResponse.flag:type_name -> oteldemo.Flag + 1, // 27: oteldemo.CartService.AddItem:input_type -> oteldemo.AddItemRequest + 3, // 28: oteldemo.CartService.GetCart:input_type -> oteldemo.GetCartRequest + 2, // 29: oteldemo.CartService.EmptyCart:input_type -> oteldemo.EmptyCartRequest + 6, // 30: oteldemo.RecommendationService.ListRecommendations:input_type -> oteldemo.ListRecommendationsRequest + 5, // 31: oteldemo.ProductCatalogService.ListProducts:input_type -> oteldemo.Empty + 10, // 32: oteldemo.ProductCatalogService.GetProduct:input_type -> oteldemo.GetProductRequest + 11, // 33: oteldemo.ProductCatalogService.SearchProducts:input_type -> oteldemo.SearchProductsRequest + 14, // 34: oteldemo.ProductReviewService.GetProductReviews:input_type -> oteldemo.GetProductReviewsRequest + 16, // 35: oteldemo.ProductReviewService.GetAverageProductReviewScore:input_type -> oteldemo.GetAverageProductReviewScoreRequest + 18, // 36: oteldemo.ProductReviewService.AskProductAIAssistant:input_type -> oteldemo.AskProductAIAssistantRequest + 20, // 37: oteldemo.ShippingService.GetQuote:input_type -> oteldemo.GetQuoteRequest + 22, // 38: oteldemo.ShippingService.ShipOrder:input_type -> oteldemo.ShipOrderRequest + 5, // 39: oteldemo.CurrencyService.GetSupportedCurrencies:input_type -> oteldemo.Empty + 27, // 40: oteldemo.CurrencyService.Convert:input_type -> oteldemo.CurrencyConversionRequest + 29, // 41: oteldemo.PaymentService.Charge:input_type -> oteldemo.ChargeRequest + 33, // 42: oteldemo.EmailService.SendOrderConfirmation:input_type -> oteldemo.SendOrderConfirmationRequest + 34, // 43: oteldemo.CheckoutService.PlaceOrder:input_type -> oteldemo.PlaceOrderRequest + 36, // 44: oteldemo.AdService.GetAds:input_type -> oteldemo.AdRequest + 40, // 45: oteldemo.FeatureFlagService.GetFlag:input_type -> oteldemo.GetFlagRequest + 42, // 46: oteldemo.FeatureFlagService.CreateFlag:input_type -> oteldemo.CreateFlagRequest + 44, // 47: oteldemo.FeatureFlagService.UpdateFlag:input_type -> oteldemo.UpdateFlagRequest + 46, // 48: oteldemo.FeatureFlagService.ListFlags:input_type -> oteldemo.ListFlagsRequest + 48, // 49: oteldemo.FeatureFlagService.DeleteFlag:input_type -> oteldemo.DeleteFlagRequest + 5, // 50: oteldemo.CartService.AddItem:output_type -> oteldemo.Empty + 4, // 51: oteldemo.CartService.GetCart:output_type -> oteldemo.Cart + 5, // 52: oteldemo.CartService.EmptyCart:output_type -> oteldemo.Empty + 7, // 53: oteldemo.RecommendationService.ListRecommendations:output_type -> oteldemo.ListRecommendationsResponse + 9, // 54: oteldemo.ProductCatalogService.ListProducts:output_type -> oteldemo.ListProductsResponse + 8, // 55: oteldemo.ProductCatalogService.GetProduct:output_type -> oteldemo.Product + 12, // 56: oteldemo.ProductCatalogService.SearchProducts:output_type -> oteldemo.SearchProductsResponse + 15, // 57: oteldemo.ProductReviewService.GetProductReviews:output_type -> oteldemo.GetProductReviewsResponse + 17, // 58: oteldemo.ProductReviewService.GetAverageProductReviewScore:output_type -> oteldemo.GetAverageProductReviewScoreResponse + 19, // 59: oteldemo.ProductReviewService.AskProductAIAssistant:output_type -> oteldemo.AskProductAIAssistantResponse + 21, // 60: oteldemo.ShippingService.GetQuote:output_type -> oteldemo.GetQuoteResponse + 23, // 61: oteldemo.ShippingService.ShipOrder:output_type -> oteldemo.ShipOrderResponse + 26, // 62: oteldemo.CurrencyService.GetSupportedCurrencies:output_type -> oteldemo.GetSupportedCurrenciesResponse + 25, // 63: oteldemo.CurrencyService.Convert:output_type -> oteldemo.Money + 30, // 64: oteldemo.PaymentService.Charge:output_type -> oteldemo.ChargeResponse + 5, // 65: oteldemo.EmailService.SendOrderConfirmation:output_type -> oteldemo.Empty + 35, // 66: oteldemo.CheckoutService.PlaceOrder:output_type -> oteldemo.PlaceOrderResponse + 37, // 67: oteldemo.AdService.GetAds:output_type -> oteldemo.AdResponse + 41, // 68: oteldemo.FeatureFlagService.GetFlag:output_type -> oteldemo.GetFlagResponse + 43, // 69: oteldemo.FeatureFlagService.CreateFlag:output_type -> oteldemo.CreateFlagResponse + 45, // 70: oteldemo.FeatureFlagService.UpdateFlag:output_type -> oteldemo.UpdateFlagResponse + 47, // 71: oteldemo.FeatureFlagService.ListFlags:output_type -> oteldemo.ListFlagsResponse + 49, // 72: oteldemo.FeatureFlagService.DeleteFlag:output_type -> oteldemo.DeleteFlagResponse + 50, // [50:73] is the sub-list for method output_type + 27, // [27:50] is the sub-list for method input_type + 27, // [27:27] is the sub-list for extension type_name + 27, // [27:27] is the sub-list for extension extendee + 0, // [0:27] is the sub-list for field type_name } func init() { file_demo_proto_init() } @@ -2530,9 +2900,9 @@ func file_demo_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_demo_proto_rawDesc), len(file_demo_proto_rawDesc)), NumEnums: 0, - NumMessages: 43, + NumMessages: 50, NumExtensions: 0, - NumServices: 10, + NumServices: 11, }, GoTypes: file_demo_proto_goTypes, DependencyIndexes: file_demo_proto_depIdxs, diff --git a/src/product-catalog/genproto/oteldemo/demo_grpc.pb.go b/src/product-catalog/genproto/oteldemo/demo_grpc.pb.go index f04633a673..5fda83bb62 100644 --- a/src/product-catalog/genproto/oteldemo/demo_grpc.pb.go +++ b/src/product-catalog/genproto/oteldemo/demo_grpc.pb.go @@ -490,6 +490,184 @@ var ProductCatalogService_ServiceDesc = grpc.ServiceDesc{ Metadata: "demo.proto", } +const ( + ProductReviewService_GetProductReviews_FullMethodName = "/oteldemo.ProductReviewService/GetProductReviews" + ProductReviewService_GetAverageProductReviewScore_FullMethodName = "/oteldemo.ProductReviewService/GetAverageProductReviewScore" + ProductReviewService_AskProductAIAssistant_FullMethodName = "/oteldemo.ProductReviewService/AskProductAIAssistant" +) + +// ProductReviewServiceClient is the client API for ProductReviewService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type ProductReviewServiceClient interface { + GetProductReviews(ctx context.Context, in *GetProductReviewsRequest, opts ...grpc.CallOption) (*GetProductReviewsResponse, error) + GetAverageProductReviewScore(ctx context.Context, in *GetAverageProductReviewScoreRequest, opts ...grpc.CallOption) (*GetAverageProductReviewScoreResponse, error) + AskProductAIAssistant(ctx context.Context, in *AskProductAIAssistantRequest, opts ...grpc.CallOption) (*AskProductAIAssistantResponse, error) +} + +type productReviewServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewProductReviewServiceClient(cc grpc.ClientConnInterface) ProductReviewServiceClient { + return &productReviewServiceClient{cc} +} + +func (c *productReviewServiceClient) GetProductReviews(ctx context.Context, in *GetProductReviewsRequest, opts ...grpc.CallOption) (*GetProductReviewsResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetProductReviewsResponse) + err := c.cc.Invoke(ctx, ProductReviewService_GetProductReviews_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *productReviewServiceClient) GetAverageProductReviewScore(ctx context.Context, in *GetAverageProductReviewScoreRequest, opts ...grpc.CallOption) (*GetAverageProductReviewScoreResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetAverageProductReviewScoreResponse) + err := c.cc.Invoke(ctx, ProductReviewService_GetAverageProductReviewScore_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *productReviewServiceClient) AskProductAIAssistant(ctx context.Context, in *AskProductAIAssistantRequest, opts ...grpc.CallOption) (*AskProductAIAssistantResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(AskProductAIAssistantResponse) + err := c.cc.Invoke(ctx, ProductReviewService_AskProductAIAssistant_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ProductReviewServiceServer is the server API for ProductReviewService service. +// All implementations must embed UnimplementedProductReviewServiceServer +// for forward compatibility. +type ProductReviewServiceServer interface { + GetProductReviews(context.Context, *GetProductReviewsRequest) (*GetProductReviewsResponse, error) + GetAverageProductReviewScore(context.Context, *GetAverageProductReviewScoreRequest) (*GetAverageProductReviewScoreResponse, error) + AskProductAIAssistant(context.Context, *AskProductAIAssistantRequest) (*AskProductAIAssistantResponse, error) + mustEmbedUnimplementedProductReviewServiceServer() +} + +// UnimplementedProductReviewServiceServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedProductReviewServiceServer struct{} + +func (UnimplementedProductReviewServiceServer) GetProductReviews(context.Context, *GetProductReviewsRequest) (*GetProductReviewsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetProductReviews not implemented") +} +func (UnimplementedProductReviewServiceServer) GetAverageProductReviewScore(context.Context, *GetAverageProductReviewScoreRequest) (*GetAverageProductReviewScoreResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetAverageProductReviewScore not implemented") +} +func (UnimplementedProductReviewServiceServer) AskProductAIAssistant(context.Context, *AskProductAIAssistantRequest) (*AskProductAIAssistantResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AskProductAIAssistant not implemented") +} +func (UnimplementedProductReviewServiceServer) mustEmbedUnimplementedProductReviewServiceServer() {} +func (UnimplementedProductReviewServiceServer) testEmbeddedByValue() {} + +// UnsafeProductReviewServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to ProductReviewServiceServer will +// result in compilation errors. +type UnsafeProductReviewServiceServer interface { + mustEmbedUnimplementedProductReviewServiceServer() +} + +func RegisterProductReviewServiceServer(s grpc.ServiceRegistrar, srv ProductReviewServiceServer) { + // If the following call pancis, it indicates UnimplementedProductReviewServiceServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&ProductReviewService_ServiceDesc, srv) +} + +func _ProductReviewService_GetProductReviews_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetProductReviewsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProductReviewServiceServer).GetProductReviews(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ProductReviewService_GetProductReviews_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProductReviewServiceServer).GetProductReviews(ctx, req.(*GetProductReviewsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ProductReviewService_GetAverageProductReviewScore_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetAverageProductReviewScoreRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProductReviewServiceServer).GetAverageProductReviewScore(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ProductReviewService_GetAverageProductReviewScore_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProductReviewServiceServer).GetAverageProductReviewScore(ctx, req.(*GetAverageProductReviewScoreRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ProductReviewService_AskProductAIAssistant_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AskProductAIAssistantRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProductReviewServiceServer).AskProductAIAssistant(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ProductReviewService_AskProductAIAssistant_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProductReviewServiceServer).AskProductAIAssistant(ctx, req.(*AskProductAIAssistantRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// ProductReviewService_ServiceDesc is the grpc.ServiceDesc for ProductReviewService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var ProductReviewService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "oteldemo.ProductReviewService", + HandlerType: (*ProductReviewServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetProductReviews", + Handler: _ProductReviewService_GetProductReviews_Handler, + }, + { + MethodName: "GetAverageProductReviewScore", + Handler: _ProductReviewService_GetAverageProductReviewScore_Handler, + }, + { + MethodName: "AskProductAIAssistant", + Handler: _ProductReviewService_AskProductAIAssistant_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "demo.proto", +} + const ( ShippingService_GetQuote_FullMethodName = "/oteldemo.ShippingService/GetQuote" ShippingService_ShipOrder_FullMethodName = "/oteldemo.ShippingService/ShipOrder" diff --git a/src/product-reviews/Dockerfile b/src/product-reviews/Dockerfile new file mode 100644 index 0000000000..c4c4ae98be --- /dev/null +++ b/src/product-reviews/Dockerfile @@ -0,0 +1,31 @@ +# Copyright The OpenTelemetry Authors +# SPDX-License-Identifier: Apache-2.0 + + +FROM docker.io/library/python:3.12-alpine3.22 AS build-venv + +RUN apk update && \ + apk add gcc g++ linux-headers + +COPY ./src/product-reviews/requirements.txt requirements.txt + +RUN python -m venv venv && \ + venv/bin/pip install --no-cache-dir -r requirements.txt + +RUN venv/bin/opentelemetry-bootstrap -a install + +FROM docker.io/library/python:3.12-alpine3.22 + +COPY --from=build-venv /venv/ /venv/ + +WORKDIR /app + +COPY ./src/product-reviews/demo_pb2_grpc.py demo_pb2_grpc.py +COPY ./src/product-reviews/demo_pb2.py demo_pb2.py +COPY ./src/product-reviews/product_reviews_server.py product_reviews_server.py +COPY ./src/product-reviews/database.py database.py +COPY ./src/product-reviews/metrics.py metrics.py + + +EXPOSE ${PRODUCT_REVIEWS_PORT} +ENTRYPOINT [ "/venv/bin/opentelemetry-instrument", "/venv/bin/python", "product_reviews_server.py" ] diff --git a/src/product-reviews/README.md b/src/product-reviews/README.md new file mode 100644 index 0000000000..d415573fd0 --- /dev/null +++ b/src/product-reviews/README.md @@ -0,0 +1,41 @@ +# Product Reviews Service + +This service returns product reviews for a specific product, along with an +AI-generated summary of the product reviews. + +## Local Build + +To build the protos, run from the root directory: + +```sh +make docker-generate-protobuf +``` + +## Docker Build + +From the root directory, run: + +```sh +docker compose build product-reviews +``` + +## LLM Configuration + +By default, this service uses a mock LLM service, as configured in +the `.env` file: + +``` yaml +LLM_BASE_URL=http://${LLM_HOST}:${LLM_PORT}/v1 +LLM_MODEL=astronomy-llm +OPENAI_API_KEY=dummy +``` + +If desired, the configuration can be changed to point to a real, OpenAI API +compatible LLM in the file `.env.override`. For example, the following +configuration can be used to utilize OpenAI's gpt-4o-mini model: + +``` yaml +LLM_BASE_URL=https://api.openai.com/v1 +LLM_MODEL=gpt-4o-mini +OPENAI_API_KEY= +``` diff --git a/src/product-reviews/database.py b/src/product-reviews/database.py new file mode 100644 index 0000000000..64551c558f --- /dev/null +++ b/src/product-reviews/database.py @@ -0,0 +1,90 @@ +#!/usr/bin/python + +# Copyright The OpenTelemetry Authors +# SPDX-License-Identifier: Apache-2.0 + +# Python +import os +import simplejson as json + +# Postgres +import psycopg2 + +def must_map_env(key: str): + value = os.environ.get(key) + if value is None: + raise Exception(f'{key} environment variable must be set') + return value + +# Retrieve Postgres environment variables +db_connection_str = must_map_env('DB_CONNECTION_STRING') + +def fetch_product_reviews(product_id): + try: + return json.dumps(fetch_product_reviews_from_db(product_id), use_decimal=True) + except Exception as e: + return json.dumps({"error": str(e)}) + +def fetch_product_reviews_from_db(request_product_id): + + connection = None + + try: + with psycopg2.connect(db_connection_str) as connection: + + with connection.cursor() as cursor: + # Define the SQL query + query = "SELECT username, description, score FROM reviews.productreviews WHERE product_id= %s" + + # Execute the query + cursor.execute(query, (request_product_id, )) + + # Fetch all the rows from the query result + records = cursor.fetchall() + return records + + except Exception as e: + raise e + finally: + if connection is not None: + try: + connection.close() + except Exception as e: + pass + +def fetch_avg_product_review_score_from_db(request_product_id): + + connection = None + + try: + with psycopg2.connect(db_connection_str) as connection: + + with connection.cursor() as cursor: + # Define the SQL query + query = "SELECT AVG(score) FROM reviews.productreviews WHERE product_id= %s" + + # Execute the query + cursor.execute(query, (request_product_id, )) + + # Fetch all the rows from the query result + records = cursor.fetchall() + + # Extract the average score + if records: + # records will be a list like [(average_score,)] + average_score = records[0][0] + else: + # Handle the case where no records are returned (e.g., no reviews for the product) + average_score = None + + # return the score as a string rounded to 1 decimal place + return f"{average_score:.1f}" + + except Exception as e: + raise e + finally: + if connection is not None: + try: + connection.close() + except Exception as e: + pass diff --git a/src/product-reviews/demo_pb2.py b/src/product-reviews/demo_pb2.py new file mode 100644 index 0000000000..b018ef2170 --- /dev/null +++ b/src/product-reviews/demo_pb2.py @@ -0,0 +1,146 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: demo.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\ndemo.proto\x12\x08oteldemo\"0\n\x08\x43\x61rtItem\x12\x12\n\nproduct_id\x18\x01 \x01(\t\x12\x10\n\x08quantity\x18\x02 \x01(\x05\"C\n\x0e\x41\x64\x64ItemRequest\x12\x0f\n\x07user_id\x18\x01 \x01(\t\x12 \n\x04item\x18\x02 \x01(\x0b\x32\x12.oteldemo.CartItem\"#\n\x10\x45mptyCartRequest\x12\x0f\n\x07user_id\x18\x01 \x01(\t\"!\n\x0eGetCartRequest\x12\x0f\n\x07user_id\x18\x01 \x01(\t\":\n\x04\x43\x61rt\x12\x0f\n\x07user_id\x18\x01 \x01(\t\x12!\n\x05items\x18\x02 \x03(\x0b\x32\x12.oteldemo.CartItem\"\x07\n\x05\x45mpty\"B\n\x1aListRecommendationsRequest\x12\x0f\n\x07user_id\x18\x01 \x01(\t\x12\x13\n\x0bproduct_ids\x18\x02 \x03(\t\"2\n\x1bListRecommendationsResponse\x12\x13\n\x0bproduct_ids\x18\x01 \x03(\t\"\x81\x01\n\x07Product\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x0f\n\x07picture\x18\x04 \x01(\t\x12\"\n\tprice_usd\x18\x05 \x01(\x0b\x32\x0f.oteldemo.Money\x12\x12\n\ncategories\x18\x06 \x03(\t\";\n\x14ListProductsResponse\x12#\n\x08products\x18\x01 \x03(\x0b\x32\x11.oteldemo.Product\"\x1f\n\x11GetProductRequest\x12\n\n\x02id\x18\x01 \x01(\t\"&\n\x15SearchProductsRequest\x12\r\n\x05query\x18\x01 \x01(\t\"<\n\x16SearchProductsResponse\x12\"\n\x07results\x18\x01 \x03(\x0b\x32\x11.oteldemo.Product\"E\n\rProductReview\x12\x10\n\x08username\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\r\n\x05score\x18\x03 \x01(\t\".\n\x18GetProductReviewsRequest\x12\x12\n\nproduct_id\x18\x01 \x01(\t\"M\n\x19GetProductReviewsResponse\x12\x30\n\x0fproduct_reviews\x18\x01 \x03(\x0b\x32\x17.oteldemo.ProductReview\"9\n#GetAverageProductReviewScoreRequest\x12\x12\n\nproduct_id\x18\x01 \x01(\t\"=\n$GetAverageProductReviewScoreResponse\x12\x15\n\raverage_score\x18\x01 \x01(\t\"D\n\x1c\x41skProductAIAssistantRequest\x12\x12\n\nproduct_id\x18\x01 \x01(\t\x12\x10\n\x08question\x18\x02 \x01(\t\"1\n\x1d\x41skProductAIAssistantResponse\x12\x10\n\x08response\x18\x01 \x01(\t\"X\n\x0fGetQuoteRequest\x12\"\n\x07\x61\x64\x64ress\x18\x01 \x01(\x0b\x32\x11.oteldemo.Address\x12!\n\x05items\x18\x02 \x03(\x0b\x32\x12.oteldemo.CartItem\"5\n\x10GetQuoteResponse\x12!\n\x08\x63ost_usd\x18\x01 \x01(\x0b\x32\x0f.oteldemo.Money\"Y\n\x10ShipOrderRequest\x12\"\n\x07\x61\x64\x64ress\x18\x01 \x01(\x0b\x32\x11.oteldemo.Address\x12!\n\x05items\x18\x02 \x03(\x0b\x32\x12.oteldemo.CartItem\"(\n\x11ShipOrderResponse\x12\x13\n\x0btracking_id\x18\x01 \x01(\t\"a\n\x07\x41\x64\x64ress\x12\x16\n\x0estreet_address\x18\x01 \x01(\t\x12\x0c\n\x04\x63ity\x18\x02 \x01(\t\x12\r\n\x05state\x18\x03 \x01(\t\x12\x0f\n\x07\x63ountry\x18\x04 \x01(\t\x12\x10\n\x08zip_code\x18\x05 \x01(\t\"<\n\x05Money\x12\x15\n\rcurrency_code\x18\x01 \x01(\t\x12\r\n\x05units\x18\x02 \x01(\x03\x12\r\n\x05nanos\x18\x03 \x01(\x05\"8\n\x1eGetSupportedCurrenciesResponse\x12\x16\n\x0e\x63urrency_codes\x18\x01 \x03(\t\"K\n\x19\x43urrencyConversionRequest\x12\x1d\n\x04\x66rom\x18\x01 \x01(\x0b\x32\x0f.oteldemo.Money\x12\x0f\n\x07to_code\x18\x02 \x01(\t\"\x90\x01\n\x0e\x43reditCardInfo\x12\x1a\n\x12\x63redit_card_number\x18\x01 \x01(\t\x12\x17\n\x0f\x63redit_card_cvv\x18\x02 \x01(\x05\x12#\n\x1b\x63redit_card_expiration_year\x18\x03 \x01(\x05\x12$\n\x1c\x63redit_card_expiration_month\x18\x04 \x01(\x05\"_\n\rChargeRequest\x12\x1f\n\x06\x61mount\x18\x01 \x01(\x0b\x32\x0f.oteldemo.Money\x12-\n\x0b\x63redit_card\x18\x02 \x01(\x0b\x32\x18.oteldemo.CreditCardInfo\"(\n\x0e\x43hargeResponse\x12\x16\n\x0etransaction_id\x18\x01 \x01(\t\"L\n\tOrderItem\x12 \n\x04item\x18\x01 \x01(\x0b\x32\x12.oteldemo.CartItem\x12\x1d\n\x04\x63ost\x18\x02 \x01(\x0b\x32\x0f.oteldemo.Money\"\xb6\x01\n\x0bOrderResult\x12\x10\n\x08order_id\x18\x01 \x01(\t\x12\x1c\n\x14shipping_tracking_id\x18\x02 \x01(\t\x12&\n\rshipping_cost\x18\x03 \x01(\x0b\x32\x0f.oteldemo.Money\x12+\n\x10shipping_address\x18\x04 \x01(\x0b\x32\x11.oteldemo.Address\x12\"\n\x05items\x18\x05 \x03(\x0b\x32\x13.oteldemo.OrderItem\"S\n\x1cSendOrderConfirmationRequest\x12\r\n\x05\x65mail\x18\x01 \x01(\t\x12$\n\x05order\x18\x02 \x01(\x0b\x32\x15.oteldemo.OrderResult\"\x9d\x01\n\x11PlaceOrderRequest\x12\x0f\n\x07user_id\x18\x01 \x01(\t\x12\x15\n\ruser_currency\x18\x02 \x01(\t\x12\"\n\x07\x61\x64\x64ress\x18\x03 \x01(\x0b\x32\x11.oteldemo.Address\x12\r\n\x05\x65mail\x18\x05 \x01(\t\x12-\n\x0b\x63redit_card\x18\x06 \x01(\x0b\x32\x18.oteldemo.CreditCardInfo\":\n\x12PlaceOrderResponse\x12$\n\x05order\x18\x01 \x01(\x0b\x32\x15.oteldemo.OrderResult\"!\n\tAdRequest\x12\x14\n\x0c\x63ontext_keys\x18\x01 \x03(\t\"\'\n\nAdResponse\x12\x19\n\x03\x61\x64s\x18\x01 \x03(\x0b\x32\x0c.oteldemo.Ad\"(\n\x02\x41\x64\x12\x14\n\x0credirect_url\x18\x01 \x01(\t\x12\x0c\n\x04text\x18\x02 \x01(\t\":\n\x04\x46lag\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x0f\n\x07\x65nabled\x18\x03 \x01(\x08\"\x1e\n\x0eGetFlagRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"/\n\x0fGetFlagResponse\x12\x1c\n\x04\x66lag\x18\x01 \x01(\x0b\x32\x0e.oteldemo.Flag\"G\n\x11\x43reateFlagRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x0f\n\x07\x65nabled\x18\x03 \x01(\x08\"2\n\x12\x43reateFlagResponse\x12\x1c\n\x04\x66lag\x18\x01 \x01(\x0b\x32\x0e.oteldemo.Flag\"2\n\x11UpdateFlagRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07\x65nabled\x18\x02 \x01(\x08\"\x14\n\x12UpdateFlagResponse\"\x12\n\x10ListFlagsRequest\"1\n\x11ListFlagsResponse\x12\x1c\n\x04\x66lag\x18\x01 \x03(\x0b\x32\x0e.oteldemo.Flag\"!\n\x11\x44\x65leteFlagRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"\x14\n\x12\x44\x65leteFlagResponse2\xb8\x01\n\x0b\x43\x61rtService\x12\x36\n\x07\x41\x64\x64Item\x12\x18.oteldemo.AddItemRequest\x1a\x0f.oteldemo.Empty\"\x00\x12\x35\n\x07GetCart\x12\x18.oteldemo.GetCartRequest\x1a\x0e.oteldemo.Cart\"\x00\x12:\n\tEmptyCart\x12\x1a.oteldemo.EmptyCartRequest\x1a\x0f.oteldemo.Empty\"\x00\x32}\n\x15RecommendationService\x12\x64\n\x13ListRecommendations\x12$.oteldemo.ListRecommendationsRequest\x1a%.oteldemo.ListRecommendationsResponse\"\x00\x32\xf1\x01\n\x15ProductCatalogService\x12\x41\n\x0cListProducts\x12\x0f.oteldemo.Empty\x1a\x1e.oteldemo.ListProductsResponse\"\x00\x12>\n\nGetProduct\x12\x1b.oteldemo.GetProductRequest\x1a\x11.oteldemo.Product\"\x00\x12U\n\x0eSearchProducts\x12\x1f.oteldemo.SearchProductsRequest\x1a .oteldemo.SearchProductsResponse\"\x00\x32\xe3\x02\n\x14ProductReviewService\x12^\n\x11GetProductReviews\x12\".oteldemo.GetProductReviewsRequest\x1a#.oteldemo.GetProductReviewsResponse\"\x00\x12\x7f\n\x1cGetAverageProductReviewScore\x12-.oteldemo.GetAverageProductReviewScoreRequest\x1a..oteldemo.GetAverageProductReviewScoreResponse\"\x00\x12j\n\x15\x41skProductAIAssistant\x12&.oteldemo.AskProductAIAssistantRequest\x1a\'.oteldemo.AskProductAIAssistantResponse\"\x00\x32\x9e\x01\n\x0fShippingService\x12\x43\n\x08GetQuote\x12\x19.oteldemo.GetQuoteRequest\x1a\x1a.oteldemo.GetQuoteResponse\"\x00\x12\x46\n\tShipOrder\x12\x1a.oteldemo.ShipOrderRequest\x1a\x1b.oteldemo.ShipOrderResponse\"\x00\x32\xab\x01\n\x0f\x43urrencyService\x12U\n\x16GetSupportedCurrencies\x12\x0f.oteldemo.Empty\x1a(.oteldemo.GetSupportedCurrenciesResponse\"\x00\x12\x41\n\x07\x43onvert\x12#.oteldemo.CurrencyConversionRequest\x1a\x0f.oteldemo.Money\"\x00\x32O\n\x0ePaymentService\x12=\n\x06\x43harge\x12\x17.oteldemo.ChargeRequest\x1a\x18.oteldemo.ChargeResponse\"\x00\x32\x62\n\x0c\x45mailService\x12R\n\x15SendOrderConfirmation\x12&.oteldemo.SendOrderConfirmationRequest\x1a\x0f.oteldemo.Empty\"\x00\x32\\\n\x0f\x43heckoutService\x12I\n\nPlaceOrder\x12\x1b.oteldemo.PlaceOrderRequest\x1a\x1c.oteldemo.PlaceOrderResponse\"\x00\x32\x42\n\tAdService\x12\x35\n\x06GetAds\x12\x13.oteldemo.AdRequest\x1a\x14.oteldemo.AdResponse\"\x00\x32\xff\x02\n\x12\x46\x65\x61tureFlagService\x12@\n\x07GetFlag\x12\x18.oteldemo.GetFlagRequest\x1a\x19.oteldemo.GetFlagResponse\"\x00\x12I\n\nCreateFlag\x12\x1b.oteldemo.CreateFlagRequest\x1a\x1c.oteldemo.CreateFlagResponse\"\x00\x12I\n\nUpdateFlag\x12\x1b.oteldemo.UpdateFlagRequest\x1a\x1c.oteldemo.UpdateFlagResponse\"\x00\x12\x46\n\tListFlags\x12\x1a.oteldemo.ListFlagsRequest\x1a\x1b.oteldemo.ListFlagsResponse\"\x00\x12I\n\nDeleteFlag\x12\x1b.oteldemo.DeleteFlagRequest\x1a\x1c.oteldemo.DeleteFlagResponse\"\x00\x42\x13Z\x11genproto/oteldemob\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'demo_pb2', _globals) +if _descriptor._USE_C_DESCRIPTORS == False: + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'Z\021genproto/oteldemo' + _globals['_CARTITEM']._serialized_start=24 + _globals['_CARTITEM']._serialized_end=72 + _globals['_ADDITEMREQUEST']._serialized_start=74 + _globals['_ADDITEMREQUEST']._serialized_end=141 + _globals['_EMPTYCARTREQUEST']._serialized_start=143 + _globals['_EMPTYCARTREQUEST']._serialized_end=178 + _globals['_GETCARTREQUEST']._serialized_start=180 + _globals['_GETCARTREQUEST']._serialized_end=213 + _globals['_CART']._serialized_start=215 + _globals['_CART']._serialized_end=273 + _globals['_EMPTY']._serialized_start=275 + _globals['_EMPTY']._serialized_end=282 + _globals['_LISTRECOMMENDATIONSREQUEST']._serialized_start=284 + _globals['_LISTRECOMMENDATIONSREQUEST']._serialized_end=350 + _globals['_LISTRECOMMENDATIONSRESPONSE']._serialized_start=352 + _globals['_LISTRECOMMENDATIONSRESPONSE']._serialized_end=402 + _globals['_PRODUCT']._serialized_start=405 + _globals['_PRODUCT']._serialized_end=534 + _globals['_LISTPRODUCTSRESPONSE']._serialized_start=536 + _globals['_LISTPRODUCTSRESPONSE']._serialized_end=595 + _globals['_GETPRODUCTREQUEST']._serialized_start=597 + _globals['_GETPRODUCTREQUEST']._serialized_end=628 + _globals['_SEARCHPRODUCTSREQUEST']._serialized_start=630 + _globals['_SEARCHPRODUCTSREQUEST']._serialized_end=668 + _globals['_SEARCHPRODUCTSRESPONSE']._serialized_start=670 + _globals['_SEARCHPRODUCTSRESPONSE']._serialized_end=730 + _globals['_PRODUCTREVIEW']._serialized_start=732 + _globals['_PRODUCTREVIEW']._serialized_end=801 + _globals['_GETPRODUCTREVIEWSREQUEST']._serialized_start=803 + _globals['_GETPRODUCTREVIEWSREQUEST']._serialized_end=849 + _globals['_GETPRODUCTREVIEWSRESPONSE']._serialized_start=851 + _globals['_GETPRODUCTREVIEWSRESPONSE']._serialized_end=928 + _globals['_GETAVERAGEPRODUCTREVIEWSCOREREQUEST']._serialized_start=930 + _globals['_GETAVERAGEPRODUCTREVIEWSCOREREQUEST']._serialized_end=987 + _globals['_GETAVERAGEPRODUCTREVIEWSCORERESPONSE']._serialized_start=989 + _globals['_GETAVERAGEPRODUCTREVIEWSCORERESPONSE']._serialized_end=1050 + _globals['_ASKPRODUCTAIASSISTANTREQUEST']._serialized_start=1052 + _globals['_ASKPRODUCTAIASSISTANTREQUEST']._serialized_end=1120 + _globals['_ASKPRODUCTAIASSISTANTRESPONSE']._serialized_start=1122 + _globals['_ASKPRODUCTAIASSISTANTRESPONSE']._serialized_end=1171 + _globals['_GETQUOTEREQUEST']._serialized_start=1173 + _globals['_GETQUOTEREQUEST']._serialized_end=1261 + _globals['_GETQUOTERESPONSE']._serialized_start=1263 + _globals['_GETQUOTERESPONSE']._serialized_end=1316 + _globals['_SHIPORDERREQUEST']._serialized_start=1318 + _globals['_SHIPORDERREQUEST']._serialized_end=1407 + _globals['_SHIPORDERRESPONSE']._serialized_start=1409 + _globals['_SHIPORDERRESPONSE']._serialized_end=1449 + _globals['_ADDRESS']._serialized_start=1451 + _globals['_ADDRESS']._serialized_end=1548 + _globals['_MONEY']._serialized_start=1550 + _globals['_MONEY']._serialized_end=1610 + _globals['_GETSUPPORTEDCURRENCIESRESPONSE']._serialized_start=1612 + _globals['_GETSUPPORTEDCURRENCIESRESPONSE']._serialized_end=1668 + _globals['_CURRENCYCONVERSIONREQUEST']._serialized_start=1670 + _globals['_CURRENCYCONVERSIONREQUEST']._serialized_end=1745 + _globals['_CREDITCARDINFO']._serialized_start=1748 + _globals['_CREDITCARDINFO']._serialized_end=1892 + _globals['_CHARGEREQUEST']._serialized_start=1894 + _globals['_CHARGEREQUEST']._serialized_end=1989 + _globals['_CHARGERESPONSE']._serialized_start=1991 + _globals['_CHARGERESPONSE']._serialized_end=2031 + _globals['_ORDERITEM']._serialized_start=2033 + _globals['_ORDERITEM']._serialized_end=2109 + _globals['_ORDERRESULT']._serialized_start=2112 + _globals['_ORDERRESULT']._serialized_end=2294 + _globals['_SENDORDERCONFIRMATIONREQUEST']._serialized_start=2296 + _globals['_SENDORDERCONFIRMATIONREQUEST']._serialized_end=2379 + _globals['_PLACEORDERREQUEST']._serialized_start=2382 + _globals['_PLACEORDERREQUEST']._serialized_end=2539 + _globals['_PLACEORDERRESPONSE']._serialized_start=2541 + _globals['_PLACEORDERRESPONSE']._serialized_end=2599 + _globals['_ADREQUEST']._serialized_start=2601 + _globals['_ADREQUEST']._serialized_end=2634 + _globals['_ADRESPONSE']._serialized_start=2636 + _globals['_ADRESPONSE']._serialized_end=2675 + _globals['_AD']._serialized_start=2677 + _globals['_AD']._serialized_end=2717 + _globals['_FLAG']._serialized_start=2719 + _globals['_FLAG']._serialized_end=2777 + _globals['_GETFLAGREQUEST']._serialized_start=2779 + _globals['_GETFLAGREQUEST']._serialized_end=2809 + _globals['_GETFLAGRESPONSE']._serialized_start=2811 + _globals['_GETFLAGRESPONSE']._serialized_end=2858 + _globals['_CREATEFLAGREQUEST']._serialized_start=2860 + _globals['_CREATEFLAGREQUEST']._serialized_end=2931 + _globals['_CREATEFLAGRESPONSE']._serialized_start=2933 + _globals['_CREATEFLAGRESPONSE']._serialized_end=2983 + _globals['_UPDATEFLAGREQUEST']._serialized_start=2985 + _globals['_UPDATEFLAGREQUEST']._serialized_end=3035 + _globals['_UPDATEFLAGRESPONSE']._serialized_start=3037 + _globals['_UPDATEFLAGRESPONSE']._serialized_end=3057 + _globals['_LISTFLAGSREQUEST']._serialized_start=3059 + _globals['_LISTFLAGSREQUEST']._serialized_end=3077 + _globals['_LISTFLAGSRESPONSE']._serialized_start=3079 + _globals['_LISTFLAGSRESPONSE']._serialized_end=3128 + _globals['_DELETEFLAGREQUEST']._serialized_start=3130 + _globals['_DELETEFLAGREQUEST']._serialized_end=3163 + _globals['_DELETEFLAGRESPONSE']._serialized_start=3165 + _globals['_DELETEFLAGRESPONSE']._serialized_end=3185 + _globals['_CARTSERVICE']._serialized_start=3188 + _globals['_CARTSERVICE']._serialized_end=3372 + _globals['_RECOMMENDATIONSERVICE']._serialized_start=3374 + _globals['_RECOMMENDATIONSERVICE']._serialized_end=3499 + _globals['_PRODUCTCATALOGSERVICE']._serialized_start=3502 + _globals['_PRODUCTCATALOGSERVICE']._serialized_end=3743 + _globals['_PRODUCTREVIEWSERVICE']._serialized_start=3746 + _globals['_PRODUCTREVIEWSERVICE']._serialized_end=4101 + _globals['_SHIPPINGSERVICE']._serialized_start=4104 + _globals['_SHIPPINGSERVICE']._serialized_end=4262 + _globals['_CURRENCYSERVICE']._serialized_start=4265 + _globals['_CURRENCYSERVICE']._serialized_end=4436 + _globals['_PAYMENTSERVICE']._serialized_start=4438 + _globals['_PAYMENTSERVICE']._serialized_end=4517 + _globals['_EMAILSERVICE']._serialized_start=4519 + _globals['_EMAILSERVICE']._serialized_end=4617 + _globals['_CHECKOUTSERVICE']._serialized_start=4619 + _globals['_CHECKOUTSERVICE']._serialized_end=4711 + _globals['_ADSERVICE']._serialized_start=4713 + _globals['_ADSERVICE']._serialized_end=4779 + _globals['_FEATUREFLAGSERVICE']._serialized_start=4782 + _globals['_FEATUREFLAGSERVICE']._serialized_end=5165 +# @@protoc_insertion_point(module_scope) diff --git a/src/product-reviews/demo_pb2_grpc.py b/src/product-reviews/demo_pb2_grpc.py new file mode 100644 index 0000000000..747cf46de4 --- /dev/null +++ b/src/product-reviews/demo_pb2_grpc.py @@ -0,0 +1,1138 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +import demo_pb2 as demo__pb2 + + +class CartServiceStub(object): + """-----------------Cart service----------------- + + """ + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.AddItem = channel.unary_unary( + '/oteldemo.CartService/AddItem', + request_serializer=demo__pb2.AddItemRequest.SerializeToString, + response_deserializer=demo__pb2.Empty.FromString, + ) + self.GetCart = channel.unary_unary( + '/oteldemo.CartService/GetCart', + request_serializer=demo__pb2.GetCartRequest.SerializeToString, + response_deserializer=demo__pb2.Cart.FromString, + ) + self.EmptyCart = channel.unary_unary( + '/oteldemo.CartService/EmptyCart', + request_serializer=demo__pb2.EmptyCartRequest.SerializeToString, + response_deserializer=demo__pb2.Empty.FromString, + ) + + +class CartServiceServicer(object): + """-----------------Cart service----------------- + + """ + + def AddItem(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetCart(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def EmptyCart(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_CartServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'AddItem': grpc.unary_unary_rpc_method_handler( + servicer.AddItem, + request_deserializer=demo__pb2.AddItemRequest.FromString, + response_serializer=demo__pb2.Empty.SerializeToString, + ), + 'GetCart': grpc.unary_unary_rpc_method_handler( + servicer.GetCart, + request_deserializer=demo__pb2.GetCartRequest.FromString, + response_serializer=demo__pb2.Cart.SerializeToString, + ), + 'EmptyCart': grpc.unary_unary_rpc_method_handler( + servicer.EmptyCart, + request_deserializer=demo__pb2.EmptyCartRequest.FromString, + response_serializer=demo__pb2.Empty.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'oteldemo.CartService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class CartService(object): + """-----------------Cart service----------------- + + """ + + @staticmethod + def AddItem(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/oteldemo.CartService/AddItem', + demo__pb2.AddItemRequest.SerializeToString, + demo__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetCart(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/oteldemo.CartService/GetCart', + demo__pb2.GetCartRequest.SerializeToString, + demo__pb2.Cart.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def EmptyCart(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/oteldemo.CartService/EmptyCart', + demo__pb2.EmptyCartRequest.SerializeToString, + demo__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + +class RecommendationServiceStub(object): + """---------------Recommendation service---------- + + """ + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.ListRecommendations = channel.unary_unary( + '/oteldemo.RecommendationService/ListRecommendations', + request_serializer=demo__pb2.ListRecommendationsRequest.SerializeToString, + response_deserializer=demo__pb2.ListRecommendationsResponse.FromString, + ) + + +class RecommendationServiceServicer(object): + """---------------Recommendation service---------- + + """ + + def ListRecommendations(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_RecommendationServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'ListRecommendations': grpc.unary_unary_rpc_method_handler( + servicer.ListRecommendations, + request_deserializer=demo__pb2.ListRecommendationsRequest.FromString, + response_serializer=demo__pb2.ListRecommendationsResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'oteldemo.RecommendationService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class RecommendationService(object): + """---------------Recommendation service---------- + + """ + + @staticmethod + def ListRecommendations(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/oteldemo.RecommendationService/ListRecommendations', + demo__pb2.ListRecommendationsRequest.SerializeToString, + demo__pb2.ListRecommendationsResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + +class ProductCatalogServiceStub(object): + """---------------Product Catalog---------------- + + """ + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.ListProducts = channel.unary_unary( + '/oteldemo.ProductCatalogService/ListProducts', + request_serializer=demo__pb2.Empty.SerializeToString, + response_deserializer=demo__pb2.ListProductsResponse.FromString, + ) + self.GetProduct = channel.unary_unary( + '/oteldemo.ProductCatalogService/GetProduct', + request_serializer=demo__pb2.GetProductRequest.SerializeToString, + response_deserializer=demo__pb2.Product.FromString, + ) + self.SearchProducts = channel.unary_unary( + '/oteldemo.ProductCatalogService/SearchProducts', + request_serializer=demo__pb2.SearchProductsRequest.SerializeToString, + response_deserializer=demo__pb2.SearchProductsResponse.FromString, + ) + + +class ProductCatalogServiceServicer(object): + """---------------Product Catalog---------------- + + """ + + def ListProducts(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetProduct(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def SearchProducts(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_ProductCatalogServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'ListProducts': grpc.unary_unary_rpc_method_handler( + servicer.ListProducts, + request_deserializer=demo__pb2.Empty.FromString, + response_serializer=demo__pb2.ListProductsResponse.SerializeToString, + ), + 'GetProduct': grpc.unary_unary_rpc_method_handler( + servicer.GetProduct, + request_deserializer=demo__pb2.GetProductRequest.FromString, + response_serializer=demo__pb2.Product.SerializeToString, + ), + 'SearchProducts': grpc.unary_unary_rpc_method_handler( + servicer.SearchProducts, + request_deserializer=demo__pb2.SearchProductsRequest.FromString, + response_serializer=demo__pb2.SearchProductsResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'oteldemo.ProductCatalogService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class ProductCatalogService(object): + """---------------Product Catalog---------------- + + """ + + @staticmethod + def ListProducts(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/oteldemo.ProductCatalogService/ListProducts', + demo__pb2.Empty.SerializeToString, + demo__pb2.ListProductsResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetProduct(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/oteldemo.ProductCatalogService/GetProduct', + demo__pb2.GetProductRequest.SerializeToString, + demo__pb2.Product.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def SearchProducts(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/oteldemo.ProductCatalogService/SearchProducts', + demo__pb2.SearchProductsRequest.SerializeToString, + demo__pb2.SearchProductsResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + +class ProductReviewServiceStub(object): + """---------------Product Review service---------- + + """ + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.GetProductReviews = channel.unary_unary( + '/oteldemo.ProductReviewService/GetProductReviews', + request_serializer=demo__pb2.GetProductReviewsRequest.SerializeToString, + response_deserializer=demo__pb2.GetProductReviewsResponse.FromString, + ) + self.GetAverageProductReviewScore = channel.unary_unary( + '/oteldemo.ProductReviewService/GetAverageProductReviewScore', + request_serializer=demo__pb2.GetAverageProductReviewScoreRequest.SerializeToString, + response_deserializer=demo__pb2.GetAverageProductReviewScoreResponse.FromString, + ) + self.AskProductAIAssistant = channel.unary_unary( + '/oteldemo.ProductReviewService/AskProductAIAssistant', + request_serializer=demo__pb2.AskProductAIAssistantRequest.SerializeToString, + response_deserializer=demo__pb2.AskProductAIAssistantResponse.FromString, + ) + + +class ProductReviewServiceServicer(object): + """---------------Product Review service---------- + + """ + + def GetProductReviews(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetAverageProductReviewScore(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def AskProductAIAssistant(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_ProductReviewServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'GetProductReviews': grpc.unary_unary_rpc_method_handler( + servicer.GetProductReviews, + request_deserializer=demo__pb2.GetProductReviewsRequest.FromString, + response_serializer=demo__pb2.GetProductReviewsResponse.SerializeToString, + ), + 'GetAverageProductReviewScore': grpc.unary_unary_rpc_method_handler( + servicer.GetAverageProductReviewScore, + request_deserializer=demo__pb2.GetAverageProductReviewScoreRequest.FromString, + response_serializer=demo__pb2.GetAverageProductReviewScoreResponse.SerializeToString, + ), + 'AskProductAIAssistant': grpc.unary_unary_rpc_method_handler( + servicer.AskProductAIAssistant, + request_deserializer=demo__pb2.AskProductAIAssistantRequest.FromString, + response_serializer=demo__pb2.AskProductAIAssistantResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'oteldemo.ProductReviewService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class ProductReviewService(object): + """---------------Product Review service---------- + + """ + + @staticmethod + def GetProductReviews(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/oteldemo.ProductReviewService/GetProductReviews', + demo__pb2.GetProductReviewsRequest.SerializeToString, + demo__pb2.GetProductReviewsResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetAverageProductReviewScore(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/oteldemo.ProductReviewService/GetAverageProductReviewScore', + demo__pb2.GetAverageProductReviewScoreRequest.SerializeToString, + demo__pb2.GetAverageProductReviewScoreResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def AskProductAIAssistant(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/oteldemo.ProductReviewService/AskProductAIAssistant', + demo__pb2.AskProductAIAssistantRequest.SerializeToString, + demo__pb2.AskProductAIAssistantResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + +class ShippingServiceStub(object): + """---------------Shipping Service---------- + + """ + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.GetQuote = channel.unary_unary( + '/oteldemo.ShippingService/GetQuote', + request_serializer=demo__pb2.GetQuoteRequest.SerializeToString, + response_deserializer=demo__pb2.GetQuoteResponse.FromString, + ) + self.ShipOrder = channel.unary_unary( + '/oteldemo.ShippingService/ShipOrder', + request_serializer=demo__pb2.ShipOrderRequest.SerializeToString, + response_deserializer=demo__pb2.ShipOrderResponse.FromString, + ) + + +class ShippingServiceServicer(object): + """---------------Shipping Service---------- + + """ + + def GetQuote(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ShipOrder(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_ShippingServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'GetQuote': grpc.unary_unary_rpc_method_handler( + servicer.GetQuote, + request_deserializer=demo__pb2.GetQuoteRequest.FromString, + response_serializer=demo__pb2.GetQuoteResponse.SerializeToString, + ), + 'ShipOrder': grpc.unary_unary_rpc_method_handler( + servicer.ShipOrder, + request_deserializer=demo__pb2.ShipOrderRequest.FromString, + response_serializer=demo__pb2.ShipOrderResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'oteldemo.ShippingService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class ShippingService(object): + """---------------Shipping Service---------- + + """ + + @staticmethod + def GetQuote(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/oteldemo.ShippingService/GetQuote', + demo__pb2.GetQuoteRequest.SerializeToString, + demo__pb2.GetQuoteResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ShipOrder(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/oteldemo.ShippingService/ShipOrder', + demo__pb2.ShipOrderRequest.SerializeToString, + demo__pb2.ShipOrderResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + +class CurrencyServiceStub(object): + """-----------------Currency service----------------- + + """ + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.GetSupportedCurrencies = channel.unary_unary( + '/oteldemo.CurrencyService/GetSupportedCurrencies', + request_serializer=demo__pb2.Empty.SerializeToString, + response_deserializer=demo__pb2.GetSupportedCurrenciesResponse.FromString, + ) + self.Convert = channel.unary_unary( + '/oteldemo.CurrencyService/Convert', + request_serializer=demo__pb2.CurrencyConversionRequest.SerializeToString, + response_deserializer=demo__pb2.Money.FromString, + ) + + +class CurrencyServiceServicer(object): + """-----------------Currency service----------------- + + """ + + def GetSupportedCurrencies(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Convert(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_CurrencyServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'GetSupportedCurrencies': grpc.unary_unary_rpc_method_handler( + servicer.GetSupportedCurrencies, + request_deserializer=demo__pb2.Empty.FromString, + response_serializer=demo__pb2.GetSupportedCurrenciesResponse.SerializeToString, + ), + 'Convert': grpc.unary_unary_rpc_method_handler( + servicer.Convert, + request_deserializer=demo__pb2.CurrencyConversionRequest.FromString, + response_serializer=demo__pb2.Money.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'oteldemo.CurrencyService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class CurrencyService(object): + """-----------------Currency service----------------- + + """ + + @staticmethod + def GetSupportedCurrencies(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/oteldemo.CurrencyService/GetSupportedCurrencies', + demo__pb2.Empty.SerializeToString, + demo__pb2.GetSupportedCurrenciesResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def Convert(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/oteldemo.CurrencyService/Convert', + demo__pb2.CurrencyConversionRequest.SerializeToString, + demo__pb2.Money.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + +class PaymentServiceStub(object): + """-------------Payment service----------------- + + """ + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.Charge = channel.unary_unary( + '/oteldemo.PaymentService/Charge', + request_serializer=demo__pb2.ChargeRequest.SerializeToString, + response_deserializer=demo__pb2.ChargeResponse.FromString, + ) + + +class PaymentServiceServicer(object): + """-------------Payment service----------------- + + """ + + def Charge(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_PaymentServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'Charge': grpc.unary_unary_rpc_method_handler( + servicer.Charge, + request_deserializer=demo__pb2.ChargeRequest.FromString, + response_serializer=demo__pb2.ChargeResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'oteldemo.PaymentService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class PaymentService(object): + """-------------Payment service----------------- + + """ + + @staticmethod + def Charge(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/oteldemo.PaymentService/Charge', + demo__pb2.ChargeRequest.SerializeToString, + demo__pb2.ChargeResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + +class EmailServiceStub(object): + """-------------Email service----------------- + + """ + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.SendOrderConfirmation = channel.unary_unary( + '/oteldemo.EmailService/SendOrderConfirmation', + request_serializer=demo__pb2.SendOrderConfirmationRequest.SerializeToString, + response_deserializer=demo__pb2.Empty.FromString, + ) + + +class EmailServiceServicer(object): + """-------------Email service----------------- + + """ + + def SendOrderConfirmation(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_EmailServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'SendOrderConfirmation': grpc.unary_unary_rpc_method_handler( + servicer.SendOrderConfirmation, + request_deserializer=demo__pb2.SendOrderConfirmationRequest.FromString, + response_serializer=demo__pb2.Empty.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'oteldemo.EmailService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class EmailService(object): + """-------------Email service----------------- + + """ + + @staticmethod + def SendOrderConfirmation(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/oteldemo.EmailService/SendOrderConfirmation', + demo__pb2.SendOrderConfirmationRequest.SerializeToString, + demo__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + +class CheckoutServiceStub(object): + """-------------Checkout service----------------- + + """ + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.PlaceOrder = channel.unary_unary( + '/oteldemo.CheckoutService/PlaceOrder', + request_serializer=demo__pb2.PlaceOrderRequest.SerializeToString, + response_deserializer=demo__pb2.PlaceOrderResponse.FromString, + ) + + +class CheckoutServiceServicer(object): + """-------------Checkout service----------------- + + """ + + def PlaceOrder(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_CheckoutServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'PlaceOrder': grpc.unary_unary_rpc_method_handler( + servicer.PlaceOrder, + request_deserializer=demo__pb2.PlaceOrderRequest.FromString, + response_serializer=demo__pb2.PlaceOrderResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'oteldemo.CheckoutService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class CheckoutService(object): + """-------------Checkout service----------------- + + """ + + @staticmethod + def PlaceOrder(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/oteldemo.CheckoutService/PlaceOrder', + demo__pb2.PlaceOrderRequest.SerializeToString, + demo__pb2.PlaceOrderResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + +class AdServiceStub(object): + """------------Ad service------------------ + + """ + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.GetAds = channel.unary_unary( + '/oteldemo.AdService/GetAds', + request_serializer=demo__pb2.AdRequest.SerializeToString, + response_deserializer=demo__pb2.AdResponse.FromString, + ) + + +class AdServiceServicer(object): + """------------Ad service------------------ + + """ + + def GetAds(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_AdServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'GetAds': grpc.unary_unary_rpc_method_handler( + servicer.GetAds, + request_deserializer=demo__pb2.AdRequest.FromString, + response_serializer=demo__pb2.AdResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'oteldemo.AdService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class AdService(object): + """------------Ad service------------------ + + """ + + @staticmethod + def GetAds(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/oteldemo.AdService/GetAds', + demo__pb2.AdRequest.SerializeToString, + demo__pb2.AdResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + +class FeatureFlagServiceStub(object): + """------------Feature flag service------------------ + + """ + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.GetFlag = channel.unary_unary( + '/oteldemo.FeatureFlagService/GetFlag', + request_serializer=demo__pb2.GetFlagRequest.SerializeToString, + response_deserializer=demo__pb2.GetFlagResponse.FromString, + ) + self.CreateFlag = channel.unary_unary( + '/oteldemo.FeatureFlagService/CreateFlag', + request_serializer=demo__pb2.CreateFlagRequest.SerializeToString, + response_deserializer=demo__pb2.CreateFlagResponse.FromString, + ) + self.UpdateFlag = channel.unary_unary( + '/oteldemo.FeatureFlagService/UpdateFlag', + request_serializer=demo__pb2.UpdateFlagRequest.SerializeToString, + response_deserializer=demo__pb2.UpdateFlagResponse.FromString, + ) + self.ListFlags = channel.unary_unary( + '/oteldemo.FeatureFlagService/ListFlags', + request_serializer=demo__pb2.ListFlagsRequest.SerializeToString, + response_deserializer=demo__pb2.ListFlagsResponse.FromString, + ) + self.DeleteFlag = channel.unary_unary( + '/oteldemo.FeatureFlagService/DeleteFlag', + request_serializer=demo__pb2.DeleteFlagRequest.SerializeToString, + response_deserializer=demo__pb2.DeleteFlagResponse.FromString, + ) + + +class FeatureFlagServiceServicer(object): + """------------Feature flag service------------------ + + """ + + def GetFlag(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def CreateFlag(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def UpdateFlag(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ListFlags(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def DeleteFlag(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_FeatureFlagServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'GetFlag': grpc.unary_unary_rpc_method_handler( + servicer.GetFlag, + request_deserializer=demo__pb2.GetFlagRequest.FromString, + response_serializer=demo__pb2.GetFlagResponse.SerializeToString, + ), + 'CreateFlag': grpc.unary_unary_rpc_method_handler( + servicer.CreateFlag, + request_deserializer=demo__pb2.CreateFlagRequest.FromString, + response_serializer=demo__pb2.CreateFlagResponse.SerializeToString, + ), + 'UpdateFlag': grpc.unary_unary_rpc_method_handler( + servicer.UpdateFlag, + request_deserializer=demo__pb2.UpdateFlagRequest.FromString, + response_serializer=demo__pb2.UpdateFlagResponse.SerializeToString, + ), + 'ListFlags': grpc.unary_unary_rpc_method_handler( + servicer.ListFlags, + request_deserializer=demo__pb2.ListFlagsRequest.FromString, + response_serializer=demo__pb2.ListFlagsResponse.SerializeToString, + ), + 'DeleteFlag': grpc.unary_unary_rpc_method_handler( + servicer.DeleteFlag, + request_deserializer=demo__pb2.DeleteFlagRequest.FromString, + response_serializer=demo__pb2.DeleteFlagResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'oteldemo.FeatureFlagService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class FeatureFlagService(object): + """------------Feature flag service------------------ + + """ + + @staticmethod + def GetFlag(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/oteldemo.FeatureFlagService/GetFlag', + demo__pb2.GetFlagRequest.SerializeToString, + demo__pb2.GetFlagResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def CreateFlag(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/oteldemo.FeatureFlagService/CreateFlag', + demo__pb2.CreateFlagRequest.SerializeToString, + demo__pb2.CreateFlagResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def UpdateFlag(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/oteldemo.FeatureFlagService/UpdateFlag', + demo__pb2.UpdateFlagRequest.SerializeToString, + demo__pb2.UpdateFlagResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ListFlags(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/oteldemo.FeatureFlagService/ListFlags', + demo__pb2.ListFlagsRequest.SerializeToString, + demo__pb2.ListFlagsResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def DeleteFlag(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/oteldemo.FeatureFlagService/DeleteFlag', + demo__pb2.DeleteFlagRequest.SerializeToString, + demo__pb2.DeleteFlagResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/src/product-reviews/genproto/Dockerfile b/src/product-reviews/genproto/Dockerfile new file mode 100644 index 0000000000..ad9b646694 --- /dev/null +++ b/src/product-reviews/genproto/Dockerfile @@ -0,0 +1,8 @@ +# Copyright The OpenTelemetry Authors +# SPDX-License-Identifier: Apache-2.0 + +FROM python:3.12-slim-bookworm + +WORKDIR /build + +RUN python -m pip install grpcio-tools==1.59.2 diff --git a/src/product-reviews/metrics.py b/src/product-reviews/metrics.py new file mode 100644 index 0000000000..ce1a6b32ee --- /dev/null +++ b/src/product-reviews/metrics.py @@ -0,0 +1,23 @@ +#!/usr/bin/python + +# Copyright The OpenTelemetry Authors +# SPDX-License-Identifier: Apache-2.0 + +def init_metrics(meter): + + # Product reviews counter + app_product_review_counter = meter.create_counter( + 'app_product_review_counter', unit='reviews', description="Counts the total number of returned product reviews" + ) + + # AI Assistant counter + app_ai_assistant_counter = meter.create_counter( + 'app_ai_assistant_counter', unit='summaries', description="Counts the total number of AI Assistant requests" + ) + + product_review_svc_metrics = { + "app_product_review_counter": app_product_review_counter, + "app_ai_assistant_counter": app_ai_assistant_counter, + } + + return product_review_svc_metrics diff --git a/src/product-reviews/product_reviews_server.py b/src/product-reviews/product_reviews_server.py new file mode 100644 index 0000000000..845201e61c --- /dev/null +++ b/src/product-reviews/product_reviews_server.py @@ -0,0 +1,384 @@ +#!/usr/bin/python + +# Copyright The OpenTelemetry Authors +# SPDX-License-Identifier: Apache-2.0 + + +# Python +import os +import json +from concurrent import futures +import random + +# Pip +import grpc +from opentelemetry import trace, metrics +from opentelemetry._logs import set_logger_provider +from opentelemetry.exporter.otlp.proto.grpc._log_exporter import ( + OTLPLogExporter, +) +from opentelemetry.sdk._logs import LoggerProvider, LoggingHandler +from opentelemetry.sdk._logs.export import BatchLogRecordProcessor +from opentelemetry.sdk.resources import Resource +from opentelemetry.trace import Status, StatusCode + +# Local +import logging +import demo_pb2 +import demo_pb2_grpc +from grpc_health.v1 import health_pb2 +from grpc_health.v1 import health_pb2_grpc +from database import fetch_product_reviews, fetch_product_reviews_from_db, fetch_avg_product_review_score_from_db + +from openfeature import api +from openfeature.contrib.provider.flagd import FlagdProvider + +from metrics import ( + init_metrics +) + +# OpenAI +from openai import OpenAI + +from google.protobuf.json_format import MessageToJson, MessageToDict + +llm_host = None +llm_port = None +llm_mock_url = None +llm_base_url = None +llm_api_key = None +llm_model = None + +# --- Define the tool for the OpenAI API --- +tools = [ + { + "type": "function", + "function": { + "name": "fetch_product_reviews", + "description": "Executes a SQL query to retrieve reviews for a particular product.", + "parameters": { + "type": "object", + "properties": { + "product_id": { + "type": "string", + "description": "The product ID to fetch product reviews for.", + } + }, + "required": ["product_id"], + }, + } + }, + { + "type": "function", + "function": { + "name": "fetch_product_info", + "description": "Retrieves information for a particular product.", + "parameters": { + "type": "object", + "properties": { + "product_id": { + "type": "string", + "description": "The product ID to fetch information for.", + } + }, + "required": ["product_id"], + }, + } + } +] + +class ProductReviewService(demo_pb2_grpc.ProductReviewServiceServicer): + def GetProductReviews(self, request, context): + logger.info(f"Receive GetProductReviews for product id:{request.product_id}") + product_reviews = get_product_reviews(request.product_id) + + return product_reviews + + def GetAverageProductReviewScore(self, request, context): + logger.info(f"Receive GetAverageProductReviewScore for product id:{request.product_id}") + product_reviews = get_average_product_review_score(request.product_id) + + return product_reviews + + def AskProductAIAssistant(self, request, context): + logger.info(f"Receive AskProductAIAssistant for product id:{request.product_id}, question: {request.question}") + ai_assistant_response = get_ai_assistant_response(request.product_id, request.question) + + return ai_assistant_response + + def Check(self, request, context): + return health_pb2.HealthCheckResponse( + status=health_pb2.HealthCheckResponse.SERVING) + + def Watch(self, request, context): + return health_pb2.HealthCheckResponse( + status=health_pb2.HealthCheckResponse.UNIMPLEMENTED) + +def get_product_reviews(request_product_id): + + with tracer.start_as_current_span("get_product_reviews") as span: + + span.set_attribute("app.product.id", request_product_id) + + product_reviews = demo_pb2.GetProductReviewsResponse() + records = fetch_product_reviews_from_db(request_product_id) + + for row in records: + logger.info(f" username: {row[0]}, description: {row[1]}, score: {str(row[2])}") + product_reviews.product_reviews.add( + username=row[0], + description=row[1], + score=str(row[2]) + ) + + span.set_attribute("app.product_reviews.count", len(product_reviews.product_reviews)) + + # Collect metrics for this service + product_review_svc_metrics["app_product_review_counter"].add(len(product_reviews.product_reviews), {'product.id': request_product_id}) + + return product_reviews + +def get_average_product_review_score(request_product_id): + + with tracer.start_as_current_span("get_average_product_review_score") as span: + + span.set_attribute("app.product.id", request_product_id) + + product_review_score = demo_pb2.GetAverageProductReviewScoreResponse() + avg_score = fetch_avg_product_review_score_from_db(request_product_id) + product_review_score.average_score = avg_score + + span.set_attribute("app.product_reviews.average_score", avg_score) + + return product_review_score + +def get_ai_assistant_response(request_product_id, question): + + with tracer.start_as_current_span("get_ai_assistant_response") as span: + + ai_assistant_response = demo_pb2.AskProductAIAssistantResponse() + + span.set_attribute("app.product.id", request_product_id) + span.set_attribute("app.product.question", question) + + llm_rate_limit_error = check_feature_flag("llmRateLimitError") + logger.info(f"llmRateLimitError feature flag: {llm_rate_limit_error}") + if llm_rate_limit_error: + random_number = random.random() + logger.info(f"Generated a random number: {str(random_number)}") + # return a rate limit error 50% of the time + if random_number < 0.5: + + # ensure the mock LLM is always used, since we want to generate a 429 error + client = OpenAI( + base_url=f"{llm_mock_url}", + # The OpenAI API requires an api_key to be present, but + # our LLM doesn't use it + api_key=f"{llm_api_key}" + ) + + user_prompt = f"Answer the following question about product ID:{request_product_id}: {question}" + messages = [ + {"role": "system", "content": "You are a helpful assistant that answers related to a specific product. Use tools as needed to fetch the product reviews and product information. Keep the response brief with no more than 1-2 sentences. If you don't know the answer, just say you don't know."}, + {"role": "user", "content": user_prompt} + ] + logger.info(f"Invoking mock LLM with model: astronomy-llm-rate-limit") + + try: + initial_response = client.chat.completions.create( + model="astronomy-llm-rate-limit", + messages=messages, + tools=tools, + tool_choice="auto" + ) + except Exception as e: + logger.error(f"Caught Exception: {e}") + # Record the exception + span.record_exception(e) + # Set the span status to ERROR + span.set_status(Status(StatusCode.ERROR, description=str(e))) + ai_assistant_response.response = "The system is unable to process your response. Please try again later." + return ai_assistant_response + + # otherwise, continue processing the request as normal + client = OpenAI( + base_url=f"{llm_base_url}", + # The OpenAI API requires an api_key to be present, but + # our LLM doesn't use it + api_key=f"{llm_api_key}" + ) + + user_prompt = f"Answer the following question about product ID:{request_product_id}: {question}" + messages = [ + {"role": "system", "content": "You are a helpful assistant that answers related to a specific product. Use tools as needed to fetch the product reviews and product information. Keep the response brief with no more than 1-2 sentences. If you don't know the answer, just say you don't know."}, + {"role": "user", "content": user_prompt} + ] + + # use the LLM to summarize the product reviews + initial_response = client.chat.completions.create( + model=llm_model, + messages=messages, + tools=tools, + tool_choice="auto" + ) + + response_message = initial_response.choices[0].message + tool_calls = response_message.tool_calls + + logger.info(f"Response message: {response_message}") + + # Check if the model wants to call a tool + if tool_calls: + logger.info(f"Model wants to call {len(tool_calls)} tool(s)") + + # Append the assistant's message with tool calls + messages.append(response_message) + + # Process all tool calls + for tool_call in tool_calls: + function_name = tool_call.function.name + function_args = json.loads(tool_call.function.arguments) + + logger.info(f"Processing tool call: '{function_name}' with arguments: {function_args}") + + if function_name == "fetch_product_reviews": + function_response = fetch_product_reviews( + product_id=function_args.get("product_id") + ) + logger.info(f"Function response for fetch_product_reviews: '{function_response}'") + + elif function_name == "fetch_product_info": + function_response = fetch_product_info( + product_id=function_args.get("product_id") + ) + logger.info(f"Function response for fetch_product_info: '{function_response}'") + + else: + raise Exception(f'Received unexpected tool call request: {function_name}') + + # Append the tool response + messages.append( + { + "tool_call_id": tool_call.id, + "role": "tool", + "name": function_name, + "content": function_response, + } + ) + + llm_inaccurate_response = check_feature_flag("llmInaccurateResponse") + logger.info(f"llmInaccurateResponse feature flag: {llm_inaccurate_response}") + + if llm_inaccurate_response and request_product_id == "L9ECAV7KIM": + logger.info(f"Returning an inaccurate response for product_id: {request_product_id}") + # Add a final user message to ask the LLM to return an inaccurate response + messages.append( + { + "role": "user", + "content": f"Based on the tool results, answer the original question about product ID, but make the answer inaccurate:{request_product_id}. Keep the response brief with no more than 1-2 sentences." + } + ) + else: + # Add a final user message to guide the LLM to synthesize the response + messages.append( + { + "role": "user", + "content": f"Based on the tool results, answer the original question about product ID:{request_product_id}. Keep the response brief with no more than 1-2 sentences." + } + ) + + logger.info(f"Invoking the LLM with the following messages: '{messages}'") + + final_response = client.chat.completions.create( + model=llm_model, + messages=messages + ) + + result = final_response.choices[0].message.content + + ai_assistant_response.response = result + + logger.info(f"Returning an AI assistant response: '{result}'") + + else: + logger.info(f"Returning an AI assistant response: '{response_message}'") + ai_assistant_response.response = response_message.content + + # Collect metrics for this service + product_review_svc_metrics["app_ai_assistant_counter"].add(1, {'product.id': request_product_id}) + + return ai_assistant_response + +def fetch_product_info(product_id): + try: + product = product_catalog_stub.GetProduct(demo_pb2.GetProductRequest(id=product_id)) + logger.info(f"product_catalog_stub.GetProduct returned: '{product}'") + json_str = MessageToJson(product) + return json_str + except Exception as e: + return json.dumps({"error": str(e)}) + +def must_map_env(key: str): + value = os.environ.get(key) + if value is None: + raise Exception(f'{key} environment variable must be set') + return value + +def check_feature_flag(flag_name: str): + # Initialize OpenFeature + client = api.get_client() + return client.get_boolean_value(flag_name, False) + +if __name__ == "__main__": + service_name = must_map_env('OTEL_SERVICE_NAME') + + api.set_provider(FlagdProvider(host=os.environ.get('FLAGD_HOST', 'flagd'), port=os.environ.get('FLAGD_PORT', 8013))) + + # Initialize Traces and Metrics + tracer = trace.get_tracer_provider().get_tracer(service_name) + meter = metrics.get_meter_provider().get_meter(service_name) + + product_review_svc_metrics = init_metrics(meter) + + # Initialize Logs + logger_provider = LoggerProvider( + resource=Resource.create( + { + 'service.name': service_name, + } + ), + ) + set_logger_provider(logger_provider) + log_exporter = OTLPLogExporter(insecure=True) + logger_provider.add_log_record_processor(BatchLogRecordProcessor(log_exporter)) + handler = LoggingHandler(level=logging.NOTSET, logger_provider=logger_provider) + + # Attach OTLP handler to logger + logger = logging.getLogger('main') + logger.addHandler(handler) + + # Create gRPC server + server = grpc.server(futures.ThreadPoolExecutor(max_workers=10)) + + # Add class to gRPC server + service = ProductReviewService() + demo_pb2_grpc.add_ProductReviewServiceServicer_to_server(service, server) + health_pb2_grpc.add_HealthServicer_to_server(service, server) + + llm_host = must_map_env('LLM_HOST') + llm_port = must_map_env('LLM_PORT') + llm_mock_url = f"http://{llm_host}:{llm_port}/v1" + llm_base_url = must_map_env('LLM_BASE_URL') + llm_api_key = must_map_env('OPENAI_API_KEY') + llm_model = must_map_env('LLM_MODEL') + + catalog_addr = must_map_env('PRODUCT_CATALOG_ADDR') + pc_channel = grpc.insecure_channel(catalog_addr) + product_catalog_stub = demo_pb2_grpc.ProductCatalogServiceStub(pc_channel) + + # Start server + port = must_map_env('PRODUCT_REVIEWS_PORT') + server.add_insecure_port(f'[::]:{port}') + server.start() + logger.info(f'Product reviews service started, listening on port {port}') + server.wait_for_termination() diff --git a/src/product-reviews/requirements.txt b/src/product-reviews/requirements.txt new file mode 100644 index 0000000000..9a2c6d9f88 --- /dev/null +++ b/src/product-reviews/requirements.txt @@ -0,0 +1,11 @@ +grpcio-health-checking==1.71.0 +openfeature-hooks-opentelemetry==0.2.0 +openfeature-provider-flagd==0.2.3 +opentelemetry-distro==0.58b0 +opentelemetry-exporter-otlp-proto-grpc==1.37.0 +psutil==7.0.0 # Importing this will also import opentelemetry-instrumentation-system-metrics when running opentelemetry-bootstrap +python-dotenv==1.1.1 +python-json-logger==4.0.0 +psycopg2-binary==2.9.11 +openai==2.2.0 +simplejson==3.20.2 diff --git a/src/recommendation/demo_pb2.py b/src/recommendation/demo_pb2.py index 119dfb9842..b018ef2170 100644 --- a/src/recommendation/demo_pb2.py +++ b/src/recommendation/demo_pb2.py @@ -13,7 +13,7 @@ -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\ndemo.proto\x12\x08oteldemo\"0\n\x08\x43\x61rtItem\x12\x12\n\nproduct_id\x18\x01 \x01(\t\x12\x10\n\x08quantity\x18\x02 \x01(\x05\"C\n\x0e\x41\x64\x64ItemRequest\x12\x0f\n\x07user_id\x18\x01 \x01(\t\x12 \n\x04item\x18\x02 \x01(\x0b\x32\x12.oteldemo.CartItem\"#\n\x10\x45mptyCartRequest\x12\x0f\n\x07user_id\x18\x01 \x01(\t\"!\n\x0eGetCartRequest\x12\x0f\n\x07user_id\x18\x01 \x01(\t\":\n\x04\x43\x61rt\x12\x0f\n\x07user_id\x18\x01 \x01(\t\x12!\n\x05items\x18\x02 \x03(\x0b\x32\x12.oteldemo.CartItem\"\x07\n\x05\x45mpty\"B\n\x1aListRecommendationsRequest\x12\x0f\n\x07user_id\x18\x01 \x01(\t\x12\x13\n\x0bproduct_ids\x18\x02 \x03(\t\"2\n\x1bListRecommendationsResponse\x12\x13\n\x0bproduct_ids\x18\x01 \x03(\t\"\x81\x01\n\x07Product\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x0f\n\x07picture\x18\x04 \x01(\t\x12\"\n\tprice_usd\x18\x05 \x01(\x0b\x32\x0f.oteldemo.Money\x12\x12\n\ncategories\x18\x06 \x03(\t\";\n\x14ListProductsResponse\x12#\n\x08products\x18\x01 \x03(\x0b\x32\x11.oteldemo.Product\"\x1f\n\x11GetProductRequest\x12\n\n\x02id\x18\x01 \x01(\t\"&\n\x15SearchProductsRequest\x12\r\n\x05query\x18\x01 \x01(\t\"<\n\x16SearchProductsResponse\x12\"\n\x07results\x18\x01 \x03(\x0b\x32\x11.oteldemo.Product\"X\n\x0fGetQuoteRequest\x12\"\n\x07\x61\x64\x64ress\x18\x01 \x01(\x0b\x32\x11.oteldemo.Address\x12!\n\x05items\x18\x02 \x03(\x0b\x32\x12.oteldemo.CartItem\"5\n\x10GetQuoteResponse\x12!\n\x08\x63ost_usd\x18\x01 \x01(\x0b\x32\x0f.oteldemo.Money\"Y\n\x10ShipOrderRequest\x12\"\n\x07\x61\x64\x64ress\x18\x01 \x01(\x0b\x32\x11.oteldemo.Address\x12!\n\x05items\x18\x02 \x03(\x0b\x32\x12.oteldemo.CartItem\"(\n\x11ShipOrderResponse\x12\x13\n\x0btracking_id\x18\x01 \x01(\t\"a\n\x07\x41\x64\x64ress\x12\x16\n\x0estreet_address\x18\x01 \x01(\t\x12\x0c\n\x04\x63ity\x18\x02 \x01(\t\x12\r\n\x05state\x18\x03 \x01(\t\x12\x0f\n\x07\x63ountry\x18\x04 \x01(\t\x12\x10\n\x08zip_code\x18\x05 \x01(\t\"<\n\x05Money\x12\x15\n\rcurrency_code\x18\x01 \x01(\t\x12\r\n\x05units\x18\x02 \x01(\x03\x12\r\n\x05nanos\x18\x03 \x01(\x05\"8\n\x1eGetSupportedCurrenciesResponse\x12\x16\n\x0e\x63urrency_codes\x18\x01 \x03(\t\"K\n\x19\x43urrencyConversionRequest\x12\x1d\n\x04\x66rom\x18\x01 \x01(\x0b\x32\x0f.oteldemo.Money\x12\x0f\n\x07to_code\x18\x02 \x01(\t\"\x90\x01\n\x0e\x43reditCardInfo\x12\x1a\n\x12\x63redit_card_number\x18\x01 \x01(\t\x12\x17\n\x0f\x63redit_card_cvv\x18\x02 \x01(\x05\x12#\n\x1b\x63redit_card_expiration_year\x18\x03 \x01(\x05\x12$\n\x1c\x63redit_card_expiration_month\x18\x04 \x01(\x05\"_\n\rChargeRequest\x12\x1f\n\x06\x61mount\x18\x01 \x01(\x0b\x32\x0f.oteldemo.Money\x12-\n\x0b\x63redit_card\x18\x02 \x01(\x0b\x32\x18.oteldemo.CreditCardInfo\"(\n\x0e\x43hargeResponse\x12\x16\n\x0etransaction_id\x18\x01 \x01(\t\"L\n\tOrderItem\x12 \n\x04item\x18\x01 \x01(\x0b\x32\x12.oteldemo.CartItem\x12\x1d\n\x04\x63ost\x18\x02 \x01(\x0b\x32\x0f.oteldemo.Money\"\xb6\x01\n\x0bOrderResult\x12\x10\n\x08order_id\x18\x01 \x01(\t\x12\x1c\n\x14shipping_tracking_id\x18\x02 \x01(\t\x12&\n\rshipping_cost\x18\x03 \x01(\x0b\x32\x0f.oteldemo.Money\x12+\n\x10shipping_address\x18\x04 \x01(\x0b\x32\x11.oteldemo.Address\x12\"\n\x05items\x18\x05 \x03(\x0b\x32\x13.oteldemo.OrderItem\"S\n\x1cSendOrderConfirmationRequest\x12\r\n\x05\x65mail\x18\x01 \x01(\t\x12$\n\x05order\x18\x02 \x01(\x0b\x32\x15.oteldemo.OrderResult\"\x9d\x01\n\x11PlaceOrderRequest\x12\x0f\n\x07user_id\x18\x01 \x01(\t\x12\x15\n\ruser_currency\x18\x02 \x01(\t\x12\"\n\x07\x61\x64\x64ress\x18\x03 \x01(\x0b\x32\x11.oteldemo.Address\x12\r\n\x05\x65mail\x18\x05 \x01(\t\x12-\n\x0b\x63redit_card\x18\x06 \x01(\x0b\x32\x18.oteldemo.CreditCardInfo\":\n\x12PlaceOrderResponse\x12$\n\x05order\x18\x01 \x01(\x0b\x32\x15.oteldemo.OrderResult\"!\n\tAdRequest\x12\x14\n\x0c\x63ontext_keys\x18\x01 \x03(\t\"\'\n\nAdResponse\x12\x19\n\x03\x61\x64s\x18\x01 \x03(\x0b\x32\x0c.oteldemo.Ad\"(\n\x02\x41\x64\x12\x14\n\x0credirect_url\x18\x01 \x01(\t\x12\x0c\n\x04text\x18\x02 \x01(\t\":\n\x04\x46lag\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x0f\n\x07\x65nabled\x18\x03 \x01(\x08\"\x1e\n\x0eGetFlagRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"/\n\x0fGetFlagResponse\x12\x1c\n\x04\x66lag\x18\x01 \x01(\x0b\x32\x0e.oteldemo.Flag\"G\n\x11\x43reateFlagRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x0f\n\x07\x65nabled\x18\x03 \x01(\x08\"2\n\x12\x43reateFlagResponse\x12\x1c\n\x04\x66lag\x18\x01 \x01(\x0b\x32\x0e.oteldemo.Flag\"2\n\x11UpdateFlagRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07\x65nabled\x18\x02 \x01(\x08\"\x14\n\x12UpdateFlagResponse\"\x12\n\x10ListFlagsRequest\"1\n\x11ListFlagsResponse\x12\x1c\n\x04\x66lag\x18\x01 \x03(\x0b\x32\x0e.oteldemo.Flag\"!\n\x11\x44\x65leteFlagRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"\x14\n\x12\x44\x65leteFlagResponse2\xb8\x01\n\x0b\x43\x61rtService\x12\x36\n\x07\x41\x64\x64Item\x12\x18.oteldemo.AddItemRequest\x1a\x0f.oteldemo.Empty\"\x00\x12\x35\n\x07GetCart\x12\x18.oteldemo.GetCartRequest\x1a\x0e.oteldemo.Cart\"\x00\x12:\n\tEmptyCart\x12\x1a.oteldemo.EmptyCartRequest\x1a\x0f.oteldemo.Empty\"\x00\x32}\n\x15RecommendationService\x12\x64\n\x13ListRecommendations\x12$.oteldemo.ListRecommendationsRequest\x1a%.oteldemo.ListRecommendationsResponse\"\x00\x32\xf1\x01\n\x15ProductCatalogService\x12\x41\n\x0cListProducts\x12\x0f.oteldemo.Empty\x1a\x1e.oteldemo.ListProductsResponse\"\x00\x12>\n\nGetProduct\x12\x1b.oteldemo.GetProductRequest\x1a\x11.oteldemo.Product\"\x00\x12U\n\x0eSearchProducts\x12\x1f.oteldemo.SearchProductsRequest\x1a .oteldemo.SearchProductsResponse\"\x00\x32\x9e\x01\n\x0fShippingService\x12\x43\n\x08GetQuote\x12\x19.oteldemo.GetQuoteRequest\x1a\x1a.oteldemo.GetQuoteResponse\"\x00\x12\x46\n\tShipOrder\x12\x1a.oteldemo.ShipOrderRequest\x1a\x1b.oteldemo.ShipOrderResponse\"\x00\x32\xab\x01\n\x0f\x43urrencyService\x12U\n\x16GetSupportedCurrencies\x12\x0f.oteldemo.Empty\x1a(.oteldemo.GetSupportedCurrenciesResponse\"\x00\x12\x41\n\x07\x43onvert\x12#.oteldemo.CurrencyConversionRequest\x1a\x0f.oteldemo.Money\"\x00\x32O\n\x0ePaymentService\x12=\n\x06\x43harge\x12\x17.oteldemo.ChargeRequest\x1a\x18.oteldemo.ChargeResponse\"\x00\x32\x62\n\x0c\x45mailService\x12R\n\x15SendOrderConfirmation\x12&.oteldemo.SendOrderConfirmationRequest\x1a\x0f.oteldemo.Empty\"\x00\x32\\\n\x0f\x43heckoutService\x12I\n\nPlaceOrder\x12\x1b.oteldemo.PlaceOrderRequest\x1a\x1c.oteldemo.PlaceOrderResponse\"\x00\x32\x42\n\tAdService\x12\x35\n\x06GetAds\x12\x13.oteldemo.AdRequest\x1a\x14.oteldemo.AdResponse\"\x00\x32\xff\x02\n\x12\x46\x65\x61tureFlagService\x12@\n\x07GetFlag\x12\x18.oteldemo.GetFlagRequest\x1a\x19.oteldemo.GetFlagResponse\"\x00\x12I\n\nCreateFlag\x12\x1b.oteldemo.CreateFlagRequest\x1a\x1c.oteldemo.CreateFlagResponse\"\x00\x12I\n\nUpdateFlag\x12\x1b.oteldemo.UpdateFlagRequest\x1a\x1c.oteldemo.UpdateFlagResponse\"\x00\x12\x46\n\tListFlags\x12\x1a.oteldemo.ListFlagsRequest\x1a\x1b.oteldemo.ListFlagsResponse\"\x00\x12I\n\nDeleteFlag\x12\x1b.oteldemo.DeleteFlagRequest\x1a\x1c.oteldemo.DeleteFlagResponse\"\x00\x42\x13Z\x11genproto/oteldemob\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\ndemo.proto\x12\x08oteldemo\"0\n\x08\x43\x61rtItem\x12\x12\n\nproduct_id\x18\x01 \x01(\t\x12\x10\n\x08quantity\x18\x02 \x01(\x05\"C\n\x0e\x41\x64\x64ItemRequest\x12\x0f\n\x07user_id\x18\x01 \x01(\t\x12 \n\x04item\x18\x02 \x01(\x0b\x32\x12.oteldemo.CartItem\"#\n\x10\x45mptyCartRequest\x12\x0f\n\x07user_id\x18\x01 \x01(\t\"!\n\x0eGetCartRequest\x12\x0f\n\x07user_id\x18\x01 \x01(\t\":\n\x04\x43\x61rt\x12\x0f\n\x07user_id\x18\x01 \x01(\t\x12!\n\x05items\x18\x02 \x03(\x0b\x32\x12.oteldemo.CartItem\"\x07\n\x05\x45mpty\"B\n\x1aListRecommendationsRequest\x12\x0f\n\x07user_id\x18\x01 \x01(\t\x12\x13\n\x0bproduct_ids\x18\x02 \x03(\t\"2\n\x1bListRecommendationsResponse\x12\x13\n\x0bproduct_ids\x18\x01 \x03(\t\"\x81\x01\n\x07Product\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x0f\n\x07picture\x18\x04 \x01(\t\x12\"\n\tprice_usd\x18\x05 \x01(\x0b\x32\x0f.oteldemo.Money\x12\x12\n\ncategories\x18\x06 \x03(\t\";\n\x14ListProductsResponse\x12#\n\x08products\x18\x01 \x03(\x0b\x32\x11.oteldemo.Product\"\x1f\n\x11GetProductRequest\x12\n\n\x02id\x18\x01 \x01(\t\"&\n\x15SearchProductsRequest\x12\r\n\x05query\x18\x01 \x01(\t\"<\n\x16SearchProductsResponse\x12\"\n\x07results\x18\x01 \x03(\x0b\x32\x11.oteldemo.Product\"E\n\rProductReview\x12\x10\n\x08username\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\r\n\x05score\x18\x03 \x01(\t\".\n\x18GetProductReviewsRequest\x12\x12\n\nproduct_id\x18\x01 \x01(\t\"M\n\x19GetProductReviewsResponse\x12\x30\n\x0fproduct_reviews\x18\x01 \x03(\x0b\x32\x17.oteldemo.ProductReview\"9\n#GetAverageProductReviewScoreRequest\x12\x12\n\nproduct_id\x18\x01 \x01(\t\"=\n$GetAverageProductReviewScoreResponse\x12\x15\n\raverage_score\x18\x01 \x01(\t\"D\n\x1c\x41skProductAIAssistantRequest\x12\x12\n\nproduct_id\x18\x01 \x01(\t\x12\x10\n\x08question\x18\x02 \x01(\t\"1\n\x1d\x41skProductAIAssistantResponse\x12\x10\n\x08response\x18\x01 \x01(\t\"X\n\x0fGetQuoteRequest\x12\"\n\x07\x61\x64\x64ress\x18\x01 \x01(\x0b\x32\x11.oteldemo.Address\x12!\n\x05items\x18\x02 \x03(\x0b\x32\x12.oteldemo.CartItem\"5\n\x10GetQuoteResponse\x12!\n\x08\x63ost_usd\x18\x01 \x01(\x0b\x32\x0f.oteldemo.Money\"Y\n\x10ShipOrderRequest\x12\"\n\x07\x61\x64\x64ress\x18\x01 \x01(\x0b\x32\x11.oteldemo.Address\x12!\n\x05items\x18\x02 \x03(\x0b\x32\x12.oteldemo.CartItem\"(\n\x11ShipOrderResponse\x12\x13\n\x0btracking_id\x18\x01 \x01(\t\"a\n\x07\x41\x64\x64ress\x12\x16\n\x0estreet_address\x18\x01 \x01(\t\x12\x0c\n\x04\x63ity\x18\x02 \x01(\t\x12\r\n\x05state\x18\x03 \x01(\t\x12\x0f\n\x07\x63ountry\x18\x04 \x01(\t\x12\x10\n\x08zip_code\x18\x05 \x01(\t\"<\n\x05Money\x12\x15\n\rcurrency_code\x18\x01 \x01(\t\x12\r\n\x05units\x18\x02 \x01(\x03\x12\r\n\x05nanos\x18\x03 \x01(\x05\"8\n\x1eGetSupportedCurrenciesResponse\x12\x16\n\x0e\x63urrency_codes\x18\x01 \x03(\t\"K\n\x19\x43urrencyConversionRequest\x12\x1d\n\x04\x66rom\x18\x01 \x01(\x0b\x32\x0f.oteldemo.Money\x12\x0f\n\x07to_code\x18\x02 \x01(\t\"\x90\x01\n\x0e\x43reditCardInfo\x12\x1a\n\x12\x63redit_card_number\x18\x01 \x01(\t\x12\x17\n\x0f\x63redit_card_cvv\x18\x02 \x01(\x05\x12#\n\x1b\x63redit_card_expiration_year\x18\x03 \x01(\x05\x12$\n\x1c\x63redit_card_expiration_month\x18\x04 \x01(\x05\"_\n\rChargeRequest\x12\x1f\n\x06\x61mount\x18\x01 \x01(\x0b\x32\x0f.oteldemo.Money\x12-\n\x0b\x63redit_card\x18\x02 \x01(\x0b\x32\x18.oteldemo.CreditCardInfo\"(\n\x0e\x43hargeResponse\x12\x16\n\x0etransaction_id\x18\x01 \x01(\t\"L\n\tOrderItem\x12 \n\x04item\x18\x01 \x01(\x0b\x32\x12.oteldemo.CartItem\x12\x1d\n\x04\x63ost\x18\x02 \x01(\x0b\x32\x0f.oteldemo.Money\"\xb6\x01\n\x0bOrderResult\x12\x10\n\x08order_id\x18\x01 \x01(\t\x12\x1c\n\x14shipping_tracking_id\x18\x02 \x01(\t\x12&\n\rshipping_cost\x18\x03 \x01(\x0b\x32\x0f.oteldemo.Money\x12+\n\x10shipping_address\x18\x04 \x01(\x0b\x32\x11.oteldemo.Address\x12\"\n\x05items\x18\x05 \x03(\x0b\x32\x13.oteldemo.OrderItem\"S\n\x1cSendOrderConfirmationRequest\x12\r\n\x05\x65mail\x18\x01 \x01(\t\x12$\n\x05order\x18\x02 \x01(\x0b\x32\x15.oteldemo.OrderResult\"\x9d\x01\n\x11PlaceOrderRequest\x12\x0f\n\x07user_id\x18\x01 \x01(\t\x12\x15\n\ruser_currency\x18\x02 \x01(\t\x12\"\n\x07\x61\x64\x64ress\x18\x03 \x01(\x0b\x32\x11.oteldemo.Address\x12\r\n\x05\x65mail\x18\x05 \x01(\t\x12-\n\x0b\x63redit_card\x18\x06 \x01(\x0b\x32\x18.oteldemo.CreditCardInfo\":\n\x12PlaceOrderResponse\x12$\n\x05order\x18\x01 \x01(\x0b\x32\x15.oteldemo.OrderResult\"!\n\tAdRequest\x12\x14\n\x0c\x63ontext_keys\x18\x01 \x03(\t\"\'\n\nAdResponse\x12\x19\n\x03\x61\x64s\x18\x01 \x03(\x0b\x32\x0c.oteldemo.Ad\"(\n\x02\x41\x64\x12\x14\n\x0credirect_url\x18\x01 \x01(\t\x12\x0c\n\x04text\x18\x02 \x01(\t\":\n\x04\x46lag\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x0f\n\x07\x65nabled\x18\x03 \x01(\x08\"\x1e\n\x0eGetFlagRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"/\n\x0fGetFlagResponse\x12\x1c\n\x04\x66lag\x18\x01 \x01(\x0b\x32\x0e.oteldemo.Flag\"G\n\x11\x43reateFlagRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x0f\n\x07\x65nabled\x18\x03 \x01(\x08\"2\n\x12\x43reateFlagResponse\x12\x1c\n\x04\x66lag\x18\x01 \x01(\x0b\x32\x0e.oteldemo.Flag\"2\n\x11UpdateFlagRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07\x65nabled\x18\x02 \x01(\x08\"\x14\n\x12UpdateFlagResponse\"\x12\n\x10ListFlagsRequest\"1\n\x11ListFlagsResponse\x12\x1c\n\x04\x66lag\x18\x01 \x03(\x0b\x32\x0e.oteldemo.Flag\"!\n\x11\x44\x65leteFlagRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"\x14\n\x12\x44\x65leteFlagResponse2\xb8\x01\n\x0b\x43\x61rtService\x12\x36\n\x07\x41\x64\x64Item\x12\x18.oteldemo.AddItemRequest\x1a\x0f.oteldemo.Empty\"\x00\x12\x35\n\x07GetCart\x12\x18.oteldemo.GetCartRequest\x1a\x0e.oteldemo.Cart\"\x00\x12:\n\tEmptyCart\x12\x1a.oteldemo.EmptyCartRequest\x1a\x0f.oteldemo.Empty\"\x00\x32}\n\x15RecommendationService\x12\x64\n\x13ListRecommendations\x12$.oteldemo.ListRecommendationsRequest\x1a%.oteldemo.ListRecommendationsResponse\"\x00\x32\xf1\x01\n\x15ProductCatalogService\x12\x41\n\x0cListProducts\x12\x0f.oteldemo.Empty\x1a\x1e.oteldemo.ListProductsResponse\"\x00\x12>\n\nGetProduct\x12\x1b.oteldemo.GetProductRequest\x1a\x11.oteldemo.Product\"\x00\x12U\n\x0eSearchProducts\x12\x1f.oteldemo.SearchProductsRequest\x1a .oteldemo.SearchProductsResponse\"\x00\x32\xe3\x02\n\x14ProductReviewService\x12^\n\x11GetProductReviews\x12\".oteldemo.GetProductReviewsRequest\x1a#.oteldemo.GetProductReviewsResponse\"\x00\x12\x7f\n\x1cGetAverageProductReviewScore\x12-.oteldemo.GetAverageProductReviewScoreRequest\x1a..oteldemo.GetAverageProductReviewScoreResponse\"\x00\x12j\n\x15\x41skProductAIAssistant\x12&.oteldemo.AskProductAIAssistantRequest\x1a\'.oteldemo.AskProductAIAssistantResponse\"\x00\x32\x9e\x01\n\x0fShippingService\x12\x43\n\x08GetQuote\x12\x19.oteldemo.GetQuoteRequest\x1a\x1a.oteldemo.GetQuoteResponse\"\x00\x12\x46\n\tShipOrder\x12\x1a.oteldemo.ShipOrderRequest\x1a\x1b.oteldemo.ShipOrderResponse\"\x00\x32\xab\x01\n\x0f\x43urrencyService\x12U\n\x16GetSupportedCurrencies\x12\x0f.oteldemo.Empty\x1a(.oteldemo.GetSupportedCurrenciesResponse\"\x00\x12\x41\n\x07\x43onvert\x12#.oteldemo.CurrencyConversionRequest\x1a\x0f.oteldemo.Money\"\x00\x32O\n\x0ePaymentService\x12=\n\x06\x43harge\x12\x17.oteldemo.ChargeRequest\x1a\x18.oteldemo.ChargeResponse\"\x00\x32\x62\n\x0c\x45mailService\x12R\n\x15SendOrderConfirmation\x12&.oteldemo.SendOrderConfirmationRequest\x1a\x0f.oteldemo.Empty\"\x00\x32\\\n\x0f\x43heckoutService\x12I\n\nPlaceOrder\x12\x1b.oteldemo.PlaceOrderRequest\x1a\x1c.oteldemo.PlaceOrderResponse\"\x00\x32\x42\n\tAdService\x12\x35\n\x06GetAds\x12\x13.oteldemo.AdRequest\x1a\x14.oteldemo.AdResponse\"\x00\x32\xff\x02\n\x12\x46\x65\x61tureFlagService\x12@\n\x07GetFlag\x12\x18.oteldemo.GetFlagRequest\x1a\x19.oteldemo.GetFlagResponse\"\x00\x12I\n\nCreateFlag\x12\x1b.oteldemo.CreateFlagRequest\x1a\x1c.oteldemo.CreateFlagResponse\"\x00\x12I\n\nUpdateFlag\x12\x1b.oteldemo.UpdateFlagRequest\x1a\x1c.oteldemo.UpdateFlagResponse\"\x00\x12\x46\n\tListFlags\x12\x1a.oteldemo.ListFlagsRequest\x1a\x1b.oteldemo.ListFlagsResponse\"\x00\x12I\n\nDeleteFlag\x12\x1b.oteldemo.DeleteFlagRequest\x1a\x1c.oteldemo.DeleteFlagResponse\"\x00\x42\x13Z\x11genproto/oteldemob\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -47,84 +47,100 @@ _globals['_SEARCHPRODUCTSREQUEST']._serialized_end=668 _globals['_SEARCHPRODUCTSRESPONSE']._serialized_start=670 _globals['_SEARCHPRODUCTSRESPONSE']._serialized_end=730 - _globals['_GETQUOTEREQUEST']._serialized_start=732 - _globals['_GETQUOTEREQUEST']._serialized_end=820 - _globals['_GETQUOTERESPONSE']._serialized_start=822 - _globals['_GETQUOTERESPONSE']._serialized_end=875 - _globals['_SHIPORDERREQUEST']._serialized_start=877 - _globals['_SHIPORDERREQUEST']._serialized_end=966 - _globals['_SHIPORDERRESPONSE']._serialized_start=968 - _globals['_SHIPORDERRESPONSE']._serialized_end=1008 - _globals['_ADDRESS']._serialized_start=1010 - _globals['_ADDRESS']._serialized_end=1107 - _globals['_MONEY']._serialized_start=1109 - _globals['_MONEY']._serialized_end=1169 - _globals['_GETSUPPORTEDCURRENCIESRESPONSE']._serialized_start=1171 - _globals['_GETSUPPORTEDCURRENCIESRESPONSE']._serialized_end=1227 - _globals['_CURRENCYCONVERSIONREQUEST']._serialized_start=1229 - _globals['_CURRENCYCONVERSIONREQUEST']._serialized_end=1304 - _globals['_CREDITCARDINFO']._serialized_start=1307 - _globals['_CREDITCARDINFO']._serialized_end=1451 - _globals['_CHARGEREQUEST']._serialized_start=1453 - _globals['_CHARGEREQUEST']._serialized_end=1548 - _globals['_CHARGERESPONSE']._serialized_start=1550 - _globals['_CHARGERESPONSE']._serialized_end=1590 - _globals['_ORDERITEM']._serialized_start=1592 - _globals['_ORDERITEM']._serialized_end=1668 - _globals['_ORDERRESULT']._serialized_start=1671 - _globals['_ORDERRESULT']._serialized_end=1853 - _globals['_SENDORDERCONFIRMATIONREQUEST']._serialized_start=1855 - _globals['_SENDORDERCONFIRMATIONREQUEST']._serialized_end=1938 - _globals['_PLACEORDERREQUEST']._serialized_start=1941 - _globals['_PLACEORDERREQUEST']._serialized_end=2098 - _globals['_PLACEORDERRESPONSE']._serialized_start=2100 - _globals['_PLACEORDERRESPONSE']._serialized_end=2158 - _globals['_ADREQUEST']._serialized_start=2160 - _globals['_ADREQUEST']._serialized_end=2193 - _globals['_ADRESPONSE']._serialized_start=2195 - _globals['_ADRESPONSE']._serialized_end=2234 - _globals['_AD']._serialized_start=2236 - _globals['_AD']._serialized_end=2276 - _globals['_FLAG']._serialized_start=2278 - _globals['_FLAG']._serialized_end=2336 - _globals['_GETFLAGREQUEST']._serialized_start=2338 - _globals['_GETFLAGREQUEST']._serialized_end=2368 - _globals['_GETFLAGRESPONSE']._serialized_start=2370 - _globals['_GETFLAGRESPONSE']._serialized_end=2417 - _globals['_CREATEFLAGREQUEST']._serialized_start=2419 - _globals['_CREATEFLAGREQUEST']._serialized_end=2490 - _globals['_CREATEFLAGRESPONSE']._serialized_start=2492 - _globals['_CREATEFLAGRESPONSE']._serialized_end=2542 - _globals['_UPDATEFLAGREQUEST']._serialized_start=2544 - _globals['_UPDATEFLAGREQUEST']._serialized_end=2594 - _globals['_UPDATEFLAGRESPONSE']._serialized_start=2596 - _globals['_UPDATEFLAGRESPONSE']._serialized_end=2616 - _globals['_LISTFLAGSREQUEST']._serialized_start=2618 - _globals['_LISTFLAGSREQUEST']._serialized_end=2636 - _globals['_LISTFLAGSRESPONSE']._serialized_start=2638 - _globals['_LISTFLAGSRESPONSE']._serialized_end=2687 - _globals['_DELETEFLAGREQUEST']._serialized_start=2689 - _globals['_DELETEFLAGREQUEST']._serialized_end=2722 - _globals['_DELETEFLAGRESPONSE']._serialized_start=2724 - _globals['_DELETEFLAGRESPONSE']._serialized_end=2744 - _globals['_CARTSERVICE']._serialized_start=2747 - _globals['_CARTSERVICE']._serialized_end=2931 - _globals['_RECOMMENDATIONSERVICE']._serialized_start=2933 - _globals['_RECOMMENDATIONSERVICE']._serialized_end=3058 - _globals['_PRODUCTCATALOGSERVICE']._serialized_start=3061 - _globals['_PRODUCTCATALOGSERVICE']._serialized_end=3302 - _globals['_SHIPPINGSERVICE']._serialized_start=3305 - _globals['_SHIPPINGSERVICE']._serialized_end=3463 - _globals['_CURRENCYSERVICE']._serialized_start=3466 - _globals['_CURRENCYSERVICE']._serialized_end=3637 - _globals['_PAYMENTSERVICE']._serialized_start=3639 - _globals['_PAYMENTSERVICE']._serialized_end=3718 - _globals['_EMAILSERVICE']._serialized_start=3720 - _globals['_EMAILSERVICE']._serialized_end=3818 - _globals['_CHECKOUTSERVICE']._serialized_start=3820 - _globals['_CHECKOUTSERVICE']._serialized_end=3912 - _globals['_ADSERVICE']._serialized_start=3914 - _globals['_ADSERVICE']._serialized_end=3980 - _globals['_FEATUREFLAGSERVICE']._serialized_start=3983 - _globals['_FEATUREFLAGSERVICE']._serialized_end=4366 + _globals['_PRODUCTREVIEW']._serialized_start=732 + _globals['_PRODUCTREVIEW']._serialized_end=801 + _globals['_GETPRODUCTREVIEWSREQUEST']._serialized_start=803 + _globals['_GETPRODUCTREVIEWSREQUEST']._serialized_end=849 + _globals['_GETPRODUCTREVIEWSRESPONSE']._serialized_start=851 + _globals['_GETPRODUCTREVIEWSRESPONSE']._serialized_end=928 + _globals['_GETAVERAGEPRODUCTREVIEWSCOREREQUEST']._serialized_start=930 + _globals['_GETAVERAGEPRODUCTREVIEWSCOREREQUEST']._serialized_end=987 + _globals['_GETAVERAGEPRODUCTREVIEWSCORERESPONSE']._serialized_start=989 + _globals['_GETAVERAGEPRODUCTREVIEWSCORERESPONSE']._serialized_end=1050 + _globals['_ASKPRODUCTAIASSISTANTREQUEST']._serialized_start=1052 + _globals['_ASKPRODUCTAIASSISTANTREQUEST']._serialized_end=1120 + _globals['_ASKPRODUCTAIASSISTANTRESPONSE']._serialized_start=1122 + _globals['_ASKPRODUCTAIASSISTANTRESPONSE']._serialized_end=1171 + _globals['_GETQUOTEREQUEST']._serialized_start=1173 + _globals['_GETQUOTEREQUEST']._serialized_end=1261 + _globals['_GETQUOTERESPONSE']._serialized_start=1263 + _globals['_GETQUOTERESPONSE']._serialized_end=1316 + _globals['_SHIPORDERREQUEST']._serialized_start=1318 + _globals['_SHIPORDERREQUEST']._serialized_end=1407 + _globals['_SHIPORDERRESPONSE']._serialized_start=1409 + _globals['_SHIPORDERRESPONSE']._serialized_end=1449 + _globals['_ADDRESS']._serialized_start=1451 + _globals['_ADDRESS']._serialized_end=1548 + _globals['_MONEY']._serialized_start=1550 + _globals['_MONEY']._serialized_end=1610 + _globals['_GETSUPPORTEDCURRENCIESRESPONSE']._serialized_start=1612 + _globals['_GETSUPPORTEDCURRENCIESRESPONSE']._serialized_end=1668 + _globals['_CURRENCYCONVERSIONREQUEST']._serialized_start=1670 + _globals['_CURRENCYCONVERSIONREQUEST']._serialized_end=1745 + _globals['_CREDITCARDINFO']._serialized_start=1748 + _globals['_CREDITCARDINFO']._serialized_end=1892 + _globals['_CHARGEREQUEST']._serialized_start=1894 + _globals['_CHARGEREQUEST']._serialized_end=1989 + _globals['_CHARGERESPONSE']._serialized_start=1991 + _globals['_CHARGERESPONSE']._serialized_end=2031 + _globals['_ORDERITEM']._serialized_start=2033 + _globals['_ORDERITEM']._serialized_end=2109 + _globals['_ORDERRESULT']._serialized_start=2112 + _globals['_ORDERRESULT']._serialized_end=2294 + _globals['_SENDORDERCONFIRMATIONREQUEST']._serialized_start=2296 + _globals['_SENDORDERCONFIRMATIONREQUEST']._serialized_end=2379 + _globals['_PLACEORDERREQUEST']._serialized_start=2382 + _globals['_PLACEORDERREQUEST']._serialized_end=2539 + _globals['_PLACEORDERRESPONSE']._serialized_start=2541 + _globals['_PLACEORDERRESPONSE']._serialized_end=2599 + _globals['_ADREQUEST']._serialized_start=2601 + _globals['_ADREQUEST']._serialized_end=2634 + _globals['_ADRESPONSE']._serialized_start=2636 + _globals['_ADRESPONSE']._serialized_end=2675 + _globals['_AD']._serialized_start=2677 + _globals['_AD']._serialized_end=2717 + _globals['_FLAG']._serialized_start=2719 + _globals['_FLAG']._serialized_end=2777 + _globals['_GETFLAGREQUEST']._serialized_start=2779 + _globals['_GETFLAGREQUEST']._serialized_end=2809 + _globals['_GETFLAGRESPONSE']._serialized_start=2811 + _globals['_GETFLAGRESPONSE']._serialized_end=2858 + _globals['_CREATEFLAGREQUEST']._serialized_start=2860 + _globals['_CREATEFLAGREQUEST']._serialized_end=2931 + _globals['_CREATEFLAGRESPONSE']._serialized_start=2933 + _globals['_CREATEFLAGRESPONSE']._serialized_end=2983 + _globals['_UPDATEFLAGREQUEST']._serialized_start=2985 + _globals['_UPDATEFLAGREQUEST']._serialized_end=3035 + _globals['_UPDATEFLAGRESPONSE']._serialized_start=3037 + _globals['_UPDATEFLAGRESPONSE']._serialized_end=3057 + _globals['_LISTFLAGSREQUEST']._serialized_start=3059 + _globals['_LISTFLAGSREQUEST']._serialized_end=3077 + _globals['_LISTFLAGSRESPONSE']._serialized_start=3079 + _globals['_LISTFLAGSRESPONSE']._serialized_end=3128 + _globals['_DELETEFLAGREQUEST']._serialized_start=3130 + _globals['_DELETEFLAGREQUEST']._serialized_end=3163 + _globals['_DELETEFLAGRESPONSE']._serialized_start=3165 + _globals['_DELETEFLAGRESPONSE']._serialized_end=3185 + _globals['_CARTSERVICE']._serialized_start=3188 + _globals['_CARTSERVICE']._serialized_end=3372 + _globals['_RECOMMENDATIONSERVICE']._serialized_start=3374 + _globals['_RECOMMENDATIONSERVICE']._serialized_end=3499 + _globals['_PRODUCTCATALOGSERVICE']._serialized_start=3502 + _globals['_PRODUCTCATALOGSERVICE']._serialized_end=3743 + _globals['_PRODUCTREVIEWSERVICE']._serialized_start=3746 + _globals['_PRODUCTREVIEWSERVICE']._serialized_end=4101 + _globals['_SHIPPINGSERVICE']._serialized_start=4104 + _globals['_SHIPPINGSERVICE']._serialized_end=4262 + _globals['_CURRENCYSERVICE']._serialized_start=4265 + _globals['_CURRENCYSERVICE']._serialized_end=4436 + _globals['_PAYMENTSERVICE']._serialized_start=4438 + _globals['_PAYMENTSERVICE']._serialized_end=4517 + _globals['_EMAILSERVICE']._serialized_start=4519 + _globals['_EMAILSERVICE']._serialized_end=4617 + _globals['_CHECKOUTSERVICE']._serialized_start=4619 + _globals['_CHECKOUTSERVICE']._serialized_end=4711 + _globals['_ADSERVICE']._serialized_start=4713 + _globals['_ADSERVICE']._serialized_end=4779 + _globals['_FEATUREFLAGSERVICE']._serialized_start=4782 + _globals['_FEATUREFLAGSERVICE']._serialized_end=5165 # @@protoc_insertion_point(module_scope) diff --git a/src/recommendation/demo_pb2_grpc.py b/src/recommendation/demo_pb2_grpc.py index cb7c9e7140..747cf46de4 100644 --- a/src/recommendation/demo_pb2_grpc.py +++ b/src/recommendation/demo_pb2_grpc.py @@ -338,6 +338,139 @@ def SearchProducts(request, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) +class ProductReviewServiceStub(object): + """---------------Product Review service---------- + + """ + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.GetProductReviews = channel.unary_unary( + '/oteldemo.ProductReviewService/GetProductReviews', + request_serializer=demo__pb2.GetProductReviewsRequest.SerializeToString, + response_deserializer=demo__pb2.GetProductReviewsResponse.FromString, + ) + self.GetAverageProductReviewScore = channel.unary_unary( + '/oteldemo.ProductReviewService/GetAverageProductReviewScore', + request_serializer=demo__pb2.GetAverageProductReviewScoreRequest.SerializeToString, + response_deserializer=demo__pb2.GetAverageProductReviewScoreResponse.FromString, + ) + self.AskProductAIAssistant = channel.unary_unary( + '/oteldemo.ProductReviewService/AskProductAIAssistant', + request_serializer=demo__pb2.AskProductAIAssistantRequest.SerializeToString, + response_deserializer=demo__pb2.AskProductAIAssistantResponse.FromString, + ) + + +class ProductReviewServiceServicer(object): + """---------------Product Review service---------- + + """ + + def GetProductReviews(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetAverageProductReviewScore(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def AskProductAIAssistant(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_ProductReviewServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'GetProductReviews': grpc.unary_unary_rpc_method_handler( + servicer.GetProductReviews, + request_deserializer=demo__pb2.GetProductReviewsRequest.FromString, + response_serializer=demo__pb2.GetProductReviewsResponse.SerializeToString, + ), + 'GetAverageProductReviewScore': grpc.unary_unary_rpc_method_handler( + servicer.GetAverageProductReviewScore, + request_deserializer=demo__pb2.GetAverageProductReviewScoreRequest.FromString, + response_serializer=demo__pb2.GetAverageProductReviewScoreResponse.SerializeToString, + ), + 'AskProductAIAssistant': grpc.unary_unary_rpc_method_handler( + servicer.AskProductAIAssistant, + request_deserializer=demo__pb2.AskProductAIAssistantRequest.FromString, + response_serializer=demo__pb2.AskProductAIAssistantResponse.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'oteldemo.ProductReviewService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class ProductReviewService(object): + """---------------Product Review service---------- + + """ + + @staticmethod + def GetProductReviews(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/oteldemo.ProductReviewService/GetProductReviews', + demo__pb2.GetProductReviewsRequest.SerializeToString, + demo__pb2.GetProductReviewsResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetAverageProductReviewScore(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/oteldemo.ProductReviewService/GetAverageProductReviewScore', + demo__pb2.GetAverageProductReviewScoreRequest.SerializeToString, + demo__pb2.GetAverageProductReviewScoreResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def AskProductAIAssistant(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/oteldemo.ProductReviewService/AskProductAIAssistant', + demo__pb2.AskProductAIAssistantRequest.SerializeToString, + demo__pb2.AskProductAIAssistantResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + class ShippingServiceStub(object): """---------------Shipping Service---------- diff --git a/src/recommendation/recommendation_server.py b/src/recommendation/recommendation_server.py index df681bfccc..1519df8586 100644 --- a/src/recommendation/recommendation_server.py +++ b/src/recommendation/recommendation_server.py @@ -81,7 +81,7 @@ def get_product_list(request_product_ids): first_run = False span.set_attribute("app.cache_hit", False) logger.info("get_product_list: cache miss") - cat_response = product_catalog_stub.ListProducts(demo_pb2.Empty()) + cat_response = product_catalog_stub.GetProduct(demo_pb2.Empty()) response_ids = [x.id for x in cat_response.products] cached_ids = cached_ids + response_ids cached_ids = cached_ids + cached_ids[:len(cached_ids) // 4] diff --git a/src/shipping/src/shipping_service/shipping_types.rs b/src/shipping/src/shipping_service/shipping_types.rs index a87a0e3889..c86d63bcbc 100644 --- a/src/shipping/src/shipping_service/shipping_types.rs +++ b/src/shipping/src/shipping_service/shipping_types.rs @@ -5,11 +5,19 @@ use serde::{Deserialize, Serialize}; #[derive(Debug, Deserialize, Serialize)] pub struct CartItem { + #[serde(alias = "productId")] + pub product_id: String, pub quantity: u32, } #[derive(Debug, Deserialize, Serialize)] pub struct Address { + #[serde(alias = "streetAddress")] + pub street_address: String, + pub city: String, + pub state: String, + pub country: String, + #[serde(alias = "zipCode")] pub zip_code: String, } @@ -38,7 +46,10 @@ pub struct Quote { } #[derive(Debug, Deserialize, Serialize)] -pub struct ShipOrderRequest {} +pub struct ShipOrderRequest { + pub address: Option
, + pub items: Vec, +} #[derive(Debug, Deserialize, Serialize)] pub struct ShipOrderResponse { diff --git a/test/tracetesting/checkout/add-item-to-cart.yaml b/test/tracetesting/checkout/add-item-to-cart.yaml new file mode 100644 index 0000000000..f73d8c772a --- /dev/null +++ b/test/tracetesting/checkout/add-item-to-cart.yaml @@ -0,0 +1,27 @@ +# Copyright The OpenTelemetry Authors +# SPDX-License-Identifier: Apache-2.0 + +type: Test +spec: + id: checkout-add-item-to-cart + name: 'Checkout: add item to cart' + description: Add items to the shopping cart before placing an order + trigger: + type: grpc + grpc: + protobufFile: ../../../pb/demo.proto + address: ${var:CART_ADDR} + method: oteldemo.CartService.AddItem + request: |- + { + "userId": "1997", + "item": { + "productId": "66VCHSJNUP", + "quantity": 2 + } + } + specs: + - name: It added an item correctly into the shopping cart + selector: span[name="POST /oteldemo.CartService/AddItem"] + assertions: + - attr:grpc.status_code = 0 diff --git a/test/tracetesting/checkout/all.yaml b/test/tracetesting/checkout/all.yaml index 39e4391b13..dd244c5894 100644 --- a/test/tracetesting/checkout/all.yaml +++ b/test/tracetesting/checkout/all.yaml @@ -7,4 +7,5 @@ spec: name: 'Checkout Service' description: Run all Checkout Service tests enabled in sequence steps: + - ./add-item-to-cart.yaml - ./place-order.yaml diff --git a/test/tracetesting/checkout/place-order.yaml b/test/tracetesting/checkout/place-order.yaml index 2b7eb2917b..ce642e2f38 100644 --- a/test/tracetesting/checkout/place-order.yaml +++ b/test/tracetesting/checkout/place-order.yaml @@ -27,7 +27,7 @@ spec: "creditCard": { "creditCardNumber": "4117-7059-6121-5486", "creditCardCvv": 346, - "creditCardExpirationYear": 2025, + "creditCardExpirationYear": 2030, "creditCardExpirationMonth": 3 } } diff --git a/test/tracetesting/frontend/06-checking-out-cart.yaml b/test/tracetesting/frontend/06-checking-out-cart.yaml index d8d4748e63..a72d5a1474 100644 --- a/test/tracetesting/frontend/06-checking-out-cart.yaml +++ b/test/tracetesting/frontend/06-checking-out-cart.yaml @@ -49,10 +49,9 @@ spec: - attr:rpc.grpc.status_code = 0 - attr:tracetest.selected_spans.count >= 1 - name: "The product was shipped" - selector: span[tracetest.span.type="rpc" name="oteldemo.ShippingService/ShipOrder" rpc.system="grpc" rpc.method="ShipOrder" rpc.service="oteldemo.ShippingService"] + selector: span[tracetest.span.type="http" name="/ship-order"] assertions: - - attr:rpc.grpc.status_code = 0 - - attr:tracetest.selected_spans.count >= 1 + - attr:http.response.status_code = 200 - name: "The cart was emptied" selector: span[tracetest.span.type="rpc" name="oteldemo.CartService/EmptyCart" rpc.system="grpc" rpc.method="EmptyCart" rpc.service="oteldemo.CartService"] assertions: diff --git a/test/tracetesting/product-reviews/all.yaml b/test/tracetesting/product-reviews/all.yaml new file mode 100644 index 0000000000..643dc28f22 --- /dev/null +++ b/test/tracetesting/product-reviews/all.yaml @@ -0,0 +1,11 @@ +# Copyright The OpenTelemetry Authors +# SPDX-License-Identifier: Apache-2.0 + +type: TestSuite +spec: + id: product-reviews-all + name: 'Product Review Service' + description: Run all Product Review Service tests enabled in sequence + steps: + - ./reviews.yaml + - ./summary.yaml diff --git a/test/tracetesting/product-reviews/reviews.yaml b/test/tracetesting/product-reviews/reviews.yaml new file mode 100644 index 0000000000..b02f5d47b8 --- /dev/null +++ b/test/tracetesting/product-reviews/reviews.yaml @@ -0,0 +1,24 @@ +# Copyright The OpenTelemetry Authors +# SPDX-License-Identifier: Apache-2.0 + +type: Test +spec: + id: product-reviews-get + name: 'Product Reviews: Get product reviews for product' + description: Get all product reviews for the specified product + trigger: + type: grpc + grpc: + protobufFile: ../../../pb/demo.proto + address: ${var:PRODUCT_REVIEWS_ADDR} + method: oteldemo.ProductReviewService.GetProductReviews + request: |- + { + "product_id": "L9ECAV7KIM" + } + specs: + - name: It called GetProductReviews correctly and got 5 product reviews + selector: span[name="get_product_reviews"] + assertions: + - attr:app.product.id = "L9ECAV7KIM" + - attr:app.product_reviews.count = 5 diff --git a/test/tracetesting/product-reviews/summary.yaml b/test/tracetesting/product-reviews/summary.yaml new file mode 100644 index 0000000000..f6428db75a --- /dev/null +++ b/test/tracetesting/product-reviews/summary.yaml @@ -0,0 +1,24 @@ +# Copyright The OpenTelemetry Authors +# SPDX-License-Identifier: Apache-2.0 + +type: Test +spec: + id: product-review-summary + name: 'Product Review Summary: Get a summary of the product reviews for product' + description: Get a summary of product reviews for the specified product + trigger: + type: grpc + grpc: + protobufFile: ../../../pb/demo.proto + address: ${var:PRODUCT_REVIEWS_ADDR} + method: oteldemo.ProductReviewService.GetAverageProductReviewScore + request: |- + { + "product_id": "66VCHSJNUP" + } + specs: + - name: It called GetAverageProductReviewScore correctly and got the average score + selector: span[name="get_average_product_review_score"] + assertions: + - attr:app.product.id = "66VCHSJNUP" + - attr:app.product_reviews.average_score = 4.6 diff --git a/test/tracetesting/run.bash b/test/tracetesting/run.bash index 3842c0858c..ef4e15a343 100755 --- a/test/tracetesting/run.bash +++ b/test/tracetesting/run.bash @@ -8,7 +8,7 @@ set -e # Availalble services to test -ALL_SERVICES=("ad" "cart" "currency" "checkout" "frontend" "email" "payment" "product-catalog" "recommendation" "shipping") +ALL_SERVICES=("ad" "cart" "currency" "checkout" "frontend" "email" "payment" "product-catalog" "product-reviews" "recommendation" "shipping") ## Script variables # Will contain the list of services to test @@ -50,6 +50,8 @@ spec: value: $PAYMENT_ADDR - key: PRODUCT_CATALOG_ADDR value: $PRODUCT_CATALOG_ADDR + - key: PRODUCT_REVIEWS_ADDR + value: $PRODUCT_REVIEWS_ADDR - key: RECOMMENDATION_ADDR value: $RECOMMENDATION_ADDR - key: SHIPPING_ADDR diff --git a/test/tracetesting/shipping/empty-quote.yaml b/test/tracetesting/shipping/empty-quote.yaml index ae422d1bf0..ea7e141646 100644 --- a/test/tracetesting/shipping/empty-quote.yaml +++ b/test/tracetesting/shipping/empty-quote.yaml @@ -7,12 +7,14 @@ spec: name: 'Shipping: Empty Quote' description: Quote delivery for no items trigger: - type: grpc - grpc: - protobufFile: ../../../pb/demo.proto - address: ${var:SHIPPING_ADDR} - method: oteldemo.ShippingService.GetQuote - request: |- + type: http + httpRequest: + url: ${var:SHIPPING_ADDR}/get-quote + method: POST + headers: + - key: Content-Type + value: application/json + body: |- { "address": { "streetAddress": "One Microsoft Way", @@ -24,13 +26,14 @@ spec: "items": [] } specs: - - name: It called GetQuote correctly - selector: span[tracetest.span.type="rpc" name="oteldemo.ShippingService/GetQuote" rpc.system="grpc"] - assertions: - - attr:rpc.grpc.status_code = 0 - - name: It returned a valid quote - selector: span[tracetest.span.type="general" name="Tracetest trigger"] - assertions: - - attr:tracetest.response.body | json_path '$.costUsd.currencyCode' = "USD" - - attr:tracetest.response.body | json_path '$.costUsd.units' = 0 - - attr:tracetest.response.body | json_path '$.costUsd.nanos' = 0 + - name: It called GetQuote successfully + selector: span[tracetest.span.type="http" name="/get-quote" http.request.method="POST"] + assertions: + - attr:http.response.status_code = 200 + - name: It returned a valid empty quote + selector: span[tracetest.span.type="general" name="Tracetest trigger"] + assertions: + - attr:tracetest.response.status = 200 + - attr:tracetest.response.body | json_path '$.cost_usd.currency_code' = "USD" + - attr:tracetest.response.body | json_path '$.cost_usd.units' = 0 + - attr:tracetest.response.body | json_path '$.cost_usd.nanos' = 0 diff --git a/test/tracetesting/shipping/order.yaml b/test/tracetesting/shipping/order.yaml index 8c18f1e594..c3d04751e2 100644 --- a/test/tracetesting/shipping/order.yaml +++ b/test/tracetesting/shipping/order.yaml @@ -7,12 +7,14 @@ spec: name: 'Shipping: Order' description: Create one delivery order trigger: - type: grpc - grpc: - protobufFile: ../../../pb/demo.proto - address: ${var:SHIPPING_ADDR} - method: oteldemo.ShippingService.ShipOrder - request: |- + type: http + httpRequest: + url: ${var:SHIPPING_ADDR}/ship-order + method: POST + headers: + - key: Content-Type + value: application/json + body: |- { "address": { "streetAddress": "One Microsoft Way", @@ -29,11 +31,12 @@ spec: ] } specs: - - name: It called GetQuote correctly - selector: span[tracetest.span.type="rpc" name="oteldemo.ShippingService/ShipOrder" rpc.system="grpc"] - assertions: - - attr:rpc.grpc.status_code = 0 - - name: It returned a trackingId - selector: span[tracetest.span.type="general" name="Tracetest trigger"] - assertions: - - attr:tracetest.response.body | json_path '$.trackingId' != "" + - name: It called ShipOrder successfully + selector: span[tracetest.span.type="http" name="/ship-order" http.request.method="POST"] + assertions: + - attr:http.response.status_code = 200 + - name: It returned a tracking ID + selector: span[tracetest.span.type="general" name="Tracetest trigger"] + assertions: + - attr:tracetest.response.status = 200 + - attr:tracetest.response.body | json_path '$.tracking_id' != "" diff --git a/test/tracetesting/shipping/quote.yaml b/test/tracetesting/shipping/quote.yaml index c263fa8cc6..d9f3412803 100644 --- a/test/tracetesting/shipping/quote.yaml +++ b/test/tracetesting/shipping/quote.yaml @@ -7,12 +7,14 @@ spec: name: 'Shipping: Quote' description: Quote delivery for one order trigger: - type: grpc - grpc: - protobufFile: ../../../pb/demo.proto - address: ${var:SHIPPING_ADDR} - method: oteldemo.ShippingService.GetQuote - request: |- + type: http + httpRequest: + url: ${var:SHIPPING_ADDR}/get-quote + method: POST + headers: + - key: Content-Type + value: application/json + body: |- { "address": { "streetAddress": "One Microsoft Way", @@ -29,12 +31,13 @@ spec: ] } specs: - - name: It called GetQuote correctly - selector: span[tracetest.span.type="rpc" name="oteldemo.ShippingService/GetQuote" rpc.system="grpc"] - assertions: - - attr:rpc.grpc.status_code = 0 - - name: It returned a valid quote - selector: span[tracetest.span.type="general" name="Tracetest trigger"] - assertions: - - attr:tracetest.response.body | json_path '$.costUsd.currencyCode' = "USD" - - attr:tracetest.response.body | json_path '$.costUsd.units' > 0 + - name: It called GetQuote successfully + selector: span[tracetest.span.type="http" name="/get-quote" http.request.method="POST"] + assertions: + - attr:http.response.status_code = 200 + - name: It returned a valid quote + selector: span[tracetest.span.type="general" name="Tracetest trigger"] + assertions: + - attr:tracetest.response.status = 200 + - attr:tracetest.response.body | json_path '$.cost_usd.currency_code' = "USD" + - attr:tracetest.response.body | json_path '$.cost_usd.units' > 0