From 2b76fdd2b6030049d91e387014c14b596514140f Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Mon, 3 Aug 2026 20:55:56 +0000 Subject: [PATCH 1/2] feat: Add AdditionalContractValue chore: add PHP namespace PiperOrigin-RevId: 958490625 Source-Link: https://github.com/googleapis/googleapis/commit/e0c53fe374ef9fdff0f870d58e7e9a66457b7b29 Source-Link: https://github.com/googleapis/googleapis-gen/commit/8b3c749a0a8cc9d38de74c2bd2bc73be4c7c9320 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWNvbW1lcmNlX3Byb2R1Y2VyLXYxYmV0YS8uT3dsQm90LnlhbWwiLCJoIjoiOGIzYzc0OWEwYThjYzlkMzhkZTc0YzJiZDJiYzczYmU0YzdjOTMyMCJ9 --- .../.gitignore | 20 + .../.repo-metadata.json | 17 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../Gemfile | 15 + .../LICENSE.md | 201 ++ .../README.md | 154 + .../Rakefile | 169 ++ .../gapic_metadata.json | 123 + ...gle-cloud-commerce_producer-v1beta.gemspec | 29 + .../google-cloud-commerce_producer-v1beta.rb | 21 + .../google/cloud/commerce_producer/v1beta.rb | 45 + .../v1beta/bindings_override.rb | 75 + .../v1beta/commerce_transaction.rb | 55 + .../v1beta/commerce_transaction/client.rb | 2574 +++++++++++++++++ .../commerce_transaction/credentials.rb | 47 + .../v1beta/commerce_transaction/paths.rb | 184 ++ .../v1beta/commerce_transaction/rest.rb | 53 + .../commerce_transaction/rest/client.rb | 2392 +++++++++++++++ .../commerce_transaction/rest/service_stub.rb | 1368 +++++++++ .../cloud/commerce_producer/v1beta/rest.rb | 38 + .../cloud/commerce_producer/v1beta/version.rb | 28 + .../v1beta/commerce_transaction_pb.rb | 64 + .../commerce_transaction_services_pb.rb | 87 + .../v1beta/private_offer_pb.rb | 53 + .../commerceproducer/v1beta/service_pb.rb | 24 + .../commerceproducer/v1beta/sku_group_pb.rb | 24 + .../cloud/commerceproducer/v1beta/sku_pb.rb | 56 + .../v1beta/standard_offer_pb.rb | 30 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 593 ++++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 ++ .../v1beta/commerce_transaction.rb | 533 ++++ .../commerceproducer/v1beta/private_offer.rb | 1189 ++++++++ .../cloud/commerceproducer/v1beta/service.rb | 40 + .../cloud/commerceproducer/v1beta/sku.rb | 794 +++++ .../commerceproducer/v1beta/sku_group.rb | 50 + .../commerceproducer/v1beta/standard_offer.rb | 133 + .../proto_docs/google/protobuf/any.rb | 145 + .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/empty.rb | 34 + .../proto_docs/google/protobuf/field_mask.rb | 229 ++ .../proto_docs/google/protobuf/timestamp.rb | 127 + .../proto_docs/google/type/datetime.rb | 104 + .../proto_docs/google/type/decimal.rb | 95 + .../proto_docs/google/type/money.rb | 43 + .../snippets/Gemfile | 32 + .../cancel_private_offer.rb | 47 + .../create_private_offer.rb | 47 + .../create_private_offer_document.rb | 47 + .../delete_private_offer.rb | 47 + .../delete_private_offer_document.rb | 47 + .../commerce_transaction/get_private_offer.rb | 47 + .../get_private_offer_document.rb | 47 + .../commerce_transaction/get_service.rb | 47 + .../snippets/commerce_transaction/get_sku.rb | 47 + .../commerce_transaction/get_sku_group.rb | 47 + .../get_standard_offer.rb | 47 + .../list_private_offer_documents.rb | 51 + .../list_private_offers.rb | 51 + .../commerce_transaction/list_services.rb | 51 + .../commerce_transaction/list_sku_groups.rb | 51 + .../commerce_transaction/list_skus.rb | 51 + .../list_standard_offers.rb | 51 + .../publish_private_offer.rb | 47 + .../resolve_amendment_target.rb | 47 + .../update_private_offer.rb | 47 + .../update_private_offer_document.rb | 47 + ..._google.cloud.commerceproducer.v1beta.json | 855 ++++++ .../v1beta/commerce_transaction_paths_test.rb | 139 + .../v1beta/commerce_transaction_rest_test.rb | 1261 ++++++++ .../v1beta/commerce_transaction_test.rb | 1408 +++++++++ .../test/helper.rb | 35 + 78 files changed, 17478 insertions(+) create mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/.gitignore create mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/.toys.rb create mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/.yardopts create mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/Gemfile create mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/README.md create mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/Rakefile create mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/google-cloud-commerce_producer-v1beta.gemspec create mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google-cloud-commerce_producer-v1beta.rb create mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerce_producer/v1beta.rb create mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerce_producer/v1beta/bindings_override.rb create mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerce_producer/v1beta/commerce_transaction.rb create mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerce_producer/v1beta/commerce_transaction/client.rb create mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerce_producer/v1beta/commerce_transaction/credentials.rb create mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerce_producer/v1beta/commerce_transaction/paths.rb create mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerce_producer/v1beta/commerce_transaction/rest.rb create mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerce_producer/v1beta/commerce_transaction/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerce_producer/v1beta/commerce_transaction/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerce_producer/v1beta/rest.rb create mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerce_producer/v1beta/version.rb create mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerceproducer/v1beta/commerce_transaction_pb.rb create mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerceproducer/v1beta/commerce_transaction_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerceproducer/v1beta/private_offer_pb.rb create mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerceproducer/v1beta/service_pb.rb create mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerceproducer/v1beta/sku_group_pb.rb create mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerceproducer/v1beta/sku_pb.rb create mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerceproducer/v1beta/standard_offer_pb.rb create mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/cloud/commerceproducer/v1beta/commerce_transaction.rb create mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/cloud/commerceproducer/v1beta/private_offer.rb create mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/cloud/commerceproducer/v1beta/service.rb create mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/cloud/commerceproducer/v1beta/sku.rb create mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/cloud/commerceproducer/v1beta/sku_group.rb create mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/cloud/commerceproducer/v1beta/standard_offer.rb create mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/type/datetime.rb create mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/type/decimal.rb create mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/type/money.rb create mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/cancel_private_offer.rb create mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/create_private_offer.rb create mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/create_private_offer_document.rb create mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/delete_private_offer.rb create mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/delete_private_offer_document.rb create mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/get_private_offer.rb create mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/get_private_offer_document.rb create mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/get_service.rb create mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/get_sku.rb create mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/get_sku_group.rb create mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/get_standard_offer.rb create mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/list_private_offer_documents.rb create mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/list_private_offers.rb create mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/list_services.rb create mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/list_sku_groups.rb create mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/list_skus.rb create mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/list_standard_offers.rb create mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/publish_private_offer.rb create mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/resolve_amendment_target.rb create mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/update_private_offer.rb create mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/update_private_offer_document.rb create mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/snippet_metadata_google.cloud.commerceproducer.v1beta.json create mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/test/google/cloud/commerce_producer/v1beta/commerce_transaction_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/test/google/cloud/commerce_producer/v1beta/commerce_transaction_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/test/google/cloud/commerce_producer/v1beta/commerce_transaction_test.rb create mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/test/helper.rb diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/.gitignore b/owl-bot-staging/google-cloud-commerce_producer-v1beta/.gitignore new file mode 100644 index 000000000000..a2e97ac84259 --- /dev/null +++ b/owl-bot-staging/google-cloud-commerce_producer-v1beta/.gitignore @@ -0,0 +1,20 @@ +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/.repo-metadata.json b/owl-bot-staging/google-cloud-commerce_producer-v1beta/.repo-metadata.json new file mode 100644 index 000000000000..f51762451d9c --- /dev/null +++ b/owl-bot-staging/google-cloud-commerce_producer-v1beta/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "commerceproducer.googleapis.com", + "api_shortname": "commerceproducer", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-commerce_producer-v1beta/latest", + "distribution_name": "google-cloud-commerce_producer-v1beta", + "is_cloud": true, + "language": "ruby", + "name": "commerceproducer", + "name_pretty": "Cloud Commerce Producer V1BETA API", + "product_documentation": "https://docs.cloud.google.com/marketplace/docs/partners/commerce-producer-api/reference", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Using this API, partners can: * Manage private offers extended to specific customer billing accounts. * Attach documents to private offers, such as custom EULAs or Statements of Work. * Publish private offers to make them available to customers. # Data Model The following resources are exposed by this API: * **Service**: Represents a service offered by a partner on Google Cloud Marketplace. * **StandardOffer**: Represents a standard offer for a product, which can be used as a base for private offers. * **PrivateOffer**: Represents a customized offer extended to a specific customer billing account. * **PrivateOfferDocument**: Represents a document attached to a private offer. * **SkuGroup**: Represents a group of SKUs (Stock Keeping Units) used for pricing or commitment. * **Sku**: Represents a SKU (Stock Keeping Unit) used for pricing or commitment. Note that google-cloud-commerce_producer-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-commerce_producer instead. See the readme for more details.", + "ruby-cloud-product-url": "https://docs.cloud.google.com/marketplace/docs/partners/commerce-producer-api/reference", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/.rubocop.yml b/owl-bot-staging/google-cloud-commerce_producer-v1beta/.rubocop.yml new file mode 100644 index 000000000000..820e178abcb5 --- /dev/null +++ b/owl-bot-staging/google-cloud-commerce_producer-v1beta/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-commerce_producer-v1beta.gemspec" + - "lib/**/*_pb.rb" + - "proto_docs/**/*" + - "test/**/*" + - "acceptance/**/*" + - "samples/acceptance/**/*" + - "Rakefile" + +Layout/LineLength: + Enabled: false +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false +Naming/AccessorMethodName: + Exclude: + - "snippets/**/*.rb" +Naming/FileName: + Exclude: + - "lib/google-cloud-commerce_producer-v1beta.rb" diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/.toys.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-commerce_producer-v1beta/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +toys_version! ">= 0.15.3" + +if ENV["RUBY_COMMON_TOOLS"] + common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] + load File.join(common_tools_dir, "toys", "gapic") +else + load_git remote: "https://github.com/googleapis/ruby-common-tools.git", + path: "toys/gapic", + update: true +end diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/.yardopts b/owl-bot-staging/google-cloud-commerce_producer-v1beta/.yardopts new file mode 100644 index 000000000000..4ec4dc28b1aa --- /dev/null +++ b/owl-bot-staging/google-cloud-commerce_producer-v1beta/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Cloud Commerce Producer V1BETA API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +./proto_docs/**/*.rb +- +README.md +LICENSE.md +AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/AUTHENTICATION.md b/owl-bot-staging/google-cloud-commerce_producer-v1beta/AUTHENTICATION.md new file mode 100644 index 000000000000..37fdc397ac7f --- /dev/null +++ b/owl-bot-staging/google-cloud-commerce_producer-v1beta/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-commerce_producer-v1beta library is to use +[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). +To review all of your authentication options, see [Credentials lookup](#credential-lookup). + +## Quickstart + +The following example shows how to set up authentication for a local development +environment with your user credentials. + +**NOTE:** This method is _not_ recommended for running in production. User credentials +should be used only during development. + +1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). +2. Set up a local ADC file with your user credentials: + +```sh +gcloud auth application-default login +``` + +3. Write code as if already authenticated. + +For more information about setting up authentication for a local development environment, see +[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). + +## Credential Lookup + +The google-cloud-commerce_producer-v1beta library provides several mechanisms to configure your system. +Generally, using Application Default Credentials to facilitate automatic +credentials discovery is the easist method. But if you need to explicitly specify +credentials, there are several methods available to you. + +Credentials are accepted in the following ways, in the following order or precedence: + +1. Credentials specified in method arguments +2. Credentials specified in configuration +3. Credentials pointed to or included in environment variables +4. Credentials found in local ADC file +5. Credentials returned by the metadata server for the attached service account (GCP) + +### Configuration + +You can configure a path to a JSON credentials file, either for an individual client object or +globally, for all client objects. The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +To configure a credentials file for an individual client initialization: + +```ruby +require "google/cloud/commerce_producer/v1beta" + +client = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/commerce_producer/v1beta" + +::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new +``` + +### Environment Variables + +You can also use an environment variable to provide a JSON credentials file. +The environment variable can contain a path to the credentials file or, for +environments such as Docker containers where writing files is not encouraged, +you can include the credentials file itself. + +The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +The environment variables that google-cloud-commerce_producer-v1beta +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/cloud/commerce_producer/v1beta" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new +``` + +### Local ADC file + +You can set up a local ADC file with your user credentials for authentication during +development. If credentials are not provided in code or in environment variables, +then the local ADC credentials are discovered. + +Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. + +### Google Cloud Platform environments + +When running on Google Cloud Platform (GCP), including Google Compute Engine +(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud +Functions (GCF) and Cloud Run, credentials are retrieved from the attached +service account automatically. Code should be written as if already authenticated. + +For more information, see +[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/CHANGELOG.md b/owl-bot-staging/google-cloud-commerce_producer-v1beta/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-commerce_producer-v1beta/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/Gemfile b/owl-bot-staging/google-cloud-commerce_producer-v1beta/Gemfile new file mode 100644 index 000000000000..823c136ec3c0 --- /dev/null +++ b/owl-bot-staging/google-cloud-commerce_producer-v1beta/Gemfile @@ -0,0 +1,15 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.32.0" +gem "irb", "~> 1.17" +gem "minitest", "~> 6.0.2" +gem "minitest-focus", "~> 1.4" +gem "minitest-mock", "~> 5.27" +gem "minitest-reporters", "~> 1.8.0", require: false +gem "minitest-rg", "~> 5.3" +gem "ostruct", "~> 0.5.5" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/LICENSE.md b/owl-bot-staging/google-cloud-commerce_producer-v1beta/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-commerce_producer-v1beta/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/README.md b/owl-bot-staging/google-cloud-commerce_producer-v1beta/README.md new file mode 100644 index 000000000000..ac19065fec26 --- /dev/null +++ b/owl-bot-staging/google-cloud-commerce_producer-v1beta/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Cloud Commerce Producer V1BETA API + +Partner API for the Cloud Commerce Producer API Early Access. + +Using this API, partners can: * Manage private offers extended to specific customer billing accounts. * Attach documents to private offers, such as custom EULAs or Statements of Work. * Publish private offers to make them available to customers. # Data Model The following resources are exposed by this API: * **Service**: Represents a service offered by a partner on Google Cloud Marketplace. * **StandardOffer**: Represents a standard offer for a product, which can be used as a base for private offers. * **PrivateOffer**: Represents a customized offer extended to a specific customer billing account. * **PrivateOfferDocument**: Represents a document attached to a private offer. * **SkuGroup**: Represents a group of SKUs (Stock Keeping Units) used for pricing or commitment. * **Sku**: Represents a SKU (Stock Keeping Unit) used for pricing or commitment. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Cloud Commerce Producer V1BETA API. Most users should consider using +the main client gem, +[google-cloud-commerce_producer](https://rubygems.org/gems/google-cloud-commerce_producer). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-commerce_producer-v1beta +``` + +## Before You Begin + +In order to use this library, you first need to go through the following steps: + +1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) +1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) +1. [Enable the API.](https://console.cloud.google.com/apis/library/commerceproducer.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/commerce_producer/v1beta" + +client = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new +request = ::Google::Cloud::CommerceProducer::V1beta::ListServicesRequest.new # (request fields as keyword arguments...) +response = client.list_services request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-commerce_producer-v1beta/latest) +for class and method documentation. + +See also the [Product Documentation](https://docs.cloud.google.com/marketplace/docs/partners/commerce-producer-api/reference) +for general usage information. + +## Debug Logging + +This library comes with opt-in Debug Logging that can help you troubleshoot +your application's integration with the API. When logging is activated, key +events such as requests and responses, along with data payloads and metadata +such as headers and client configuration, are logged to the standard error +stream. + +**WARNING:** Client Library Debug Logging includes your data payloads in +plaintext, which could include sensitive data such as PII for yourself or your +customers, private keys, or other security data that could be compromising if +leaked. Always practice good data hygiene with your application logs, and follow +the principle of least access. Google also recommends that Client Library Debug +Logging be enabled only temporarily during active debugging, and not used +permanently in production. + +To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` +to the value `all`. Alternatively, you can set the value to a comma-delimited +list of client library gem names. This will select the default logging behavior, +which writes logs to the standard error stream. On a local workstation, this may +result in logs appearing on the console. When running on a Google Cloud hosting +service such as [Google Cloud Run](https://cloud.google.com/run), this generally +results in logs appearing alongside your application logs in the +[Google Cloud Logging](https://cloud.google.com/logging/) service. + +You can customize logging by modifying the `logger` configuration when +constructing a client object. For example: + +```ruby +require "google/cloud/commerce_producer/v1beta" +require "logger" + +client = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new do |config| + config.logger = Logger.new "my-app.log" +end +``` + +## Google Cloud Samples + +To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). + +## Supported Ruby Versions + +This library is supported on Ruby 3.2+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-commerce_producer`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-commerce_producer-v1beta`. +_In most cases, you should install the main client._ + +### What's the difference between the main client and a versioned client? + +A _versioned client_ provides a basic set of data types and client classes for +a _single version_ of a specific service. (That is, for a service with multiple +versions, there might be a separate versioned client for each service version.) +Most versioned clients are written and maintained by a code generator. + +The _main client_ is designed to provide you with the _recommended_ client +interfaces for the service. There will be only one main client for any given +service, even a service with multiple versions. The main client includes +factory methods for constructing the client objects we recommend for most +users. In some cases, those will be classes provided by an underlying versioned +client; in other cases, they will be handwritten higher-level client objects +with additional capabilities, convenience methods, or best practices built in. +Generally, the main client will default to a recommended service version, +although in some cases you can override this if you need to talk to a specific +service version. + +### Why would I want to use the main client? + +We recommend that most users install the main client gem for a service. You can +identify this gem as the one _without_ a version in its name, e.g. +`google-cloud-commerce_producer`. +The main client is recommended because it will embody the best practices for +accessing the service, and may also provide more convenient interfaces or +tighter integration into frameworks and third-party libraries. In addition, the +documentation and samples published by Google will generally demonstrate use of +the main client. + +### Why would I want to use a versioned client? + +You can use a versioned client if you are content with a possibly lower-level +class interface, you explicitly want to avoid features provided by the main +client, or you want to access a specific service version not be covered by the +main client. You can identify versioned client gems because the service version +is part of the name, e.g. `google-cloud-commerce_producer-v1beta`. + +### What about the google-apis- clients? + +Client library gems with names that begin with `google-apis-` are based on an +older code generation technology. They talk to a REST/JSON backend (whereas +most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may +not offer the same performance, features, and ease of use provided by more +modern clients. + +The `google-apis-` clients have wide coverage across Google services, so you +might need to use one if there is no modern client available for the service. +However, if a modern client is available, we generally recommend it over the +older `google-apis-` clients. diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/Rakefile b/owl-bot-staging/google-cloud-commerce_producer-v1beta/Rakefile new file mode 100644 index 000000000000..8a3fae448587 --- /dev/null +++ b/owl-bot-staging/google-cloud-commerce_producer-v1beta/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "bundler/setup" +require "bundler/gem_tasks" + +require "rubocop/rake_task" +RuboCop::RakeTask.new + +require "rake/testtask" +desc "Run tests." +Rake::TestTask.new do |t| + t.libs << "test" + t.test_files = FileList["test/**/*_test.rb"] + t.warning = false +end + +desc "Runs the smoke tests." +Rake::TestTask.new :smoke_test do |t| + t.test_files = FileList["acceptance/**/*smoke_test.rb"] + t.warning = false +end + +# Acceptance tests +desc "Run the google-cloud-commerce_producer-v1beta acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["GOOGLE_CLOUD_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["GOOGLE_CLOUD_TEST_KEYFILE_JSON"] || + ENV["GCLOUD_TEST_KEYFILE_JSON"] + end + if project.nil? || keyfile.nil? + fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/commerce_producer/v1beta/commerce_transaction/credentials" + ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["GOOGLE_CLOUD_PROJECT"] = project + ENV["GOOGLE_CLOUD_TEST_PROJECT"] = project + ENV["GOOGLE_CLOUD_KEYFILE_JSON"] = keyfile + + Rake::Task["acceptance:run"].invoke +end + +namespace :acceptance do + task :run do + if File.directory? "acceptance" + Rake::Task[:smoke_test].invoke + else + puts "The google-cloud-commerce_producer-v1beta gem has no acceptance tests." + end + end + + desc "Run acceptance cleanup." + task :cleanup do + end +end + +task :samples do + Rake::Task["samples:latest"].invoke +end + +namespace :samples do + task :latest do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-commerce_producer-v1beta gem has no samples to test." + end + end + + task :master do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-commerce_producer-v1beta gem has no samples to test." + end + end +end + +require "yard" +require "yard/rake/yardoc_task" +YARD::Rake::YardocTask.new do |y| + y.options << "--fail-on-warning" +end + +desc "Run yard-doctest example tests." +task :doctest do + puts "The google-cloud-commerce_producer-v1beta gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-commerce_producer-v1beta" + header "google-cloud-commerce_producer-v1beta rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-commerce_producer-v1beta yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-commerce_producer-v1beta test", "*" + Rake::Task[:test].invoke +end + +namespace :ci do + desc "Run the CI build, with smoke tests." + task :smoke_test do + Rake::Task[:ci].invoke + header "google-cloud-commerce_producer-v1beta smoke_test", "*" + Rake::Task[:smoke_test].invoke + end + desc "Run the CI build, with acceptance tests." + task :acceptance do + Rake::Task[:ci].invoke + header "google-cloud-commerce_producer-v1beta acceptance", "*" + Rake::Task[:acceptance].invoke + end + task :a do + # This is a handy shortcut to save typing + Rake::Task["ci:acceptance"].invoke + end +end + +task default: :test + +def header str, token = "#" + line_length = str.length + 8 + puts "" + puts token * line_length + puts "#{token * 3} #{str} #{token * 3}" + puts token * line_length + puts "" +end diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/gapic_metadata.json b/owl-bot-staging/google-cloud-commerce_producer-v1beta/gapic_metadata.json new file mode 100644 index 000000000000..d35cba66e411 --- /dev/null +++ b/owl-bot-staging/google-cloud-commerce_producer-v1beta/gapic_metadata.json @@ -0,0 +1,123 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.commerceproducer.v1beta", + "libraryPackage": "::Google::Cloud::CommerceProducer::V1beta", + "services": { + "CommerceTransaction": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client", + "rpcs": { + "ListServices": { + "methods": [ + "list_services" + ] + }, + "GetService": { + "methods": [ + "get_service" + ] + }, + "ListPrivateOffers": { + "methods": [ + "list_private_offers" + ] + }, + "GetPrivateOffer": { + "methods": [ + "get_private_offer" + ] + }, + "ResolveAmendmentTarget": { + "methods": [ + "resolve_amendment_target" + ] + }, + "CreatePrivateOffer": { + "methods": [ + "create_private_offer" + ] + }, + "UpdatePrivateOffer": { + "methods": [ + "update_private_offer" + ] + }, + "PublishPrivateOffer": { + "methods": [ + "publish_private_offer" + ] + }, + "CancelPrivateOffer": { + "methods": [ + "cancel_private_offer" + ] + }, + "DeletePrivateOffer": { + "methods": [ + "delete_private_offer" + ] + }, + "ListPrivateOfferDocuments": { + "methods": [ + "list_private_offer_documents" + ] + }, + "GetPrivateOfferDocument": { + "methods": [ + "get_private_offer_document" + ] + }, + "CreatePrivateOfferDocument": { + "methods": [ + "create_private_offer_document" + ] + }, + "UpdatePrivateOfferDocument": { + "methods": [ + "update_private_offer_document" + ] + }, + "DeletePrivateOfferDocument": { + "methods": [ + "delete_private_offer_document" + ] + }, + "ListStandardOffers": { + "methods": [ + "list_standard_offers" + ] + }, + "GetStandardOffer": { + "methods": [ + "get_standard_offer" + ] + }, + "GetSku": { + "methods": [ + "get_sku" + ] + }, + "ListSkus": { + "methods": [ + "list_skus" + ] + }, + "GetSkuGroup": { + "methods": [ + "get_sku_group" + ] + }, + "ListSkuGroups": { + "methods": [ + "list_sku_groups" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/google-cloud-commerce_producer-v1beta.gemspec b/owl-bot-staging/google-cloud-commerce_producer-v1beta/google-cloud-commerce_producer-v1beta.gemspec new file mode 100644 index 000000000000..7f96486a356c --- /dev/null +++ b/owl-bot-staging/google-cloud-commerce_producer-v1beta/google-cloud-commerce_producer-v1beta.gemspec @@ -0,0 +1,29 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/commerce_producer/v1beta/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-commerce_producer-v1beta" + gem.version = Google::Cloud::CommerceProducer::V1beta::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Using this API, partners can: * Manage private offers extended to specific customer billing accounts. * Attach documents to private offers, such as custom EULAs or Statements of Work. * Publish private offers to make them available to customers. # Data Model The following resources are exposed by this API: * **Service**: Represents a service offered by a partner on Google Cloud Marketplace. * **StandardOffer**: Represents a standard offer for a product, which can be used as a base for private offers. * **PrivateOffer**: Represents a customized offer extended to a specific customer billing account. * **PrivateOfferDocument**: Represents a document attached to a private offer. * **SkuGroup**: Represents a group of SKUs (Stock Keeping Units) used for pricing or commitment. * **Sku**: Represents a SKU (Stock Keeping Unit) used for pricing or commitment. Note that google-cloud-commerce_producer-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-commerce_producer instead. See the readme for more details." + gem.summary = "Partner API for the Cloud Commerce Producer API Early Access." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.3" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "google-cloud-location", "~> 1.0" +end diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google-cloud-commerce_producer-v1beta.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google-cloud-commerce_producer-v1beta.rb new file mode 100644 index 000000000000..057c0792ccac --- /dev/null +++ b/owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google-cloud-commerce_producer-v1beta.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# This gem does not autoload during Bundler.require. To load this gem, +# issue explicit require statements for the packages desired, e.g.: +# require "google/cloud/commerce_producer/v1beta" diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerce_producer/v1beta.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerce_producer/v1beta.rb new file mode 100644 index 000000000000..c3f88dd1c729 --- /dev/null +++ b/owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerce_producer/v1beta.rb @@ -0,0 +1,45 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/commerce_producer/v1beta/commerce_transaction" +require "google/cloud/commerce_producer/v1beta/version" + +module Google + module Cloud + module CommerceProducer + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/commerce_producer/v1beta" + # client = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/commerce_producer/v1beta" + # client = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new + # + module V1beta + end + end + end +end + +helper_path = ::File.join __dir__, "v1beta", "_helpers.rb" +require "google/cloud/commerce_producer/v1beta/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerce_producer/v1beta/bindings_override.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerce_producer/v1beta/bindings_override.rb new file mode 100644 index 000000000000..b07645bf3a23 --- /dev/null +++ b/owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerce_producer/v1beta/bindings_override.rb @@ -0,0 +1,75 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" + +module Google + module Cloud + module CommerceProducer + ## + # @example Loading just the REST part of this package, including all its services, and instantiating a REST client + # + # require "google/cloud/commerce_producer/v1beta/rest" + # client = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new + # + module V1beta + ## + # @private + # Initialize the mixin bindings configuration + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "CommerceProducer"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config + default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1beta/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ], + body: nil + ) + ] + default_config.bindings_override["google.cloud.location.Locations.ListLocations"] = [ + + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1beta/{name}/locations", + matches: [ + ["name", %r{^projects/[^/]+/?$}, false] + ], + body: nil + ) + ] + default_config + end + yield @configure if block_given? + @configure + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerce_producer/v1beta/commerce_transaction.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerce_producer/v1beta/commerce_transaction.rb new file mode 100644 index 000000000000..361bca635816 --- /dev/null +++ b/owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerce_producer/v1beta/commerce_transaction.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/commerce_producer/v1beta/version" + +require "google/cloud/commerce_producer/v1beta/commerce_transaction/credentials" +require "google/cloud/commerce_producer/v1beta/commerce_transaction/paths" +require "google/cloud/commerce_producer/v1beta/commerce_transaction/client" +require "google/cloud/commerce_producer/v1beta/commerce_transaction/rest" + +module Google + module Cloud + module CommerceProducer + module V1beta + ## + # APIs related to managing resources that model commercial transactions. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/commerce_producer/v1beta/commerce_transaction" + # client = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/commerce_producer/v1beta/commerce_transaction/rest" + # client = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new + # + module CommerceTransaction + end + end + end + end +end + +helper_path = ::File.join __dir__, "commerce_transaction", "helpers.rb" +require "google/cloud/commerce_producer/v1beta/commerce_transaction/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerce_producer/v1beta/commerce_transaction/client.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerce_producer/v1beta/commerce_transaction/client.rb new file mode 100644 index 000000000000..402b4e9c2323 --- /dev/null +++ b/owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerce_producer/v1beta/commerce_transaction/client.rb @@ -0,0 +1,2574 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/commerceproducer/v1beta/commerce_transaction_pb" +require "google/cloud/location" + +module Google + module Cloud + module CommerceProducer + module V1beta + module CommerceTransaction + ## + # Client for the CommerceTransaction service. + # + # APIs related to managing resources that model commercial transactions. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "commerceproducer.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :commerce_transaction_stub + + ## + # Configure the CommerceTransaction Client class. + # + # See {::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CommerceTransaction clients + # ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "CommerceProducer", "V1beta"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.list_services.timeout = 60.0 + default_config.rpcs.list_services.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_service.timeout = 60.0 + default_config.rpcs.get_service.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_private_offers.timeout = 60.0 + default_config.rpcs.list_private_offers.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_private_offer.timeout = 60.0 + default_config.rpcs.get_private_offer.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.resolve_amendment_target.timeout = 60.0 + + default_config.rpcs.create_private_offer.timeout = 60.0 + + default_config.rpcs.update_private_offer.timeout = 60.0 + + default_config.rpcs.publish_private_offer.timeout = 60.0 + + default_config.rpcs.cancel_private_offer.timeout = 60.0 + + default_config.rpcs.delete_private_offer.timeout = 60.0 + + default_config.rpcs.list_private_offer_documents.timeout = 60.0 + default_config.rpcs.list_private_offer_documents.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_private_offer_document.timeout = 60.0 + default_config.rpcs.get_private_offer_document.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_private_offer_document.timeout = 60.0 + + default_config.rpcs.update_private_offer_document.timeout = 60.0 + + default_config.rpcs.delete_private_offer_document.timeout = 60.0 + + default_config.rpcs.list_standard_offers.timeout = 60.0 + default_config.rpcs.list_standard_offers.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_standard_offer.timeout = 60.0 + default_config.rpcs.get_standard_offer.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_sku.timeout = 60.0 + default_config.rpcs.get_sku.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_skus.timeout = 60.0 + default_config.rpcs.list_skus.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_sku_group.timeout = 60.0 + default_config.rpcs.get_sku_group.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_sku_groups.timeout = 60.0 + default_config.rpcs.list_sku_groups.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the CommerceTransaction Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @commerce_transaction_stub.universe_domain + end + + ## + # Create a new CommerceTransaction client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CommerceTransaction client. + # @yieldparam config [Client::Configuration] + # + def initialize + # These require statements are intentionally placed here to initialize + # the gRPC module only when it's required. + # See https://github.com/googleapis/toolkit/issues/446 + require "gapic/grpc" + require "google/cloud/commerceproducer/v1beta/commerce_transaction_services_pb" + + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @commerce_transaction_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Stub, + credentials: credentials, + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + channel_args: @config.channel_args, + interceptors: @config.interceptors, + channel_pool_config: @config.channel_pool, + logger: @config.logger + ) + + @commerce_transaction_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + + @location_client = Google::Cloud::Location::Locations::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @commerce_transaction_stub.endpoint + config.universe_domain = @commerce_transaction_stub.universe_domain + config.logger = @commerce_transaction_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Client] + # + attr_reader :location_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @commerce_transaction_stub.logger + end + + # Service calls + + ## + # Lists Services in a given project and location. + # + # @overload list_services(request, options = nil) + # Pass arguments to `list_services` via a request object, either of type + # {::Google::Cloud::CommerceProducer::V1beta::ListServicesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CommerceProducer::V1beta::ListServicesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_services(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_services` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent value for ListServicesRequest + # @param page_size [::Integer] + # Optional. Maximum results to return. The service may return fewer than this + # value. The maximum value is 500; values above 500 will be coerced to 500. + # If unspecified, the server will default to the maximum. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::CommerceProducer::V1beta::Service>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::CommerceProducer::V1beta::Service>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/commerce_producer/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CommerceProducer::V1beta::ListServicesRequest.new + # + # # Call the list_services method. + # result = client.list_services request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::CommerceProducer::V1beta::Service. + # p item + # end + # + def list_services request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::ListServicesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_services.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_services.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_services.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @commerce_transaction_stub.call_rpc :list_services, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @commerce_transaction_stub, :list_services, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single Service. + # + # @overload get_service(request, options = nil) + # Pass arguments to `get_service` via a request object, either of type + # {::Google::Cloud::CommerceProducer::V1beta::GetServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CommerceProducer::V1beta::GetServiceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_service(name: nil, view: nil) + # Pass arguments to `get_service` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource + # @param view [::Google::Cloud::CommerceProducer::V1beta::ServiceView] + # Optional. The view of the Service to return. + # If unspecified, the default view is BASIC. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::CommerceProducer::V1beta::Service] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::CommerceProducer::V1beta::Service] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/commerce_producer/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CommerceProducer::V1beta::GetServiceRequest.new + # + # # Call the get_service method. + # result = client.get_service request + # + # # The returned object is of type Google::Cloud::CommerceProducer::V1beta::Service. + # p result + # + def get_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::GetServiceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_service.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_service.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @commerce_transaction_stub.call_rpc :get_service, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists PrivateOffers for the given parent. + # + # @overload list_private_offers(request, options = nil) + # Pass arguments to `list_private_offers` via a request object, either of type + # {::Google::Cloud::CommerceProducer::V1beta::ListPrivateOffersRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CommerceProducer::V1beta::ListPrivateOffersRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_private_offers(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_private_offers` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent value for ListPrivateOffersRequest + # @param page_size [::Integer] + # Optional. Maximum results to return. The service may return fewer than this + # value. The maximum value is 500; values above 500 will be coerced to 500. + # If unspecified, the server will default to the maximum. + # @param page_token [::String] + # Optional. A page token, received from a previous list response message. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters of the list request must match the + # request that returned the page token. + # @param filter [::String] + # Optional. Filter expression that matches a subset of resources to show. + # See https://google.aip.dev/160 for more details. + # Only supports filtering by: + # + # * `update_time`. Example: `update_time > "2012-04-21T11:30:00-04:00"`. + # @param order_by [::String] + # Optional. Ordering expression for sorting the results. + # See https://google.aip.dev/132#ordering for more details. + # If no value is present the default ordering is unspecified. + # Only supports ordering by: + # + # * `update_time` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::CommerceProducer::V1beta::PrivateOffer>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::CommerceProducer::V1beta::PrivateOffer>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/commerce_producer/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CommerceProducer::V1beta::ListPrivateOffersRequest.new + # + # # Call the list_private_offers method. + # result = client.list_private_offers request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::CommerceProducer::V1beta::PrivateOffer. + # p item + # end + # + def list_private_offers request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::ListPrivateOffersRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_private_offers.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_private_offers.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_private_offers.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @commerce_transaction_stub.call_rpc :list_private_offers, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @commerce_transaction_stub, :list_private_offers, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single PrivateOffer. + # + # @overload get_private_offer(request, options = nil) + # Pass arguments to `get_private_offer` via a request object, either of type + # {::Google::Cloud::CommerceProducer::V1beta::GetPrivateOfferRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CommerceProducer::V1beta::GetPrivateOfferRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_private_offer(name: nil, view: nil) + # Pass arguments to `get_private_offer` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource + # @param view [::Google::Cloud::CommerceProducer::V1beta::PrivateOfferView] + # Optional. The view of the PrivateOffer to return. + # If unspecified, the default view is BASIC. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/commerce_producer/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CommerceProducer::V1beta::GetPrivateOfferRequest.new + # + # # Call the get_private_offer method. + # result = client.get_private_offer request + # + # # The returned object is of type Google::Cloud::CommerceProducer::V1beta::PrivateOffer. + # p result + # + def get_private_offer request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::GetPrivateOfferRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_private_offer.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_private_offer.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_private_offer.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @commerce_transaction_stub.call_rpc :get_private_offer, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Resolves the existing offer that must be amended when creating a new + # PrivateOffer. Use this method to determine the correct amendment target + # before creating or publishing an offer. + # + # @overload resolve_amendment_target(request, options = nil) + # Pass arguments to `resolve_amendment_target` via a request object, either of type + # {::Google::Cloud::CommerceProducer::V1beta::ResolveAmendmentTargetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CommerceProducer::V1beta::ResolveAmendmentTargetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload resolve_amendment_target(parent: nil, target_billing_account: nil, base_standard_offer: nil) + # Pass arguments to `resolve_amendment_target` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent value for ResolveAmendmentTargetRequest + # @param target_billing_account [::String] + # Required. The customer's billing account targeted by the offer. This is the + # billing account for which the new private offer will be created on. Format: + # billingAccounts/\\{billing_account}. + # @param base_standard_offer [::String] + # Required. The base standard offer that the private offer will be based on. + # Format: + # projects/\\{project}/locations/\\{location}/services/\\{service}/standardOffers/\\{standard_offer}. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::CommerceProducer::V1beta::ResolveAmendmentTargetResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::CommerceProducer::V1beta::ResolveAmendmentTargetResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/commerce_producer/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CommerceProducer::V1beta::ResolveAmendmentTargetRequest.new + # + # # Call the resolve_amendment_target method. + # result = client.resolve_amendment_target request + # + # # The returned object is of type Google::Cloud::CommerceProducer::V1beta::ResolveAmendmentTargetResponse. + # p result + # + def resolve_amendment_target request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::ResolveAmendmentTargetRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.resolve_amendment_target.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.resolve_amendment_target.timeout, + metadata: metadata, + retry_policy: @config.rpcs.resolve_amendment_target.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @commerce_transaction_stub.call_rpc :resolve_amendment_target, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a new PrivateOffer in a given project and location. + # + # @overload create_private_offer(request, options = nil) + # Pass arguments to `create_private_offer` via a request object, either of type + # {::Google::Cloud::CommerceProducer::V1beta::CreatePrivateOfferRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CommerceProducer::V1beta::CreatePrivateOfferRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_private_offer(parent: nil, private_offer: nil) + # Pass arguments to `create_private_offer` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Value for parent. + # @param private_offer [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer, ::Hash] + # Required. The resource being created + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/commerce_producer/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CommerceProducer::V1beta::CreatePrivateOfferRequest.new + # + # # Call the create_private_offer method. + # result = client.create_private_offer request + # + # # The returned object is of type Google::Cloud::CommerceProducer::V1beta::PrivateOffer. + # p result + # + def create_private_offer request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::CreatePrivateOfferRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_private_offer.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_private_offer.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_private_offer.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @commerce_transaction_stub.call_rpc :create_private_offer, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the target PrivateOffer. + # + # @overload update_private_offer(request, options = nil) + # Pass arguments to `update_private_offer` via a request object, either of type + # {::Google::Cloud::CommerceProducer::V1beta::UpdatePrivateOfferRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CommerceProducer::V1beta::UpdatePrivateOfferRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_private_offer(update_mask: nil, private_offer: nil) + # Pass arguments to `update_private_offer` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The list of fields to update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. + # The special value "*" means full replacement. + # If unspecified, all fields present in the request will be overwritten. + # @param private_offer [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer, ::Hash] + # Required. The resource being updated + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/commerce_producer/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CommerceProducer::V1beta::UpdatePrivateOfferRequest.new + # + # # Call the update_private_offer method. + # result = client.update_private_offer request + # + # # The returned object is of type Google::Cloud::CommerceProducer::V1beta::PrivateOffer. + # p result + # + def update_private_offer request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::UpdatePrivateOfferRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_private_offer.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.private_offer&.name + header_params["private_offer.name"] = request.private_offer.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_private_offer.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_private_offer.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @commerce_transaction_stub.call_rpc :update_private_offer, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Publishes the target PrivateOffer. + # + # @overload publish_private_offer(request, options = nil) + # Pass arguments to `publish_private_offer` via a request object, either of type + # {::Google::Cloud::CommerceProducer::V1beta::PublishPrivateOfferRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CommerceProducer::V1beta::PublishPrivateOfferRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload publish_private_offer(name: nil, validate_only: nil) + # Pass arguments to `publish_private_offer` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource + # @param validate_only [::Boolean] + # Optional. If set to `true`, validates the request but does not execute it. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/commerce_producer/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CommerceProducer::V1beta::PublishPrivateOfferRequest.new + # + # # Call the publish_private_offer method. + # result = client.publish_private_offer request + # + # # The returned object is of type Google::Cloud::CommerceProducer::V1beta::PrivateOffer. + # p result + # + def publish_private_offer request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::PublishPrivateOfferRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.publish_private_offer.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.publish_private_offer.timeout, + metadata: metadata, + retry_policy: @config.rpcs.publish_private_offer.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @commerce_transaction_stub.call_rpc :publish_private_offer, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Cancels the target PrivateOffer. + # + # @overload cancel_private_offer(request, options = nil) + # Pass arguments to `cancel_private_offer` via a request object, either of type + # {::Google::Cloud::CommerceProducer::V1beta::CancelPrivateOfferRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CommerceProducer::V1beta::CancelPrivateOfferRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload cancel_private_offer(name: nil, cancellation_note: nil) + # Pass arguments to `cancel_private_offer` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource + # @param cancellation_note [::String] + # Optional. Internal note relating to the cancellation. + # Stored on the cancelled offer. Not visible to customers. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/commerce_producer/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CommerceProducer::V1beta::CancelPrivateOfferRequest.new + # + # # Call the cancel_private_offer method. + # result = client.cancel_private_offer request + # + # # The returned object is of type Google::Cloud::CommerceProducer::V1beta::PrivateOffer. + # p result + # + def cancel_private_offer request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::CancelPrivateOfferRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.cancel_private_offer.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.cancel_private_offer.timeout, + metadata: metadata, + retry_policy: @config.rpcs.cancel_private_offer.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @commerce_transaction_stub.call_rpc :cancel_private_offer, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes the target PrivateOffer. + # + # @overload delete_private_offer(request, options = nil) + # Pass arguments to `delete_private_offer` via a request object, either of type + # {::Google::Cloud::CommerceProducer::V1beta::DeletePrivateOfferRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CommerceProducer::V1beta::DeletePrivateOfferRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_private_offer(name: nil, force: nil) + # Pass arguments to `delete_private_offer` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource + # @param force [::Boolean] + # Optional. Indicates whether to cascade the delete to child resources. + # If false, the request fails if child resources exist. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/commerce_producer/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CommerceProducer::V1beta::DeletePrivateOfferRequest.new + # + # # Call the delete_private_offer method. + # result = client.delete_private_offer request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_private_offer request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::DeletePrivateOfferRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_private_offer.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_private_offer.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_private_offer.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @commerce_transaction_stub.call_rpc :delete_private_offer, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists PrivateOfferDocuments for the given parent. + # + # @overload list_private_offer_documents(request, options = nil) + # Pass arguments to `list_private_offer_documents` via a request object, either of type + # {::Google::Cloud::CommerceProducer::V1beta::ListPrivateOfferDocumentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CommerceProducer::V1beta::ListPrivateOfferDocumentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_private_offer_documents(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_private_offer_documents` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent value for ListPrivateOfferDocumentsRequest. + # @param page_size [::Integer] + # Optional. Maximum results to return. The service may return fewer than this + # value. The maximum value is 500; values above 500 will be coerced to 500. + # If unspecified, the server will default to the maximum. + # @param page_token [::String] + # Optional. A page token, received from a previous list response message. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters of the list request must match the + # request that returned the page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/commerce_producer/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CommerceProducer::V1beta::ListPrivateOfferDocumentsRequest.new + # + # # Call the list_private_offer_documents method. + # result = client.list_private_offer_documents request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument. + # p item + # end + # + def list_private_offer_documents request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::ListPrivateOfferDocumentsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_private_offer_documents.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_private_offer_documents.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_private_offer_documents.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @commerce_transaction_stub.call_rpc :list_private_offer_documents, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @commerce_transaction_stub, :list_private_offer_documents, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single PrivateOfferDocument. + # + # @overload get_private_offer_document(request, options = nil) + # Pass arguments to `get_private_offer_document` via a request object, either of type + # {::Google::Cloud::CommerceProducer::V1beta::GetPrivateOfferDocumentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CommerceProducer::V1beta::GetPrivateOfferDocumentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_private_offer_document(name: nil) + # Pass arguments to `get_private_offer_document` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/commerce_producer/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CommerceProducer::V1beta::GetPrivateOfferDocumentRequest.new + # + # # Call the get_private_offer_document method. + # result = client.get_private_offer_document request + # + # # The returned object is of type Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument. + # p result + # + def get_private_offer_document request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::GetPrivateOfferDocumentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_private_offer_document.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_private_offer_document.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_private_offer_document.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @commerce_transaction_stub.call_rpc :get_private_offer_document, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a new PrivateOfferDocument in a given project and location. + # + # @overload create_private_offer_document(request, options = nil) + # Pass arguments to `create_private_offer_document` via a request object, either of type + # {::Google::Cloud::CommerceProducer::V1beta::CreatePrivateOfferDocumentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CommerceProducer::V1beta::CreatePrivateOfferDocumentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_private_offer_document(parent: nil, private_offer_document: nil) + # Pass arguments to `create_private_offer_document` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Value for parent. + # @param private_offer_document [::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument, ::Hash] + # Required. The resource being created. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/commerce_producer/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CommerceProducer::V1beta::CreatePrivateOfferDocumentRequest.new + # + # # Call the create_private_offer_document method. + # result = client.create_private_offer_document request + # + # # The returned object is of type Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument. + # p result + # + def create_private_offer_document request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::CreatePrivateOfferDocumentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_private_offer_document.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_private_offer_document.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_private_offer_document.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @commerce_transaction_stub.call_rpc :create_private_offer_document, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the target PrivateOfferDocument. + # + # @overload update_private_offer_document(request, options = nil) + # Pass arguments to `update_private_offer_document` via a request object, either of type + # {::Google::Cloud::CommerceProducer::V1beta::UpdatePrivateOfferDocumentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CommerceProducer::V1beta::UpdatePrivateOfferDocumentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_private_offer_document(private_offer_document: nil, update_mask: nil) + # Pass arguments to `update_private_offer_document` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param private_offer_document [::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument, ::Hash] + # Required. The resource being updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The list of fields to update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. + # The special value "*" means full replacement. + # If unspecified, all fields present in the request will be overwritten. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/commerce_producer/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CommerceProducer::V1beta::UpdatePrivateOfferDocumentRequest.new + # + # # Call the update_private_offer_document method. + # result = client.update_private_offer_document request + # + # # The returned object is of type Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument. + # p result + # + def update_private_offer_document request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::UpdatePrivateOfferDocumentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_private_offer_document.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.private_offer_document&.name + header_params["private_offer_document.name"] = request.private_offer_document.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_private_offer_document.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_private_offer_document.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @commerce_transaction_stub.call_rpc :update_private_offer_document, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes the target PrivateOfferDocument. + # + # @overload delete_private_offer_document(request, options = nil) + # Pass arguments to `delete_private_offer_document` via a request object, either of type + # {::Google::Cloud::CommerceProducer::V1beta::DeletePrivateOfferDocumentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CommerceProducer::V1beta::DeletePrivateOfferDocumentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_private_offer_document(name: nil) + # Pass arguments to `delete_private_offer_document` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/commerce_producer/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CommerceProducer::V1beta::DeletePrivateOfferDocumentRequest.new + # + # # Call the delete_private_offer_document method. + # result = client.delete_private_offer_document request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_private_offer_document request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::DeletePrivateOfferDocumentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_private_offer_document.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_private_offer_document.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_private_offer_document.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @commerce_transaction_stub.call_rpc :delete_private_offer_document, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists StandardOffers for the given parent. + # + # @overload list_standard_offers(request, options = nil) + # Pass arguments to `list_standard_offers` via a request object, either of type + # {::Google::Cloud::CommerceProducer::V1beta::ListStandardOffersRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CommerceProducer::V1beta::ListStandardOffersRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_standard_offers(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_standard_offers` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent value for ListStandardOffersRequest + # @param page_size [::Integer] + # Optional. Maximum results to return. The service may return fewer than this + # value. The maximum value is 500; values above 500 will be coerced to 500. + # If unspecified, the server will default to the maximum. + # @param page_token [::String] + # Optional. A page token, received from a previous list response message. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters of the list request must match the + # request that returned the page token. + # @param filter [::String] + # Optional. Filter expression that matches a subset of resources to show. + # See https://google.aip.dev/160 for more details. + # Supports filtering by: + # + # * `effective_time`. + # Example: `effective_time > "2012-04-21T11:30:00-04:00"`. + # * `expire_time`. Example: `expire_time < "2026-05-06T00:00:00Z"`. + # @param order_by [::String] + # Optional. Ordering expression for sorting the results. + # See https://google.aip.dev/132#ordering for more details. + # If no value is present the default ordering is unspecified. + # Supports ordering by: + # + # * `effective_time` + # * `expire_time` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::CommerceProducer::V1beta::StandardOffer>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::CommerceProducer::V1beta::StandardOffer>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/commerce_producer/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CommerceProducer::V1beta::ListStandardOffersRequest.new + # + # # Call the list_standard_offers method. + # result = client.list_standard_offers request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::CommerceProducer::V1beta::StandardOffer. + # p item + # end + # + def list_standard_offers request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::ListStandardOffersRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_standard_offers.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_standard_offers.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_standard_offers.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @commerce_transaction_stub.call_rpc :list_standard_offers, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @commerce_transaction_stub, :list_standard_offers, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single StandardOffer. + # + # @overload get_standard_offer(request, options = nil) + # Pass arguments to `get_standard_offer` via a request object, either of type + # {::Google::Cloud::CommerceProducer::V1beta::GetStandardOfferRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CommerceProducer::V1beta::GetStandardOfferRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_standard_offer(name: nil, view: nil) + # Pass arguments to `get_standard_offer` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource + # @param view [::Google::Cloud::CommerceProducer::V1beta::StandardOfferView] + # Optional. The view of the StandardOffer to return. + # If unspecified, the default view is BASIC. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::CommerceProducer::V1beta::StandardOffer] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::CommerceProducer::V1beta::StandardOffer] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/commerce_producer/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CommerceProducer::V1beta::GetStandardOfferRequest.new + # + # # Call the get_standard_offer method. + # result = client.get_standard_offer request + # + # # The returned object is of type Google::Cloud::CommerceProducer::V1beta::StandardOffer. + # p result + # + def get_standard_offer request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::GetStandardOfferRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_standard_offer.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_standard_offer.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_standard_offer.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @commerce_transaction_stub.call_rpc :get_standard_offer, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single Sku. + # + # @overload get_sku(request, options = nil) + # Pass arguments to `get_sku` via a request object, either of type + # {::Google::Cloud::CommerceProducer::V1beta::GetSkuRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CommerceProducer::V1beta::GetSkuRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_sku(name: nil) + # Pass arguments to `get_sku` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::CommerceProducer::V1beta::Sku] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::CommerceProducer::V1beta::Sku] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/commerce_producer/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CommerceProducer::V1beta::GetSkuRequest.new + # + # # Call the get_sku method. + # result = client.get_sku request + # + # # The returned object is of type Google::Cloud::CommerceProducer::V1beta::Sku. + # p result + # + def get_sku request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::GetSkuRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_sku.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_sku.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_sku.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @commerce_transaction_stub.call_rpc :get_sku, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists Skus for the given parent. + # + # @overload list_skus(request, options = nil) + # Pass arguments to `list_skus` via a request object, either of type + # {::Google::Cloud::CommerceProducer::V1beta::ListSkusRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CommerceProducer::V1beta::ListSkusRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_skus(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_skus` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent value for ListSkusRequest + # @param page_size [::Integer] + # Optional. Maximum results to return. The service may return fewer than this + # value. The maximum value is 500; values above 500 will be coerced to 500. + # If unspecified, the server will default to the maximum. + # @param page_token [::String] + # Optional. A page token, received from a previous list response message. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters of the list request must match the + # request that returned the page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::CommerceProducer::V1beta::Sku>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::CommerceProducer::V1beta::Sku>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/commerce_producer/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CommerceProducer::V1beta::ListSkusRequest.new + # + # # Call the list_skus method. + # result = client.list_skus request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::CommerceProducer::V1beta::Sku. + # p item + # end + # + def list_skus request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::ListSkusRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_skus.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_skus.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_skus.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @commerce_transaction_stub.call_rpc :list_skus, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @commerce_transaction_stub, :list_skus, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single SkuGroup. + # + # @overload get_sku_group(request, options = nil) + # Pass arguments to `get_sku_group` via a request object, either of type + # {::Google::Cloud::CommerceProducer::V1beta::GetSkuGroupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CommerceProducer::V1beta::GetSkuGroupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_sku_group(name: nil) + # Pass arguments to `get_sku_group` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::CommerceProducer::V1beta::SkuGroup] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::CommerceProducer::V1beta::SkuGroup] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/commerce_producer/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CommerceProducer::V1beta::GetSkuGroupRequest.new + # + # # Call the get_sku_group method. + # result = client.get_sku_group request + # + # # The returned object is of type Google::Cloud::CommerceProducer::V1beta::SkuGroup. + # p result + # + def get_sku_group request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::GetSkuGroupRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_sku_group.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_sku_group.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_sku_group.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @commerce_transaction_stub.call_rpc :get_sku_group, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists SkuGroups for the given parent. + # + # @overload list_sku_groups(request, options = nil) + # Pass arguments to `list_sku_groups` via a request object, either of type + # {::Google::Cloud::CommerceProducer::V1beta::ListSkuGroupsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CommerceProducer::V1beta::ListSkuGroupsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_sku_groups(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_sku_groups` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent value for ListSkuGroupsRequest + # @param page_size [::Integer] + # Optional. Maximum results to return. The service may return fewer than this + # value. The maximum value is 500; values above 500 will be coerced to 500. + # If unspecified, the server will default to the maximum. + # @param page_token [::String] + # Optional. A page token, received from a previous list response message. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters of the list request must match the + # request that returned the page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::CommerceProducer::V1beta::SkuGroup>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::CommerceProducer::V1beta::SkuGroup>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/commerce_producer/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CommerceProducer::V1beta::ListSkuGroupsRequest.new + # + # # Call the list_sku_groups method. + # result = client.list_sku_groups request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::CommerceProducer::V1beta::SkuGroup. + # p item + # end + # + def list_sku_groups request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::ListSkuGroupsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_sku_groups.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_sku_groups.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_sku_groups.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @commerce_transaction_stub.call_rpc :list_sku_groups, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @commerce_transaction_stub, :list_sku_groups, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the CommerceTransaction API. + # + # This class represents the configuration for CommerceTransaction, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_services to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_services.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_services.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "commerceproducer.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the CommerceTransaction API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_services` + # @return [::Gapic::Config::Method] + # + attr_reader :list_services + ## + # RPC-specific configuration for `get_service` + # @return [::Gapic::Config::Method] + # + attr_reader :get_service + ## + # RPC-specific configuration for `list_private_offers` + # @return [::Gapic::Config::Method] + # + attr_reader :list_private_offers + ## + # RPC-specific configuration for `get_private_offer` + # @return [::Gapic::Config::Method] + # + attr_reader :get_private_offer + ## + # RPC-specific configuration for `resolve_amendment_target` + # @return [::Gapic::Config::Method] + # + attr_reader :resolve_amendment_target + ## + # RPC-specific configuration for `create_private_offer` + # @return [::Gapic::Config::Method] + # + attr_reader :create_private_offer + ## + # RPC-specific configuration for `update_private_offer` + # @return [::Gapic::Config::Method] + # + attr_reader :update_private_offer + ## + # RPC-specific configuration for `publish_private_offer` + # @return [::Gapic::Config::Method] + # + attr_reader :publish_private_offer + ## + # RPC-specific configuration for `cancel_private_offer` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_private_offer + ## + # RPC-specific configuration for `delete_private_offer` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_private_offer + ## + # RPC-specific configuration for `list_private_offer_documents` + # @return [::Gapic::Config::Method] + # + attr_reader :list_private_offer_documents + ## + # RPC-specific configuration for `get_private_offer_document` + # @return [::Gapic::Config::Method] + # + attr_reader :get_private_offer_document + ## + # RPC-specific configuration for `create_private_offer_document` + # @return [::Gapic::Config::Method] + # + attr_reader :create_private_offer_document + ## + # RPC-specific configuration for `update_private_offer_document` + # @return [::Gapic::Config::Method] + # + attr_reader :update_private_offer_document + ## + # RPC-specific configuration for `delete_private_offer_document` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_private_offer_document + ## + # RPC-specific configuration for `list_standard_offers` + # @return [::Gapic::Config::Method] + # + attr_reader :list_standard_offers + ## + # RPC-specific configuration for `get_standard_offer` + # @return [::Gapic::Config::Method] + # + attr_reader :get_standard_offer + ## + # RPC-specific configuration for `get_sku` + # @return [::Gapic::Config::Method] + # + attr_reader :get_sku + ## + # RPC-specific configuration for `list_skus` + # @return [::Gapic::Config::Method] + # + attr_reader :list_skus + ## + # RPC-specific configuration for `get_sku_group` + # @return [::Gapic::Config::Method] + # + attr_reader :get_sku_group + ## + # RPC-specific configuration for `list_sku_groups` + # @return [::Gapic::Config::Method] + # + attr_reader :list_sku_groups + + # @private + def initialize parent_rpcs = nil + list_services_config = parent_rpcs.list_services if parent_rpcs.respond_to? :list_services + @list_services = ::Gapic::Config::Method.new list_services_config + get_service_config = parent_rpcs.get_service if parent_rpcs.respond_to? :get_service + @get_service = ::Gapic::Config::Method.new get_service_config + list_private_offers_config = parent_rpcs.list_private_offers if parent_rpcs.respond_to? :list_private_offers + @list_private_offers = ::Gapic::Config::Method.new list_private_offers_config + get_private_offer_config = parent_rpcs.get_private_offer if parent_rpcs.respond_to? :get_private_offer + @get_private_offer = ::Gapic::Config::Method.new get_private_offer_config + resolve_amendment_target_config = parent_rpcs.resolve_amendment_target if parent_rpcs.respond_to? :resolve_amendment_target + @resolve_amendment_target = ::Gapic::Config::Method.new resolve_amendment_target_config + create_private_offer_config = parent_rpcs.create_private_offer if parent_rpcs.respond_to? :create_private_offer + @create_private_offer = ::Gapic::Config::Method.new create_private_offer_config + update_private_offer_config = parent_rpcs.update_private_offer if parent_rpcs.respond_to? :update_private_offer + @update_private_offer = ::Gapic::Config::Method.new update_private_offer_config + publish_private_offer_config = parent_rpcs.publish_private_offer if parent_rpcs.respond_to? :publish_private_offer + @publish_private_offer = ::Gapic::Config::Method.new publish_private_offer_config + cancel_private_offer_config = parent_rpcs.cancel_private_offer if parent_rpcs.respond_to? :cancel_private_offer + @cancel_private_offer = ::Gapic::Config::Method.new cancel_private_offer_config + delete_private_offer_config = parent_rpcs.delete_private_offer if parent_rpcs.respond_to? :delete_private_offer + @delete_private_offer = ::Gapic::Config::Method.new delete_private_offer_config + list_private_offer_documents_config = parent_rpcs.list_private_offer_documents if parent_rpcs.respond_to? :list_private_offer_documents + @list_private_offer_documents = ::Gapic::Config::Method.new list_private_offer_documents_config + get_private_offer_document_config = parent_rpcs.get_private_offer_document if parent_rpcs.respond_to? :get_private_offer_document + @get_private_offer_document = ::Gapic::Config::Method.new get_private_offer_document_config + create_private_offer_document_config = parent_rpcs.create_private_offer_document if parent_rpcs.respond_to? :create_private_offer_document + @create_private_offer_document = ::Gapic::Config::Method.new create_private_offer_document_config + update_private_offer_document_config = parent_rpcs.update_private_offer_document if parent_rpcs.respond_to? :update_private_offer_document + @update_private_offer_document = ::Gapic::Config::Method.new update_private_offer_document_config + delete_private_offer_document_config = parent_rpcs.delete_private_offer_document if parent_rpcs.respond_to? :delete_private_offer_document + @delete_private_offer_document = ::Gapic::Config::Method.new delete_private_offer_document_config + list_standard_offers_config = parent_rpcs.list_standard_offers if parent_rpcs.respond_to? :list_standard_offers + @list_standard_offers = ::Gapic::Config::Method.new list_standard_offers_config + get_standard_offer_config = parent_rpcs.get_standard_offer if parent_rpcs.respond_to? :get_standard_offer + @get_standard_offer = ::Gapic::Config::Method.new get_standard_offer_config + get_sku_config = parent_rpcs.get_sku if parent_rpcs.respond_to? :get_sku + @get_sku = ::Gapic::Config::Method.new get_sku_config + list_skus_config = parent_rpcs.list_skus if parent_rpcs.respond_to? :list_skus + @list_skus = ::Gapic::Config::Method.new list_skus_config + get_sku_group_config = parent_rpcs.get_sku_group if parent_rpcs.respond_to? :get_sku_group + @get_sku_group = ::Gapic::Config::Method.new get_sku_group_config + list_sku_groups_config = parent_rpcs.list_sku_groups if parent_rpcs.respond_to? :list_sku_groups + @list_sku_groups = ::Gapic::Config::Method.new list_sku_groups_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerce_producer/v1beta/commerce_transaction/credentials.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerce_producer/v1beta/commerce_transaction/credentials.rb new file mode 100644 index 000000000000..81dca397b79c --- /dev/null +++ b/owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerce_producer/v1beta/commerce_transaction/credentials.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "googleauth" + +module Google + module Cloud + module CommerceProducer + module V1beta + module CommerceTransaction + # Credentials for the CommerceTransaction API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS_JSON", + "GOOGLE_CLOUD_KEYFILE_JSON", + "GCLOUD_KEYFILE_JSON" + ] + self.paths = [ + "~/.config/google_cloud/application_default_credentials.json" + ] + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerce_producer/v1beta/commerce_transaction/paths.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerce_producer/v1beta/commerce_transaction/paths.rb new file mode 100644 index 000000000000..bc55a2ece373 --- /dev/null +++ b/owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerce_producer/v1beta/commerce_transaction/paths.rb @@ -0,0 +1,184 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module CommerceProducer + module V1beta + module CommerceTransaction + # Path helper methods for the CommerceTransaction API. + module Paths + ## + # Create a fully-qualified BillingAccount resource string. + # + # The resource will be in the following format: + # + # `billingAccounts/{billing_account}` + # + # @param billing_account [String] + # + # @return [::String] + def billing_account_path billing_account: + "billingAccounts/#{billing_account}" + end + + ## + # Create a fully-qualified Location resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}` + # + # @param project [String] + # @param location [String] + # + # @return [::String] + def location_path project:, location: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/locations/#{location}" + end + + ## + # Create a fully-qualified PrivateOffer resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/privateOffers/{private_offer}` + # + # @param project [String] + # @param location [String] + # @param private_offer [String] + # + # @return [::String] + def private_offer_path project:, location:, private_offer: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/privateOffers/#{private_offer}" + end + + ## + # Create a fully-qualified PrivateOfferDocument resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/privateOffers/{private_offer}/documents/{document}` + # + # @param project [String] + # @param location [String] + # @param private_offer [String] + # @param document [String] + # + # @return [::String] + def private_offer_document_path project:, location:, private_offer:, document: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "private_offer cannot contain /" if private_offer.to_s.include? "/" + + "projects/#{project}/locations/#{location}/privateOffers/#{private_offer}/documents/#{document}" + end + + ## + # Create a fully-qualified Service resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/services/{service}` + # + # @param project [String] + # @param location [String] + # @param service [String] + # + # @return [::String] + def service_path project:, location:, service: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/services/#{service}" + end + + ## + # Create a fully-qualified Sku resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/services/{service}/skus/{sku}` + # + # @param project [String] + # @param location [String] + # @param service [String] + # @param sku [String] + # + # @return [::String] + def sku_path project:, location:, service:, sku: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "service cannot contain /" if service.to_s.include? "/" + + "projects/#{project}/locations/#{location}/services/#{service}/skus/#{sku}" + end + + ## + # Create a fully-qualified SkuGroup resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/skuGroups/{sku_group}` + # + # @param project [String] + # @param location [String] + # @param sku_group [String] + # + # @return [::String] + def sku_group_path project:, location:, sku_group: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/skuGroups/#{sku_group}" + end + + ## + # Create a fully-qualified StandardOffer resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/services/{service}/standardOffers/{standard_offer}` + # + # @param project [String] + # @param location [String] + # @param service [String] + # @param standard_offer [String] + # + # @return [::String] + def standard_offer_path project:, location:, service:, standard_offer: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "service cannot contain /" if service.to_s.include? "/" + + "projects/#{project}/locations/#{location}/services/#{service}/standardOffers/#{standard_offer}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerce_producer/v1beta/commerce_transaction/rest.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerce_producer/v1beta/commerce_transaction/rest.rb new file mode 100644 index 000000000000..d4ec99500c2e --- /dev/null +++ b/owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerce_producer/v1beta/commerce_transaction/rest.rb @@ -0,0 +1,53 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/commerce_producer/v1beta/version" +require "google/cloud/commerce_producer/v1beta/bindings_override" + +require "google/cloud/commerce_producer/v1beta/commerce_transaction/credentials" +require "google/cloud/commerce_producer/v1beta/commerce_transaction/paths" +require "google/cloud/commerce_producer/v1beta/commerce_transaction/rest/client" + +module Google + module Cloud + module CommerceProducer + module V1beta + ## + # APIs related to managing resources that model commercial transactions. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/commerce_producer/v1beta/commerce_transaction/rest" + # client = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new + # + module CommerceTransaction + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/commerce_producer/v1beta/commerce_transaction/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerce_producer/v1beta/commerce_transaction/rest/client.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerce_producer/v1beta/commerce_transaction/rest/client.rb new file mode 100644 index 000000000000..00c8dfa939e3 --- /dev/null +++ b/owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerce_producer/v1beta/commerce_transaction/rest/client.rb @@ -0,0 +1,2392 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/commerceproducer/v1beta/commerce_transaction_pb" +require "google/cloud/commerce_producer/v1beta/commerce_transaction/rest/service_stub" +require "google/cloud/location/rest" + +module Google + module Cloud + module CommerceProducer + module V1beta + module CommerceTransaction + module Rest + ## + # REST client for the CommerceTransaction service. + # + # APIs related to managing resources that model commercial transactions. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "commerceproducer.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :commerce_transaction_stub + + ## + # Configure the CommerceTransaction Client class. + # + # See {::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CommerceTransaction clients + # ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "CommerceProducer", "V1beta"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.list_services.timeout = 60.0 + default_config.rpcs.list_services.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_service.timeout = 60.0 + default_config.rpcs.get_service.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_private_offers.timeout = 60.0 + default_config.rpcs.list_private_offers.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_private_offer.timeout = 60.0 + default_config.rpcs.get_private_offer.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.resolve_amendment_target.timeout = 60.0 + + default_config.rpcs.create_private_offer.timeout = 60.0 + + default_config.rpcs.update_private_offer.timeout = 60.0 + + default_config.rpcs.publish_private_offer.timeout = 60.0 + + default_config.rpcs.cancel_private_offer.timeout = 60.0 + + default_config.rpcs.delete_private_offer.timeout = 60.0 + + default_config.rpcs.list_private_offer_documents.timeout = 60.0 + default_config.rpcs.list_private_offer_documents.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_private_offer_document.timeout = 60.0 + default_config.rpcs.get_private_offer_document.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_private_offer_document.timeout = 60.0 + + default_config.rpcs.update_private_offer_document.timeout = 60.0 + + default_config.rpcs.delete_private_offer_document.timeout = 60.0 + + default_config.rpcs.list_standard_offers.timeout = 60.0 + default_config.rpcs.list_standard_offers.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_standard_offer.timeout = 60.0 + default_config.rpcs.get_standard_offer.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_sku.timeout = 60.0 + default_config.rpcs.get_sku.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_skus.timeout = 60.0 + default_config.rpcs.list_skus.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_sku_group.timeout = 60.0 + default_config.rpcs.get_sku_group.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_sku_groups.timeout = 60.0 + default_config.rpcs.list_sku_groups.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the CommerceTransaction Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @commerce_transaction_stub.universe_domain + end + + ## + # Create a new CommerceTransaction REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CommerceTransaction client. + # @yieldparam config [Client::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Client.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + # Use self-signed JWT if the endpoint is unchanged from default, + # but only if the default endpoint does not have a region prefix. + enable_self_signed_jwt = @config.endpoint.nil? || + (@config.endpoint == Configuration::DEFAULT_ENDPOINT && + !@config.endpoint.split(".").first.include?("-")) + credentials ||= Credentials.default scope: @config.scope, + enable_self_signed_jwt: enable_self_signed_jwt + if credentials.is_a?(::String) || credentials.is_a?(::Hash) + credentials = Credentials.new credentials, scope: @config.scope + end + + @quota_project_id = @config.quota_project + @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id + + @commerce_transaction_stub = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @commerce_transaction_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + + @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @commerce_transaction_stub.endpoint + config.universe_domain = @commerce_transaction_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @commerce_transaction_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for mix-in of the Locations. + # + # @return [Google::Cloud::Location::Locations::Rest::Client] + # + attr_reader :location_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @commerce_transaction_stub.logger + end + + # Service calls + + ## + # Lists Services in a given project and location. + # + # @overload list_services(request, options = nil) + # Pass arguments to `list_services` via a request object, either of type + # {::Google::Cloud::CommerceProducer::V1beta::ListServicesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CommerceProducer::V1beta::ListServicesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_services(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_services` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent value for ListServicesRequest + # @param page_size [::Integer] + # Optional. Maximum results to return. The service may return fewer than this + # value. The maximum value is 500; values above 500 will be coerced to 500. + # If unspecified, the server will default to the maximum. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CommerceProducer::V1beta::Service>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CommerceProducer::V1beta::Service>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/commerce_producer/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CommerceProducer::V1beta::ListServicesRequest.new + # + # # Call the list_services method. + # result = client.list_services request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::CommerceProducer::V1beta::Service. + # p item + # end + # + def list_services request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::ListServicesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_services.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_services.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_services.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @commerce_transaction_stub.list_services request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @commerce_transaction_stub, :list_services, "services", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single Service. + # + # @overload get_service(request, options = nil) + # Pass arguments to `get_service` via a request object, either of type + # {::Google::Cloud::CommerceProducer::V1beta::GetServiceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CommerceProducer::V1beta::GetServiceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_service(name: nil, view: nil) + # Pass arguments to `get_service` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource + # @param view [::Google::Cloud::CommerceProducer::V1beta::ServiceView] + # Optional. The view of the Service to return. + # If unspecified, the default view is BASIC. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::CommerceProducer::V1beta::Service] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CommerceProducer::V1beta::Service] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/commerce_producer/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CommerceProducer::V1beta::GetServiceRequest.new + # + # # Call the get_service method. + # result = client.get_service request + # + # # The returned object is of type Google::Cloud::CommerceProducer::V1beta::Service. + # p result + # + def get_service request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::GetServiceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_service.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_service.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_service.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @commerce_transaction_stub.get_service request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists PrivateOffers for the given parent. + # + # @overload list_private_offers(request, options = nil) + # Pass arguments to `list_private_offers` via a request object, either of type + # {::Google::Cloud::CommerceProducer::V1beta::ListPrivateOffersRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CommerceProducer::V1beta::ListPrivateOffersRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_private_offers(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_private_offers` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent value for ListPrivateOffersRequest + # @param page_size [::Integer] + # Optional. Maximum results to return. The service may return fewer than this + # value. The maximum value is 500; values above 500 will be coerced to 500. + # If unspecified, the server will default to the maximum. + # @param page_token [::String] + # Optional. A page token, received from a previous list response message. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters of the list request must match the + # request that returned the page token. + # @param filter [::String] + # Optional. Filter expression that matches a subset of resources to show. + # See https://google.aip.dev/160 for more details. + # Only supports filtering by: + # + # * `update_time`. Example: `update_time > "2012-04-21T11:30:00-04:00"`. + # @param order_by [::String] + # Optional. Ordering expression for sorting the results. + # See https://google.aip.dev/132#ordering for more details. + # If no value is present the default ordering is unspecified. + # Only supports ordering by: + # + # * `update_time` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CommerceProducer::V1beta::PrivateOffer>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CommerceProducer::V1beta::PrivateOffer>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/commerce_producer/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CommerceProducer::V1beta::ListPrivateOffersRequest.new + # + # # Call the list_private_offers method. + # result = client.list_private_offers request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::CommerceProducer::V1beta::PrivateOffer. + # p item + # end + # + def list_private_offers request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::ListPrivateOffersRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_private_offers.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_private_offers.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_private_offers.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @commerce_transaction_stub.list_private_offers request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @commerce_transaction_stub, :list_private_offers, "private_offers", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single PrivateOffer. + # + # @overload get_private_offer(request, options = nil) + # Pass arguments to `get_private_offer` via a request object, either of type + # {::Google::Cloud::CommerceProducer::V1beta::GetPrivateOfferRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CommerceProducer::V1beta::GetPrivateOfferRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_private_offer(name: nil, view: nil) + # Pass arguments to `get_private_offer` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource + # @param view [::Google::Cloud::CommerceProducer::V1beta::PrivateOfferView] + # Optional. The view of the PrivateOffer to return. + # If unspecified, the default view is BASIC. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/commerce_producer/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CommerceProducer::V1beta::GetPrivateOfferRequest.new + # + # # Call the get_private_offer method. + # result = client.get_private_offer request + # + # # The returned object is of type Google::Cloud::CommerceProducer::V1beta::PrivateOffer. + # p result + # + def get_private_offer request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::GetPrivateOfferRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_private_offer.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_private_offer.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_private_offer.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @commerce_transaction_stub.get_private_offer request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Resolves the existing offer that must be amended when creating a new + # PrivateOffer. Use this method to determine the correct amendment target + # before creating or publishing an offer. + # + # @overload resolve_amendment_target(request, options = nil) + # Pass arguments to `resolve_amendment_target` via a request object, either of type + # {::Google::Cloud::CommerceProducer::V1beta::ResolveAmendmentTargetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CommerceProducer::V1beta::ResolveAmendmentTargetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload resolve_amendment_target(parent: nil, target_billing_account: nil, base_standard_offer: nil) + # Pass arguments to `resolve_amendment_target` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent value for ResolveAmendmentTargetRequest + # @param target_billing_account [::String] + # Required. The customer's billing account targeted by the offer. This is the + # billing account for which the new private offer will be created on. Format: + # billingAccounts/\\{billing_account}. + # @param base_standard_offer [::String] + # Required. The base standard offer that the private offer will be based on. + # Format: + # projects/\\{project}/locations/\\{location}/services/\\{service}/standardOffers/\\{standard_offer}. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::CommerceProducer::V1beta::ResolveAmendmentTargetResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CommerceProducer::V1beta::ResolveAmendmentTargetResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/commerce_producer/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CommerceProducer::V1beta::ResolveAmendmentTargetRequest.new + # + # # Call the resolve_amendment_target method. + # result = client.resolve_amendment_target request + # + # # The returned object is of type Google::Cloud::CommerceProducer::V1beta::ResolveAmendmentTargetResponse. + # p result + # + def resolve_amendment_target request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::ResolveAmendmentTargetRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.resolve_amendment_target.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.resolve_amendment_target.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.resolve_amendment_target.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @commerce_transaction_stub.resolve_amendment_target request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a new PrivateOffer in a given project and location. + # + # @overload create_private_offer(request, options = nil) + # Pass arguments to `create_private_offer` via a request object, either of type + # {::Google::Cloud::CommerceProducer::V1beta::CreatePrivateOfferRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CommerceProducer::V1beta::CreatePrivateOfferRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_private_offer(parent: nil, private_offer: nil) + # Pass arguments to `create_private_offer` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Value for parent. + # @param private_offer [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer, ::Hash] + # Required. The resource being created + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/commerce_producer/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CommerceProducer::V1beta::CreatePrivateOfferRequest.new + # + # # Call the create_private_offer method. + # result = client.create_private_offer request + # + # # The returned object is of type Google::Cloud::CommerceProducer::V1beta::PrivateOffer. + # p result + # + def create_private_offer request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::CreatePrivateOfferRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_private_offer.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_private_offer.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_private_offer.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @commerce_transaction_stub.create_private_offer request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the target PrivateOffer. + # + # @overload update_private_offer(request, options = nil) + # Pass arguments to `update_private_offer` via a request object, either of type + # {::Google::Cloud::CommerceProducer::V1beta::UpdatePrivateOfferRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CommerceProducer::V1beta::UpdatePrivateOfferRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_private_offer(update_mask: nil, private_offer: nil) + # Pass arguments to `update_private_offer` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The list of fields to update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. + # The special value "*" means full replacement. + # If unspecified, all fields present in the request will be overwritten. + # @param private_offer [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer, ::Hash] + # Required. The resource being updated + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/commerce_producer/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CommerceProducer::V1beta::UpdatePrivateOfferRequest.new + # + # # Call the update_private_offer method. + # result = client.update_private_offer request + # + # # The returned object is of type Google::Cloud::CommerceProducer::V1beta::PrivateOffer. + # p result + # + def update_private_offer request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::UpdatePrivateOfferRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_private_offer.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_private_offer.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_private_offer.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @commerce_transaction_stub.update_private_offer request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Publishes the target PrivateOffer. + # + # @overload publish_private_offer(request, options = nil) + # Pass arguments to `publish_private_offer` via a request object, either of type + # {::Google::Cloud::CommerceProducer::V1beta::PublishPrivateOfferRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CommerceProducer::V1beta::PublishPrivateOfferRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload publish_private_offer(name: nil, validate_only: nil) + # Pass arguments to `publish_private_offer` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource + # @param validate_only [::Boolean] + # Optional. If set to `true`, validates the request but does not execute it. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/commerce_producer/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CommerceProducer::V1beta::PublishPrivateOfferRequest.new + # + # # Call the publish_private_offer method. + # result = client.publish_private_offer request + # + # # The returned object is of type Google::Cloud::CommerceProducer::V1beta::PrivateOffer. + # p result + # + def publish_private_offer request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::PublishPrivateOfferRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.publish_private_offer.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.publish_private_offer.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.publish_private_offer.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @commerce_transaction_stub.publish_private_offer request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Cancels the target PrivateOffer. + # + # @overload cancel_private_offer(request, options = nil) + # Pass arguments to `cancel_private_offer` via a request object, either of type + # {::Google::Cloud::CommerceProducer::V1beta::CancelPrivateOfferRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CommerceProducer::V1beta::CancelPrivateOfferRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload cancel_private_offer(name: nil, cancellation_note: nil) + # Pass arguments to `cancel_private_offer` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource + # @param cancellation_note [::String] + # Optional. Internal note relating to the cancellation. + # Stored on the cancelled offer. Not visible to customers. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/commerce_producer/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CommerceProducer::V1beta::CancelPrivateOfferRequest.new + # + # # Call the cancel_private_offer method. + # result = client.cancel_private_offer request + # + # # The returned object is of type Google::Cloud::CommerceProducer::V1beta::PrivateOffer. + # p result + # + def cancel_private_offer request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::CancelPrivateOfferRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.cancel_private_offer.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.cancel_private_offer.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.cancel_private_offer.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @commerce_transaction_stub.cancel_private_offer request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes the target PrivateOffer. + # + # @overload delete_private_offer(request, options = nil) + # Pass arguments to `delete_private_offer` via a request object, either of type + # {::Google::Cloud::CommerceProducer::V1beta::DeletePrivateOfferRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CommerceProducer::V1beta::DeletePrivateOfferRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_private_offer(name: nil, force: nil) + # Pass arguments to `delete_private_offer` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource + # @param force [::Boolean] + # Optional. Indicates whether to cascade the delete to child resources. + # If false, the request fails if child resources exist. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/commerce_producer/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CommerceProducer::V1beta::DeletePrivateOfferRequest.new + # + # # Call the delete_private_offer method. + # result = client.delete_private_offer request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_private_offer request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::DeletePrivateOfferRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_private_offer.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_private_offer.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_private_offer.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @commerce_transaction_stub.delete_private_offer request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists PrivateOfferDocuments for the given parent. + # + # @overload list_private_offer_documents(request, options = nil) + # Pass arguments to `list_private_offer_documents` via a request object, either of type + # {::Google::Cloud::CommerceProducer::V1beta::ListPrivateOfferDocumentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CommerceProducer::V1beta::ListPrivateOfferDocumentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_private_offer_documents(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_private_offer_documents` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent value for ListPrivateOfferDocumentsRequest. + # @param page_size [::Integer] + # Optional. Maximum results to return. The service may return fewer than this + # value. The maximum value is 500; values above 500 will be coerced to 500. + # If unspecified, the server will default to the maximum. + # @param page_token [::String] + # Optional. A page token, received from a previous list response message. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters of the list request must match the + # request that returned the page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/commerce_producer/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CommerceProducer::V1beta::ListPrivateOfferDocumentsRequest.new + # + # # Call the list_private_offer_documents method. + # result = client.list_private_offer_documents request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument. + # p item + # end + # + def list_private_offer_documents request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::ListPrivateOfferDocumentsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_private_offer_documents.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_private_offer_documents.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_private_offer_documents.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @commerce_transaction_stub.list_private_offer_documents request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @commerce_transaction_stub, :list_private_offer_documents, "private_offer_documents", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single PrivateOfferDocument. + # + # @overload get_private_offer_document(request, options = nil) + # Pass arguments to `get_private_offer_document` via a request object, either of type + # {::Google::Cloud::CommerceProducer::V1beta::GetPrivateOfferDocumentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CommerceProducer::V1beta::GetPrivateOfferDocumentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_private_offer_document(name: nil) + # Pass arguments to `get_private_offer_document` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/commerce_producer/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CommerceProducer::V1beta::GetPrivateOfferDocumentRequest.new + # + # # Call the get_private_offer_document method. + # result = client.get_private_offer_document request + # + # # The returned object is of type Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument. + # p result + # + def get_private_offer_document request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::GetPrivateOfferDocumentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_private_offer_document.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_private_offer_document.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_private_offer_document.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @commerce_transaction_stub.get_private_offer_document request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a new PrivateOfferDocument in a given project and location. + # + # @overload create_private_offer_document(request, options = nil) + # Pass arguments to `create_private_offer_document` via a request object, either of type + # {::Google::Cloud::CommerceProducer::V1beta::CreatePrivateOfferDocumentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CommerceProducer::V1beta::CreatePrivateOfferDocumentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_private_offer_document(parent: nil, private_offer_document: nil) + # Pass arguments to `create_private_offer_document` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Value for parent. + # @param private_offer_document [::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument, ::Hash] + # Required. The resource being created. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/commerce_producer/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CommerceProducer::V1beta::CreatePrivateOfferDocumentRequest.new + # + # # Call the create_private_offer_document method. + # result = client.create_private_offer_document request + # + # # The returned object is of type Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument. + # p result + # + def create_private_offer_document request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::CreatePrivateOfferDocumentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_private_offer_document.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_private_offer_document.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_private_offer_document.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @commerce_transaction_stub.create_private_offer_document request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates the target PrivateOfferDocument. + # + # @overload update_private_offer_document(request, options = nil) + # Pass arguments to `update_private_offer_document` via a request object, either of type + # {::Google::Cloud::CommerceProducer::V1beta::UpdatePrivateOfferDocumentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CommerceProducer::V1beta::UpdatePrivateOfferDocumentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_private_offer_document(private_offer_document: nil, update_mask: nil) + # Pass arguments to `update_private_offer_document` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param private_offer_document [::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument, ::Hash] + # Required. The resource being updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The list of fields to update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. + # The special value "*" means full replacement. + # If unspecified, all fields present in the request will be overwritten. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/commerce_producer/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CommerceProducer::V1beta::UpdatePrivateOfferDocumentRequest.new + # + # # Call the update_private_offer_document method. + # result = client.update_private_offer_document request + # + # # The returned object is of type Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument. + # p result + # + def update_private_offer_document request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::UpdatePrivateOfferDocumentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_private_offer_document.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_private_offer_document.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_private_offer_document.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @commerce_transaction_stub.update_private_offer_document request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes the target PrivateOfferDocument. + # + # @overload delete_private_offer_document(request, options = nil) + # Pass arguments to `delete_private_offer_document` via a request object, either of type + # {::Google::Cloud::CommerceProducer::V1beta::DeletePrivateOfferDocumentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CommerceProducer::V1beta::DeletePrivateOfferDocumentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_private_offer_document(name: nil) + # Pass arguments to `delete_private_offer_document` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/commerce_producer/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CommerceProducer::V1beta::DeletePrivateOfferDocumentRequest.new + # + # # Call the delete_private_offer_document method. + # result = client.delete_private_offer_document request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_private_offer_document request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::DeletePrivateOfferDocumentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_private_offer_document.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_private_offer_document.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_private_offer_document.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @commerce_transaction_stub.delete_private_offer_document request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists StandardOffers for the given parent. + # + # @overload list_standard_offers(request, options = nil) + # Pass arguments to `list_standard_offers` via a request object, either of type + # {::Google::Cloud::CommerceProducer::V1beta::ListStandardOffersRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CommerceProducer::V1beta::ListStandardOffersRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_standard_offers(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_standard_offers` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent value for ListStandardOffersRequest + # @param page_size [::Integer] + # Optional. Maximum results to return. The service may return fewer than this + # value. The maximum value is 500; values above 500 will be coerced to 500. + # If unspecified, the server will default to the maximum. + # @param page_token [::String] + # Optional. A page token, received from a previous list response message. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters of the list request must match the + # request that returned the page token. + # @param filter [::String] + # Optional. Filter expression that matches a subset of resources to show. + # See https://google.aip.dev/160 for more details. + # Supports filtering by: + # + # * `effective_time`. + # Example: `effective_time > "2012-04-21T11:30:00-04:00"`. + # * `expire_time`. Example: `expire_time < "2026-05-06T00:00:00Z"`. + # @param order_by [::String] + # Optional. Ordering expression for sorting the results. + # See https://google.aip.dev/132#ordering for more details. + # If no value is present the default ordering is unspecified. + # Supports ordering by: + # + # * `effective_time` + # * `expire_time` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CommerceProducer::V1beta::StandardOffer>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CommerceProducer::V1beta::StandardOffer>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/commerce_producer/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CommerceProducer::V1beta::ListStandardOffersRequest.new + # + # # Call the list_standard_offers method. + # result = client.list_standard_offers request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::CommerceProducer::V1beta::StandardOffer. + # p item + # end + # + def list_standard_offers request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::ListStandardOffersRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_standard_offers.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_standard_offers.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_standard_offers.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @commerce_transaction_stub.list_standard_offers request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @commerce_transaction_stub, :list_standard_offers, "standard_offers", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single StandardOffer. + # + # @overload get_standard_offer(request, options = nil) + # Pass arguments to `get_standard_offer` via a request object, either of type + # {::Google::Cloud::CommerceProducer::V1beta::GetStandardOfferRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CommerceProducer::V1beta::GetStandardOfferRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_standard_offer(name: nil, view: nil) + # Pass arguments to `get_standard_offer` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource + # @param view [::Google::Cloud::CommerceProducer::V1beta::StandardOfferView] + # Optional. The view of the StandardOffer to return. + # If unspecified, the default view is BASIC. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::CommerceProducer::V1beta::StandardOffer] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CommerceProducer::V1beta::StandardOffer] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/commerce_producer/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CommerceProducer::V1beta::GetStandardOfferRequest.new + # + # # Call the get_standard_offer method. + # result = client.get_standard_offer request + # + # # The returned object is of type Google::Cloud::CommerceProducer::V1beta::StandardOffer. + # p result + # + def get_standard_offer request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::GetStandardOfferRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_standard_offer.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_standard_offer.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_standard_offer.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @commerce_transaction_stub.get_standard_offer request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single Sku. + # + # @overload get_sku(request, options = nil) + # Pass arguments to `get_sku` via a request object, either of type + # {::Google::Cloud::CommerceProducer::V1beta::GetSkuRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CommerceProducer::V1beta::GetSkuRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_sku(name: nil) + # Pass arguments to `get_sku` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::CommerceProducer::V1beta::Sku] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CommerceProducer::V1beta::Sku] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/commerce_producer/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CommerceProducer::V1beta::GetSkuRequest.new + # + # # Call the get_sku method. + # result = client.get_sku request + # + # # The returned object is of type Google::Cloud::CommerceProducer::V1beta::Sku. + # p result + # + def get_sku request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::GetSkuRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_sku.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_sku.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_sku.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @commerce_transaction_stub.get_sku request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists Skus for the given parent. + # + # @overload list_skus(request, options = nil) + # Pass arguments to `list_skus` via a request object, either of type + # {::Google::Cloud::CommerceProducer::V1beta::ListSkusRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CommerceProducer::V1beta::ListSkusRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_skus(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_skus` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent value for ListSkusRequest + # @param page_size [::Integer] + # Optional. Maximum results to return. The service may return fewer than this + # value. The maximum value is 500; values above 500 will be coerced to 500. + # If unspecified, the server will default to the maximum. + # @param page_token [::String] + # Optional. A page token, received from a previous list response message. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters of the list request must match the + # request that returned the page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CommerceProducer::V1beta::Sku>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CommerceProducer::V1beta::Sku>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/commerce_producer/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CommerceProducer::V1beta::ListSkusRequest.new + # + # # Call the list_skus method. + # result = client.list_skus request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::CommerceProducer::V1beta::Sku. + # p item + # end + # + def list_skus request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::ListSkusRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_skus.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_skus.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_skus.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @commerce_transaction_stub.list_skus request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @commerce_transaction_stub, :list_skus, "skus", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single SkuGroup. + # + # @overload get_sku_group(request, options = nil) + # Pass arguments to `get_sku_group` via a request object, either of type + # {::Google::Cloud::CommerceProducer::V1beta::GetSkuGroupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CommerceProducer::V1beta::GetSkuGroupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_sku_group(name: nil) + # Pass arguments to `get_sku_group` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::CommerceProducer::V1beta::SkuGroup] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CommerceProducer::V1beta::SkuGroup] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/commerce_producer/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CommerceProducer::V1beta::GetSkuGroupRequest.new + # + # # Call the get_sku_group method. + # result = client.get_sku_group request + # + # # The returned object is of type Google::Cloud::CommerceProducer::V1beta::SkuGroup. + # p result + # + def get_sku_group request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::GetSkuGroupRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_sku_group.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_sku_group.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_sku_group.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @commerce_transaction_stub.get_sku_group request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists SkuGroups for the given parent. + # + # @overload list_sku_groups(request, options = nil) + # Pass arguments to `list_sku_groups` via a request object, either of type + # {::Google::Cloud::CommerceProducer::V1beta::ListSkuGroupsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::CommerceProducer::V1beta::ListSkuGroupsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_sku_groups(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_sku_groups` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Parent value for ListSkuGroupsRequest + # @param page_size [::Integer] + # Optional. Maximum results to return. The service may return fewer than this + # value. The maximum value is 500; values above 500 will be coerced to 500. + # If unspecified, the server will default to the maximum. + # @param page_token [::String] + # Optional. A page token, received from a previous list response message. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters of the list request must match the + # request that returned the page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CommerceProducer::V1beta::SkuGroup>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CommerceProducer::V1beta::SkuGroup>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/commerce_producer/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::CommerceProducer::V1beta::ListSkuGroupsRequest.new + # + # # Call the list_sku_groups method. + # result = client.list_sku_groups request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::CommerceProducer::V1beta::SkuGroup. + # p item + # end + # + def list_sku_groups request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::ListSkuGroupsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_sku_groups.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_sku_groups.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_sku_groups.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @commerce_transaction_stub.list_sku_groups request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @commerce_transaction_stub, :list_sku_groups, "sku_groups", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the CommerceTransaction REST API. + # + # This class represents the configuration for CommerceTransaction REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_services to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_services.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_services.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "commerceproducer.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + # Overrides for http bindings for the RPCs of this service + # are only used when this service is used as mixin, and only + # by the host service. + # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] + config_attr :bindings_override, {}, ::Hash, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the CommerceTransaction API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_services` + # @return [::Gapic::Config::Method] + # + attr_reader :list_services + ## + # RPC-specific configuration for `get_service` + # @return [::Gapic::Config::Method] + # + attr_reader :get_service + ## + # RPC-specific configuration for `list_private_offers` + # @return [::Gapic::Config::Method] + # + attr_reader :list_private_offers + ## + # RPC-specific configuration for `get_private_offer` + # @return [::Gapic::Config::Method] + # + attr_reader :get_private_offer + ## + # RPC-specific configuration for `resolve_amendment_target` + # @return [::Gapic::Config::Method] + # + attr_reader :resolve_amendment_target + ## + # RPC-specific configuration for `create_private_offer` + # @return [::Gapic::Config::Method] + # + attr_reader :create_private_offer + ## + # RPC-specific configuration for `update_private_offer` + # @return [::Gapic::Config::Method] + # + attr_reader :update_private_offer + ## + # RPC-specific configuration for `publish_private_offer` + # @return [::Gapic::Config::Method] + # + attr_reader :publish_private_offer + ## + # RPC-specific configuration for `cancel_private_offer` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_private_offer + ## + # RPC-specific configuration for `delete_private_offer` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_private_offer + ## + # RPC-specific configuration for `list_private_offer_documents` + # @return [::Gapic::Config::Method] + # + attr_reader :list_private_offer_documents + ## + # RPC-specific configuration for `get_private_offer_document` + # @return [::Gapic::Config::Method] + # + attr_reader :get_private_offer_document + ## + # RPC-specific configuration for `create_private_offer_document` + # @return [::Gapic::Config::Method] + # + attr_reader :create_private_offer_document + ## + # RPC-specific configuration for `update_private_offer_document` + # @return [::Gapic::Config::Method] + # + attr_reader :update_private_offer_document + ## + # RPC-specific configuration for `delete_private_offer_document` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_private_offer_document + ## + # RPC-specific configuration for `list_standard_offers` + # @return [::Gapic::Config::Method] + # + attr_reader :list_standard_offers + ## + # RPC-specific configuration for `get_standard_offer` + # @return [::Gapic::Config::Method] + # + attr_reader :get_standard_offer + ## + # RPC-specific configuration for `get_sku` + # @return [::Gapic::Config::Method] + # + attr_reader :get_sku + ## + # RPC-specific configuration for `list_skus` + # @return [::Gapic::Config::Method] + # + attr_reader :list_skus + ## + # RPC-specific configuration for `get_sku_group` + # @return [::Gapic::Config::Method] + # + attr_reader :get_sku_group + ## + # RPC-specific configuration for `list_sku_groups` + # @return [::Gapic::Config::Method] + # + attr_reader :list_sku_groups + + # @private + def initialize parent_rpcs = nil + list_services_config = parent_rpcs.list_services if parent_rpcs.respond_to? :list_services + @list_services = ::Gapic::Config::Method.new list_services_config + get_service_config = parent_rpcs.get_service if parent_rpcs.respond_to? :get_service + @get_service = ::Gapic::Config::Method.new get_service_config + list_private_offers_config = parent_rpcs.list_private_offers if parent_rpcs.respond_to? :list_private_offers + @list_private_offers = ::Gapic::Config::Method.new list_private_offers_config + get_private_offer_config = parent_rpcs.get_private_offer if parent_rpcs.respond_to? :get_private_offer + @get_private_offer = ::Gapic::Config::Method.new get_private_offer_config + resolve_amendment_target_config = parent_rpcs.resolve_amendment_target if parent_rpcs.respond_to? :resolve_amendment_target + @resolve_amendment_target = ::Gapic::Config::Method.new resolve_amendment_target_config + create_private_offer_config = parent_rpcs.create_private_offer if parent_rpcs.respond_to? :create_private_offer + @create_private_offer = ::Gapic::Config::Method.new create_private_offer_config + update_private_offer_config = parent_rpcs.update_private_offer if parent_rpcs.respond_to? :update_private_offer + @update_private_offer = ::Gapic::Config::Method.new update_private_offer_config + publish_private_offer_config = parent_rpcs.publish_private_offer if parent_rpcs.respond_to? :publish_private_offer + @publish_private_offer = ::Gapic::Config::Method.new publish_private_offer_config + cancel_private_offer_config = parent_rpcs.cancel_private_offer if parent_rpcs.respond_to? :cancel_private_offer + @cancel_private_offer = ::Gapic::Config::Method.new cancel_private_offer_config + delete_private_offer_config = parent_rpcs.delete_private_offer if parent_rpcs.respond_to? :delete_private_offer + @delete_private_offer = ::Gapic::Config::Method.new delete_private_offer_config + list_private_offer_documents_config = parent_rpcs.list_private_offer_documents if parent_rpcs.respond_to? :list_private_offer_documents + @list_private_offer_documents = ::Gapic::Config::Method.new list_private_offer_documents_config + get_private_offer_document_config = parent_rpcs.get_private_offer_document if parent_rpcs.respond_to? :get_private_offer_document + @get_private_offer_document = ::Gapic::Config::Method.new get_private_offer_document_config + create_private_offer_document_config = parent_rpcs.create_private_offer_document if parent_rpcs.respond_to? :create_private_offer_document + @create_private_offer_document = ::Gapic::Config::Method.new create_private_offer_document_config + update_private_offer_document_config = parent_rpcs.update_private_offer_document if parent_rpcs.respond_to? :update_private_offer_document + @update_private_offer_document = ::Gapic::Config::Method.new update_private_offer_document_config + delete_private_offer_document_config = parent_rpcs.delete_private_offer_document if parent_rpcs.respond_to? :delete_private_offer_document + @delete_private_offer_document = ::Gapic::Config::Method.new delete_private_offer_document_config + list_standard_offers_config = parent_rpcs.list_standard_offers if parent_rpcs.respond_to? :list_standard_offers + @list_standard_offers = ::Gapic::Config::Method.new list_standard_offers_config + get_standard_offer_config = parent_rpcs.get_standard_offer if parent_rpcs.respond_to? :get_standard_offer + @get_standard_offer = ::Gapic::Config::Method.new get_standard_offer_config + get_sku_config = parent_rpcs.get_sku if parent_rpcs.respond_to? :get_sku + @get_sku = ::Gapic::Config::Method.new get_sku_config + list_skus_config = parent_rpcs.list_skus if parent_rpcs.respond_to? :list_skus + @list_skus = ::Gapic::Config::Method.new list_skus_config + get_sku_group_config = parent_rpcs.get_sku_group if parent_rpcs.respond_to? :get_sku_group + @get_sku_group = ::Gapic::Config::Method.new get_sku_group_config + list_sku_groups_config = parent_rpcs.list_sku_groups if parent_rpcs.respond_to? :list_sku_groups + @list_sku_groups = ::Gapic::Config::Method.new list_sku_groups_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerce_producer/v1beta/commerce_transaction/rest/service_stub.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerce_producer/v1beta/commerce_transaction/rest/service_stub.rb new file mode 100644 index 000000000000..d850964552c8 --- /dev/null +++ b/owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerce_producer/v1beta/commerce_transaction/rest/service_stub.rb @@ -0,0 +1,1368 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/commerceproducer/v1beta/commerce_transaction_pb" + +module Google + module Cloud + module CommerceProducer + module V1beta + module CommerceTransaction + module Rest + ## + # REST service stub for the CommerceTransaction service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the list_services REST call + # + # @param request_pb [::Google::Cloud::CommerceProducer::V1beta::ListServicesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::CommerceProducer::V1beta::ListServicesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CommerceProducer::V1beta::ListServicesResponse] + # A result object deserialized from the server's reply + def list_services request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_services_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_services", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::CommerceProducer::V1beta::ListServicesResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_service REST call + # + # @param request_pb [::Google::Cloud::CommerceProducer::V1beta::GetServiceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::CommerceProducer::V1beta::Service] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CommerceProducer::V1beta::Service] + # A result object deserialized from the server's reply + def get_service request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_service_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_service", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::CommerceProducer::V1beta::Service.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_private_offers REST call + # + # @param request_pb [::Google::Cloud::CommerceProducer::V1beta::ListPrivateOffersRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::CommerceProducer::V1beta::ListPrivateOffersResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CommerceProducer::V1beta::ListPrivateOffersResponse] + # A result object deserialized from the server's reply + def list_private_offers request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_private_offers_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_private_offers", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::CommerceProducer::V1beta::ListPrivateOffersResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_private_offer REST call + # + # @param request_pb [::Google::Cloud::CommerceProducer::V1beta::GetPrivateOfferRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer] + # A result object deserialized from the server's reply + def get_private_offer request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_private_offer_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_private_offer", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::CommerceProducer::V1beta::PrivateOffer.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the resolve_amendment_target REST call + # + # @param request_pb [::Google::Cloud::CommerceProducer::V1beta::ResolveAmendmentTargetRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::CommerceProducer::V1beta::ResolveAmendmentTargetResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CommerceProducer::V1beta::ResolveAmendmentTargetResponse] + # A result object deserialized from the server's reply + def resolve_amendment_target request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_resolve_amendment_target_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "resolve_amendment_target", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::CommerceProducer::V1beta::ResolveAmendmentTargetResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_private_offer REST call + # + # @param request_pb [::Google::Cloud::CommerceProducer::V1beta::CreatePrivateOfferRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer] + # A result object deserialized from the server's reply + def create_private_offer request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_private_offer_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_private_offer", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::CommerceProducer::V1beta::PrivateOffer.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_private_offer REST call + # + # @param request_pb [::Google::Cloud::CommerceProducer::V1beta::UpdatePrivateOfferRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer] + # A result object deserialized from the server's reply + def update_private_offer request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_private_offer_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_private_offer", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::CommerceProducer::V1beta::PrivateOffer.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the publish_private_offer REST call + # + # @param request_pb [::Google::Cloud::CommerceProducer::V1beta::PublishPrivateOfferRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer] + # A result object deserialized from the server's reply + def publish_private_offer request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_publish_private_offer_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "publish_private_offer", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::CommerceProducer::V1beta::PrivateOffer.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the cancel_private_offer REST call + # + # @param request_pb [::Google::Cloud::CommerceProducer::V1beta::CancelPrivateOfferRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer] + # A result object deserialized from the server's reply + def cancel_private_offer request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_cancel_private_offer_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "cancel_private_offer", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::CommerceProducer::V1beta::PrivateOffer.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_private_offer REST call + # + # @param request_pb [::Google::Cloud::CommerceProducer::V1beta::DeletePrivateOfferRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_private_offer request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_private_offer_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_private_offer", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_private_offer_documents REST call + # + # @param request_pb [::Google::Cloud::CommerceProducer::V1beta::ListPrivateOfferDocumentsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::CommerceProducer::V1beta::ListPrivateOfferDocumentsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CommerceProducer::V1beta::ListPrivateOfferDocumentsResponse] + # A result object deserialized from the server's reply + def list_private_offer_documents request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_private_offer_documents_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_private_offer_documents", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::CommerceProducer::V1beta::ListPrivateOfferDocumentsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_private_offer_document REST call + # + # @param request_pb [::Google::Cloud::CommerceProducer::V1beta::GetPrivateOfferDocumentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument] + # A result object deserialized from the server's reply + def get_private_offer_document request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_private_offer_document_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_private_offer_document", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_private_offer_document REST call + # + # @param request_pb [::Google::Cloud::CommerceProducer::V1beta::CreatePrivateOfferDocumentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument] + # A result object deserialized from the server's reply + def create_private_offer_document request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_private_offer_document_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_private_offer_document", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_private_offer_document REST call + # + # @param request_pb [::Google::Cloud::CommerceProducer::V1beta::UpdatePrivateOfferDocumentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument] + # A result object deserialized from the server's reply + def update_private_offer_document request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_private_offer_document_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_private_offer_document", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_private_offer_document REST call + # + # @param request_pb [::Google::Cloud::CommerceProducer::V1beta::DeletePrivateOfferDocumentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_private_offer_document request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_private_offer_document_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_private_offer_document", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_standard_offers REST call + # + # @param request_pb [::Google::Cloud::CommerceProducer::V1beta::ListStandardOffersRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::CommerceProducer::V1beta::ListStandardOffersResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CommerceProducer::V1beta::ListStandardOffersResponse] + # A result object deserialized from the server's reply + def list_standard_offers request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_standard_offers_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_standard_offers", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::CommerceProducer::V1beta::ListStandardOffersResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_standard_offer REST call + # + # @param request_pb [::Google::Cloud::CommerceProducer::V1beta::GetStandardOfferRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::CommerceProducer::V1beta::StandardOffer] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CommerceProducer::V1beta::StandardOffer] + # A result object deserialized from the server's reply + def get_standard_offer request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_standard_offer_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_standard_offer", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::CommerceProducer::V1beta::StandardOffer.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_sku REST call + # + # @param request_pb [::Google::Cloud::CommerceProducer::V1beta::GetSkuRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::CommerceProducer::V1beta::Sku] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CommerceProducer::V1beta::Sku] + # A result object deserialized from the server's reply + def get_sku request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_sku_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_sku", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::CommerceProducer::V1beta::Sku.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_skus REST call + # + # @param request_pb [::Google::Cloud::CommerceProducer::V1beta::ListSkusRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::CommerceProducer::V1beta::ListSkusResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CommerceProducer::V1beta::ListSkusResponse] + # A result object deserialized from the server's reply + def list_skus request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_skus_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_skus", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::CommerceProducer::V1beta::ListSkusResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_sku_group REST call + # + # @param request_pb [::Google::Cloud::CommerceProducer::V1beta::GetSkuGroupRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::CommerceProducer::V1beta::SkuGroup] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CommerceProducer::V1beta::SkuGroup] + # A result object deserialized from the server's reply + def get_sku_group request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_sku_group_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_sku_group", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::CommerceProducer::V1beta::SkuGroup.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_sku_groups REST call + # + # @param request_pb [::Google::Cloud::CommerceProducer::V1beta::ListSkuGroupsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::CommerceProducer::V1beta::ListSkuGroupsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::CommerceProducer::V1beta::ListSkuGroupsResponse] + # A result object deserialized from the server's reply + def list_sku_groups request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_sku_groups_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_sku_groups", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::CommerceProducer::V1beta::ListSkuGroupsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_services REST call + # + # @param request_pb [::Google::Cloud::CommerceProducer::V1beta::ListServicesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_services_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{parent}/services", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_service REST call + # + # @param request_pb [::Google::Cloud::CommerceProducer::V1beta::GetServiceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_service_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/services/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_private_offers REST call + # + # @param request_pb [::Google::Cloud::CommerceProducer::V1beta::ListPrivateOffersRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_private_offers_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{parent}/privateOffers", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_private_offer REST call + # + # @param request_pb [::Google::Cloud::CommerceProducer::V1beta::GetPrivateOfferRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_private_offer_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/privateOffers/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the resolve_amendment_target REST call + # + # @param request_pb [::Google::Cloud::CommerceProducer::V1beta::ResolveAmendmentTargetRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_resolve_amendment_target_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{parent}/privateOffers:resolveAmendmentTarget", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_private_offer REST call + # + # @param request_pb [::Google::Cloud::CommerceProducer::V1beta::CreatePrivateOfferRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_private_offer_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta/{parent}/privateOffers", + body: "private_offer", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_private_offer REST call + # + # @param request_pb [::Google::Cloud::CommerceProducer::V1beta::UpdatePrivateOfferRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_private_offer_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1beta/{private_offer.name}", + body: "private_offer", + matches: [ + ["private_offer.name", %r{^projects/[^/]+/locations/[^/]+/privateOffers/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the publish_private_offer REST call + # + # @param request_pb [::Google::Cloud::CommerceProducer::V1beta::PublishPrivateOfferRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_publish_private_offer_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta/{name}:publish", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/privateOffers/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_private_offer REST call + # + # @param request_pb [::Google::Cloud::CommerceProducer::V1beta::CancelPrivateOfferRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_cancel_private_offer_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/privateOffers/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_private_offer REST call + # + # @param request_pb [::Google::Cloud::CommerceProducer::V1beta::DeletePrivateOfferRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_private_offer_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1beta/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/privateOffers/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_private_offer_documents REST call + # + # @param request_pb [::Google::Cloud::CommerceProducer::V1beta::ListPrivateOfferDocumentsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_private_offer_documents_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{parent}/documents", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/privateOffers/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_private_offer_document REST call + # + # @param request_pb [::Google::Cloud::CommerceProducer::V1beta::GetPrivateOfferDocumentRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_private_offer_document_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/privateOffers/[^/]+/documents/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_private_offer_document REST call + # + # @param request_pb [::Google::Cloud::CommerceProducer::V1beta::CreatePrivateOfferDocumentRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_private_offer_document_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta/{parent}/documents", + body: "private_offer_document", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/privateOffers/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_private_offer_document REST call + # + # @param request_pb [::Google::Cloud::CommerceProducer::V1beta::UpdatePrivateOfferDocumentRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_private_offer_document_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1beta/{private_offer_document.name}", + body: "private_offer_document", + matches: [ + ["private_offer_document.name", %r{^projects/[^/]+/locations/[^/]+/privateOffers/[^/]+/documents/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_private_offer_document REST call + # + # @param request_pb [::Google::Cloud::CommerceProducer::V1beta::DeletePrivateOfferDocumentRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_private_offer_document_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1beta/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/privateOffers/[^/]+/documents/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_standard_offers REST call + # + # @param request_pb [::Google::Cloud::CommerceProducer::V1beta::ListStandardOffersRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_standard_offers_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{parent}/standardOffers", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/services/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_standard_offer REST call + # + # @param request_pb [::Google::Cloud::CommerceProducer::V1beta::GetStandardOfferRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_standard_offer_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/services/[^/]+/standardOffers/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_sku REST call + # + # @param request_pb [::Google::Cloud::CommerceProducer::V1beta::GetSkuRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_sku_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/services/[^/]+/skus/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_skus REST call + # + # @param request_pb [::Google::Cloud::CommerceProducer::V1beta::ListSkusRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_skus_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{parent}/skus", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/services/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_sku_group REST call + # + # @param request_pb [::Google::Cloud::CommerceProducer::V1beta::GetSkuGroupRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_sku_group_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/skuGroups/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_sku_groups REST call + # + # @param request_pb [::Google::Cloud::CommerceProducer::V1beta::ListSkuGroupsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_sku_groups_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{parent}/skuGroups", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerce_producer/v1beta/rest.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerce_producer/v1beta/rest.rb new file mode 100644 index 000000000000..affebcd5fdf8 --- /dev/null +++ b/owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerce_producer/v1beta/rest.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/commerce_producer/v1beta/commerce_transaction/rest" +require "google/cloud/commerce_producer/v1beta/bindings_override" +require "google/cloud/commerce_producer/v1beta/version" + +module Google + module Cloud + module CommerceProducer + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/commerce_producer/v1beta/rest" + # client = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new + # + module V1beta + end + end + end +end diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerce_producer/v1beta/version.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerce_producer/v1beta/version.rb new file mode 100644 index 000000000000..b2ade675bab2 --- /dev/null +++ b/owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerce_producer/v1beta/version.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module CommerceProducer + module V1beta + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerceproducer/v1beta/commerce_transaction_pb.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerceproducer/v1beta/commerce_transaction_pb.rb new file mode 100644 index 000000000000..b136e06e7a33 --- /dev/null +++ b/owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerceproducer/v1beta/commerce_transaction_pb.rb @@ -0,0 +1,64 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/commerceproducer/v1beta/commerce_transaction.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/commerceproducer/v1beta/private_offer_pb' +require 'google/cloud/commerceproducer/v1beta/service_pb' +require 'google/cloud/commerceproducer/v1beta/sku_pb' +require 'google/cloud/commerceproducer/v1beta/sku_group_pb' +require 'google/cloud/commerceproducer/v1beta/standard_offer_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' + + +descriptor_data = "\n?google/cloud/commerceproducer/v1beta/commerce_transaction.proto\x12$google.cloud.commerceproducer.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x38google/cloud/commerceproducer/v1beta/private_offer.proto\x1a\x32google/cloud/commerceproducer/v1beta/service.proto\x1a.google/cloud/commerceproducer/v1beta/sku.proto\x1a\x34google/cloud/commerceproducer/v1beta/sku_group.proto\x1a\x39google/cloud/commerceproducer/v1beta/standard_offer.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"\xbd\x01\n\x18ListPrivateOffersRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\x12,commerceproducer.googleapis.com/PrivateOffer\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x80\x01\n\x19ListPrivateOffersResponse\x12J\n\x0eprivate_offers\x18\x01 \x03(\x0b\x32\x32.google.cloud.commerceproducer.v1beta.PrivateOffer\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xa7\x01\n\x16GetPrivateOfferRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,commerceproducer.googleapis.com/PrivateOffer\x12I\n\x04view\x18\x02 \x01(\x0e\x32\x36.google.cloud.commerceproducer.v1beta.PrivateOfferViewB\x03\xe0\x41\x01\"\x8d\x02\n\x1dResolveAmendmentTargetRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\x12,commerceproducer.googleapis.com/PrivateOffer\x12R\n\x16target_billing_account\x18\x02 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*cloudbilling.googleapis.com/BillingAccount\x12R\n\x13\x62\x61se_standard_offer\x18\x03 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-commerceproducer.googleapis.com/StandardOffer\"\xb2\x03\n\x1eResolveAmendmentTargetResponse\x12S\n\x16required_private_offer\x18\x01 \x01(\tB1\xfa\x41.\n,commerceproducer.googleapis.com/PrivateOfferH\x00\x12U\n\x17required_standard_offer\x18\x02 \x01(\tB2\xfa\x41/\n-commerceproducer.googleapis.com/StandardOfferH\x00\x12n\n\x0foptional_offers\x18\x03 \x01(\x0b\x32S.google.cloud.commerceproducer.v1beta.ResolveAmendmentTargetResponse.OptionalOffersH\x00\x1a[\n\x0eOptionalOffers\x12I\n\x0eprivate_offers\x18\x01 \x03(\tB1\xfa\x41.\n,commerceproducer.googleapis.com/PrivateOfferB\x17\n\x15\x61mendment_requirement\"\xb1\x01\n\x19\x43reatePrivateOfferRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\x12,commerceproducer.googleapis.com/PrivateOffer\x12N\n\rprivate_offer\x18\x03 \x01(\x0b\x32\x32.google.cloud.commerceproducer.v1beta.PrivateOfferB\x03\xe0\x41\x02\"\xa1\x01\n\x19UpdatePrivateOfferRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12N\n\rprivate_offer\x18\x02 \x01(\x0b\x32\x32.google.cloud.commerceproducer.v1beta.PrivateOfferB\x03\xe0\x41\x02\"|\n\x1aPublishPrivateOfferRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,commerceproducer.googleapis.com/PrivateOffer\x12\x1a\n\rvalidate_only\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"\x7f\n\x19\x43\x61ncelPrivateOfferRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,commerceproducer.googleapis.com/PrivateOffer\x12\x1e\n\x11\x63\x61ncellation_note\x18\x02 \x01(\tB\x03\xe0\x41\x01\"s\n\x19\x44\x65letePrivateOfferRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,commerceproducer.googleapis.com/PrivateOffer\x12\x12\n\x05\x66orce\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"\xa1\x01\n ListPrivateOfferDocumentsRequest\x12L\n\x06parent\x18\x01 \x01(\tB<\xe0\x41\x02\xfa\x41\x36\x12\x34\x63ommerceproducer.googleapis.com/PrivateOfferDocument\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x99\x01\n!ListPrivateOfferDocumentsResponse\x12[\n\x17private_offer_documents\x18\x01 \x03(\x0b\x32:.google.cloud.commerceproducer.v1beta.PrivateOfferDocument\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"l\n\x1eGetPrivateOfferDocumentRequest\x12J\n\x04name\x18\x01 \x01(\tB<\xe0\x41\x02\xfa\x41\x36\n4commerceproducer.googleapis.com/PrivateOfferDocument\"\xd2\x01\n!CreatePrivateOfferDocumentRequest\x12L\n\x06parent\x18\x01 \x01(\tB<\xe0\x41\x02\xfa\x41\x36\x12\x34\x63ommerceproducer.googleapis.com/PrivateOfferDocument\x12_\n\x16private_offer_document\x18\x03 \x01(\x0b\x32:.google.cloud.commerceproducer.v1beta.PrivateOfferDocumentB\x03\xe0\x41\x02\"\xba\x01\n!UpdatePrivateOfferDocumentRequest\x12_\n\x16private_offer_document\x18\x01 \x01(\x0b\x32:.google.cloud.commerceproducer.v1beta.PrivateOfferDocumentB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"o\n!DeletePrivateOfferDocumentRequest\x12J\n\x04name\x18\x01 \x01(\tB<\xe0\x41\x02\xfa\x41\x36\n4commerceproducer.googleapis.com/PrivateOfferDocument\"\x87\x01\n\x13ListServicesRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'commerceproducer.googleapis.com/Service\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"p\n\x14ListServicesResponse\x12?\n\x08services\x18\x01 \x03(\x0b\x32-.google.cloud.commerceproducer.v1beta.Service\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x98\x01\n\x11GetServiceRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'commerceproducer.googleapis.com/Service\x12\x44\n\x04view\x18\x02 \x01(\x0e\x32\x31.google.cloud.commerceproducer.v1beta.ServiceViewB\x03\xe0\x41\x01\"\xbf\x01\n\x19ListStandardOffersRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-commerceproducer.googleapis.com/StandardOffer\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x83\x01\n\x1aListStandardOffersResponse\x12L\n\x0fstandard_offers\x18\x01 \x03(\x0b\x32\x33.google.cloud.commerceproducer.v1beta.StandardOffer\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xaa\x01\n\x17GetStandardOfferRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-commerceproducer.googleapis.com/StandardOffer\x12J\n\x04view\x18\x02 \x01(\x0e\x32\x37.google.cloud.commerceproducer.v1beta.StandardOfferViewB\x03\xe0\x41\x01\"\x7f\n\x0fListSkusRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#commerceproducer.googleapis.com/Sku\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"d\n\x10ListSkusResponse\x12\x37\n\x04skus\x18\x01 \x03(\x0b\x32).google.cloud.commerceproducer.v1beta.Sku\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"J\n\rGetSkuRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#commerceproducer.googleapis.com/Sku\"T\n\x12GetSkuGroupRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(commerceproducer.googleapis.com/SkuGroup\"\x89\x01\n\x14ListSkuGroupsRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(commerceproducer.googleapis.com/SkuGroup\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"t\n\x15ListSkuGroupsResponse\x12\x42\n\nsku_groups\x18\x01 \x03(\x0b\x32..google.cloud.commerceproducer.v1beta.SkuGroup\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t*q\n\x10PrivateOfferView\x12\"\n\x1ePRIVATE_OFFER_VIEW_UNSPECIFIED\x10\x00\x12\x1c\n\x18PRIVATE_OFFER_VIEW_BASIC\x10\x01\x12\x1b\n\x17PRIVATE_OFFER_VIEW_FULL\x10\x02*u\n\x11StandardOfferView\x12#\n\x1fSTANDARD_OFFER_VIEW_UNSPECIFIED\x10\x00\x12\x1d\n\x19STANDARD_OFFER_VIEW_BASIC\x10\x01\x12\x1c\n\x18STANDARD_OFFER_VIEW_FULL\x10\x02*Z\n\x0bServiceView\x12\x1c\n\x18SERVICE_VIEW_UNSPECIFIED\x10\x00\x12\x16\n\x12SERVICE_VIEW_BASIC\x10\x01\x12\x15\n\x11SERVICE_VIEW_FULL\x10\x02\x32\xf5%\n\x13\x43ommerceTransaction\x12\xc8\x01\n\x0cListServices\x12\x39.google.cloud.commerceproducer.v1beta.ListServicesRequest\x1a:.google.cloud.commerceproducer.v1beta.ListServicesResponse\"A\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x32\x12\x30/v1beta/{parent=projects/*/locations/*}/services\x12\xb5\x01\n\nGetService\x12\x37.google.cloud.commerceproducer.v1beta.GetServiceRequest\x1a-.google.cloud.commerceproducer.v1beta.Service\"?\xda\x41\x04name\x82\xd3\xe4\x93\x02\x32\x12\x30/v1beta/{name=projects/*/locations/*/services/*}\x12\xdc\x01\n\x11ListPrivateOffers\x12>.google.cloud.commerceproducer.v1beta.ListPrivateOffersRequest\x1a?.google.cloud.commerceproducer.v1beta.ListPrivateOffersResponse\"F\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x37\x12\x35/v1beta/{parent=projects/*/locations/*}/privateOffers\x12\xc9\x01\n\x0fGetPrivateOffer\x12<.google.cloud.commerceproducer.v1beta.GetPrivateOfferRequest\x1a\x32.google.cloud.commerceproducer.v1beta.PrivateOffer\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/v1beta/{name=projects/*/locations/*/privateOffers/*}\x12\xae\x02\n\x16ResolveAmendmentTarget\x12\x43.google.cloud.commerceproducer.v1beta.ResolveAmendmentTargetRequest\x1a\x44.google.cloud.commerceproducer.v1beta.ResolveAmendmentTargetResponse\"\x88\x01\xda\x41\x31parent,target_billing_account,base_standard_offer\x82\xd3\xe4\x93\x02N\x12L/v1beta/{parent=projects/*/locations/*}/privateOffers:resolveAmendmentTarget\x12\xd7\x01\n\x12\x43reatePrivateOffer\x12?.google.cloud.commerceproducer.v1beta.CreatePrivateOfferRequest\x1a\x32.google.cloud.commerceproducer.v1beta.PrivateOffer\"L\x82\xd3\xe4\x93\x02\x46\"5/v1beta/{parent=projects/*/locations/*}/privateOffers:\rprivate_offer\x12\x81\x02\n\x12UpdatePrivateOffer\x12?.google.cloud.commerceproducer.v1beta.UpdatePrivateOfferRequest\x1a\x32.google.cloud.commerceproducer.v1beta.PrivateOffer\"v\xda\x41\x19private_offer,update_mask\x82\xd3\xe4\x93\x02T2C/v1beta/{private_offer.name=projects/*/locations/*/privateOffers/*}:\rprivate_offer\x12\xdc\x01\n\x13PublishPrivateOffer\x12@.google.cloud.commerceproducer.v1beta.PublishPrivateOfferRequest\x1a\x32.google.cloud.commerceproducer.v1beta.PrivateOffer\"O\xda\x41\x04name\x82\xd3\xe4\x93\x02\x42\"=/v1beta/{name=projects/*/locations/*/privateOffers/*}:publish:\x01*\x12\xd9\x01\n\x12\x43\x61ncelPrivateOffer\x12?.google.cloud.commerceproducer.v1beta.CancelPrivateOfferRequest\x1a\x32.google.cloud.commerceproducer.v1beta.PrivateOffer\"N\xda\x41\x04name\x82\xd3\xe4\x93\x02\x41\".google.cloud.commerceproducer.v1beta.Sku.SkuPrice.TieredPriceB\x03\xe0\x41\x03H\x00\x12\x1d\n\x10\x63\x61nonical_metric\x18\x01 \x01(\tB\x03\xe0\x41\x03\x42\x11\n\x0fprice_structure\x1a\xd9\x06\n\x1c\x43omputeEngineLicenseUsageFee\x12,\n\x0eprice_per_unit\x18\x06 \x01(\x0b\x32\x12.google.type.MoneyH\x00\x12\x19\n\x0clicense_code\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12~\n\x10machine_resource\x18\x02 \x01(\x0e\x32_.google.cloud.commerceproducer.v1beta.Sku.SkuPrice.ComputeEngineLicenseUsageFee.MachineResourceB\x03\xe0\x41\x03\x12\x89\x01\n\x16machine_resource_range\x18\x03 \x01(\x0b\x32\x64.google.cloud.commerceproducer.v1beta.Sku.SkuPrice.ComputeEngineLicenseUsageFee.MachineResourceRangeB\x03\xe0\x41\x03\x12\x80\x01\n\x11usage_calculation\x18\x04 \x01(\x0e\x32`.google.cloud.commerceproducer.v1beta.Sku.SkuPrice.ComputeEngineLicenseUsageFee.UsageCalculationB\x03\xe0\x41\x03\x12\x11\n\x04unit\x18\x05 \x01(\tB\x03\xe0\x41\x03\x1a[\n\x14MachineResourceRange\x12\x18\n\x0bstart_value\x18\x01 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1b\n\tend_value\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x42\x0c\n\n_end_value\"d\n\x0fMachineResource\x12 \n\x1cMACHINE_RESOURCE_UNSPECIFIED\x10\x00\x12\x0e\n\nVCPU_COUNT\x10\x01\x12\x10\n\x0cMEMORY_BYTES\x10\x02\x12\r\n\tGPU_COUNT\x10\x03\"x\n\x10UsageCalculation\x12!\n\x1dUSAGE_CALCULATION_UNSPECIFIED\x10\x00\x12\x14\n\x10INSTANCE_RUNTIME\x10\x01\x12+\n\'LINEAR_RESOURCE_SCALED_INSTANCE_RUNTIME\x10\x02\x42\x11\n\x0fprice_structure\x1a\xa2\x06\n\x1bKubernetesEnginePodUsageFee\x12,\n\x0eprice_per_unit\x18\x06 \x01(\x0b\x32\x12.google.type.MoneyH\x00\x12u\n\x0cpod_resource\x18\x02 \x01(\x0e\x32Z.google.cloud.commerceproducer.v1beta.Sku.SkuPrice.KubernetesEnginePodUsageFee.PodResourceB\x03\xe0\x41\x03\x12\x80\x01\n\x12pod_resource_range\x18\x03 \x01(\x0b\x32_.google.cloud.commerceproducer.v1beta.Sku.SkuPrice.KubernetesEnginePodUsageFee.PodResourceRangeB\x03\xe0\x41\x03\x12\x7f\n\x11usage_calculation\x18\x04 \x01(\x0e\x32_.google.cloud.commerceproducer.v1beta.Sku.SkuPrice.KubernetesEnginePodUsageFee.UsageCalculationB\x03\xe0\x41\x03\x12\x11\n\x04unit\x18\x05 \x01(\tB\x03\xe0\x41\x03\x1aW\n\x10PodResourceRange\x12\x18\n\x0bstart_value\x18\x01 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1b\n\tend_value\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x42\x0c\n\n_end_value\"k\n\x0bPodResource\x12\x1c\n\x18POD_RESOURCE_UNSPECIFIED\x10\x00\x12\x0e\n\nVCPU_COUNT\x10\x01\x12\x10\n\x0cMEMORY_BYTES\x10\x02\x12\r\n\tGPU_COUNT\x10\x03\x12\r\n\tTPU_COUNT\x10\x04\"n\n\x10UsageCalculation\x12!\n\x1dUSAGE_CALCULATION_UNSPECIFIED\x10\x00\x12\x0f\n\x0bPOD_RUNTIME\x10\x01\x12&\n\"LINEAR_RESOURCE_SCALED_POD_RUNTIME\x10\x02\x42\x11\n\x0fprice_structure\x1a\xfb\x11\n\x1e\x41iPlatformManagedModelUsageFee\x12[\n\x0ctiered_price\x18\x07 \x01(\x0b\x32>.google.cloud.commerceproducer.v1beta.Sku.SkuPrice.TieredPriceB\x03\xe0\x41\x03H\x00\x12\x8e\x01\n\x0cusage_metric\x18\x01 \x01(\x0b\x32s.google.cloud.commerceproducer.v1beta.Sku.SkuPrice.AiPlatformManagedModelUsageFee.AiPlatformManagedModelUsageMetricB\x03\xe0\x41\x03\x12p\n\x08location\x18\x03 \x01(\x0b\x32Y.google.cloud.commerceproducer.v1beta.Sku.SkuPrice.AiPlatformManagedModelEndpointLocationB\x03\xe0\x41\x03\x12~\n\x0fprediction_mode\x18\x04 \x01(\x0e\x32`.google.cloud.commerceproducer.v1beta.Sku.SkuPrice.AiPlatformManagedModelUsageFee.PredictionModeB\x03\xe0\x41\x03\x12\xa3\x01\n#combined_request_input_tokens_range\x18\x05 \x01(\x0b\x32q.google.cloud.commerceproducer.v1beta.Sku.SkuPrice.AiPlatformManagedModelUsageFee.CombinedRequestInputTokensRangeB\x03\xe0\x41\x03\x12\x9b\x01\n\x1eprovisioned_throughput_overage\x18\x06 \x01(\x0b\x32n.google.cloud.commerceproducer.v1beta.Sku.SkuPrice.AiPlatformManagedModelUsageFee.ProvisionedThroughputOverageB\x03\xe0\x41\x03\x1a\xf7\x08\n!AiPlatformManagedModelUsageMetric\x12\xaa\x01\n\x13input_tokens_metric\x18\x01 \x01(\x0b\x32\x85\x01.google.cloud.commerceproducer.v1beta.Sku.SkuPrice.AiPlatformManagedModelUsageFee.AiPlatformManagedModelUsageMetric.InputTokensMetricB\x03\xe0\x41\x03H\x00\x12\xbe\x01\n\x1e\x63\x61\x63he_read_input_tokens_metric\x18\x02 \x01(\x0b\x32\x8e\x01.google.cloud.commerceproducer.v1beta.Sku.SkuPrice.AiPlatformManagedModelUsageFee.AiPlatformManagedModelUsageMetric.CacheReadInputTokensMetricB\x03\xe0\x41\x03H\x00\x12\xc0\x01\n\x1f\x63\x61\x63he_write_input_tokens_metric\x18\x03 \x01(\x0b\x32\x8f\x01.google.cloud.commerceproducer.v1beta.Sku.SkuPrice.AiPlatformManagedModelUsageFee.AiPlatformManagedModelUsageMetric.CacheWriteInputTokensMetricB\x03\xe0\x41\x03H\x00\x12\xac\x01\n\x14output_tokens_metric\x18\x04 \x01(\x0b\x32\x86\x01.google.cloud.commerceproducer.v1beta.Sku.SkuPrice.AiPlatformManagedModelUsageFee.AiPlatformManagedModelUsageMetric.OutputTokensMetricB\x03\xe0\x41\x03H\x00\x12\xb7\x01\n\x1aweb_search_requests_metric\x18\x05 \x01(\x0b\x32\x8b\x01.google.cloud.commerceproducer.v1beta.Sku.SkuPrice.AiPlatformManagedModelUsageFee.AiPlatformManagedModelUsageMetric.WebSearchRequestsMetricB\x03\xe0\x41\x03H\x00\x1a\x13\n\x11InputTokensMetric\x1a\x1c\n\x1a\x43\x61\x63heReadInputTokensMetric\x1aJ\n\x1b\x43\x61\x63heWriteInputTokensMetric\x12+\n\x03ttl\x18\x01 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x03\x1a\x14\n\x12OutputTokensMetric\x1a\x19\n\x17WebSearchRequestsMetricB\x08\n\x06metric\x1a\x66\n\x1f\x43ombinedRequestInputTokensRange\x12\x18\n\x0bstart_value\x18\x01 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1b\n\tend_value\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x42\x0c\n\n_end_value\x1a`\n\x1cProvisionedThroughputOverage\x12@\n\x07service\x18\x01 \x01(\tB/\xe0\x41\x03\xfa\x41)\x12\'commerceproducer.googleapis.com/Service\"^\n\x0ePredictionMode\x12\x1f\n\x1bPREDICTION_MODE_UNSPECIFIED\x10\x00\x12\x15\n\x11ONLINE_PREDICTION\x10\x01\x12\x14\n\x10\x42\x41TCH_PREDICTION\x10\x02\x42\x11\n\x0fprice_structure\x1a\x9b\x02\n\"AiPlatformProvisionedThroughputFee\x12#\n\x14term_duration_months\x18\x02 \x01(\x05\x42\x03\xe0\x41\x03H\x00\x12\x30\n\x12gsu_price_per_unit\x18\x04 \x01(\x0b\x32\x12.google.type.MoneyH\x01\x12p\n\x08location\x18\x01 \x01(\x0b\x32Y.google.cloud.commerceproducer.v1beta.Sku.SkuPrice.AiPlatformManagedModelEndpointLocationB\x03\xe0\x41\x03\x12\x11\n\x04unit\x18\x03 \x01(\tB\x03\xe0\x41\x03\x42\x06\n\x04termB\x11\n\x0fprice_structure\x1a\x9c\x03\n\x1f\x41iPlatformDeployedModelUsageFee\x12\x1f\n\x10\x61\x63\x63\x65lerator_type\x18\x02 \x01(\tB\x03\xe0\x41\x03H\x00\x12\x31\n\x0eprice_per_unit\x18\x05 \x01(\x0b\x32\x12.google.type.MoneyB\x03\xe0\x41\x03H\x01\x12\x11\n\x04unit\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x83\x01\n\x11usage_calculation\x18\x04 \x01(\x0e\x32\x63.google.cloud.commerceproducer.v1beta.Sku.SkuPrice.AiPlatformDeployedModelUsageFee.UsageCalculationB\x03\xe0\x41\x03\"d\n\x10UsageCalculation\x12!\n\x1dUSAGE_CALCULATION_UNSPECIFIED\x10\x00\x12-\n)LINEAR_RESOURCE_SCALED_DEPLOYMENT_RUNTIME\x10\x02\x42\x13\n\x11hardware_resourceB\x11\n\x0fprice_structure\x1an\n\x13\x46latSubscriptionFee\x12\x31\n\x0eprice_per_unit\x18\x03 \x01(\x0b\x32\x12.google.type.MoneyB\x03\xe0\x41\x03H\x00\x12\x11\n\x04unit\x18\x02 \x01(\tB\x03\xe0\x41\x03\x42\x11\n\x0fprice_structure\x1a\xbe\x02\n\x0bTieredPrice\x12\x11\n\x04unit\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x1d\n\x10unit_description\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x33\n\x10price_unit_count\x18\x03 \x01(\x0b\x32\x14.google.type.DecimalB\x03\xe0\x41\x03\x12\x62\n\x0bprice_tiers\x18\x04 \x03(\x0b\x32H.google.cloud.commerceproducer.v1beta.Sku.SkuPrice.TieredPrice.PriceTierB\x03\xe0\x41\x03\x1a\x64\n\tPriceTier\x12/\n\x0cstart_amount\x18\x01 \x01(\x0b\x32\x14.google.type.DecimalB\x03\xe0\x41\x03\x12&\n\x05price\x18\x02 \x01(\x0b\x32\x12.google.type.MoneyB\x03\xe0\x41\x03\x1a\x8e\x01\n&AiPlatformManagedModelEndpointLocation\x12\x18\n\tregion_id\x18\x01 \x01(\tB\x03\xe0\x41\x03H\x00\x12\x1e\n\x0fglobal_endpoint\x18\x02 \x01(\x08\x42\x03\xe0\x41\x03H\x00\x12\x1e\n\x0fmulti_region_id\x18\x03 \x01(\tB\x03\xe0\x41\x03H\x00\x42\n\n\x08locationB\n\n\x08sku_type:z\xea\x41w\n#commerceproducer.googleapis.com/Sku\x12\x45projects/{project}/locations/{location}/services/{service}/skus/{sku}*\x04skus2\x03skuB\x84\x02\n(com.google.cloud.commerceproducer.v1betaB\x08SkuProtoP\x01ZTcloud.google.com/go/commerceproducer/apiv1beta/commerceproducerpb;commerceproducerpb\xaa\x02$Google.Cloud.CommerceProducer.V1Beta\xca\x02$Google\\Cloud\\CommerceProducer\\V1beta\xea\x02\'Google::Cloud::CommerceProducer::V1betab\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module CommerceProducer + module V1beta + Sku = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.commerceproducer.v1beta.Sku").msgclass + Sku::SkuPrice = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.commerceproducer.v1beta.Sku.SkuPrice").msgclass + Sku::SkuPrice::InactiveSkuPrice = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.commerceproducer.v1beta.Sku.SkuPrice.InactiveSkuPrice").msgclass + Sku::SkuPrice::ManagedServiceMetricUsageFee = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.commerceproducer.v1beta.Sku.SkuPrice.ManagedServiceMetricUsageFee").msgclass + Sku::SkuPrice::ComputeEngineLicenseUsageFee = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.commerceproducer.v1beta.Sku.SkuPrice.ComputeEngineLicenseUsageFee").msgclass + Sku::SkuPrice::ComputeEngineLicenseUsageFee::MachineResourceRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.commerceproducer.v1beta.Sku.SkuPrice.ComputeEngineLicenseUsageFee.MachineResourceRange").msgclass + Sku::SkuPrice::ComputeEngineLicenseUsageFee::MachineResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.commerceproducer.v1beta.Sku.SkuPrice.ComputeEngineLicenseUsageFee.MachineResource").enummodule + Sku::SkuPrice::ComputeEngineLicenseUsageFee::UsageCalculation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.commerceproducer.v1beta.Sku.SkuPrice.ComputeEngineLicenseUsageFee.UsageCalculation").enummodule + Sku::SkuPrice::KubernetesEnginePodUsageFee = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.commerceproducer.v1beta.Sku.SkuPrice.KubernetesEnginePodUsageFee").msgclass + Sku::SkuPrice::KubernetesEnginePodUsageFee::PodResourceRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.commerceproducer.v1beta.Sku.SkuPrice.KubernetesEnginePodUsageFee.PodResourceRange").msgclass + Sku::SkuPrice::KubernetesEnginePodUsageFee::PodResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.commerceproducer.v1beta.Sku.SkuPrice.KubernetesEnginePodUsageFee.PodResource").enummodule + Sku::SkuPrice::KubernetesEnginePodUsageFee::UsageCalculation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.commerceproducer.v1beta.Sku.SkuPrice.KubernetesEnginePodUsageFee.UsageCalculation").enummodule + Sku::SkuPrice::AiPlatformManagedModelUsageFee = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.commerceproducer.v1beta.Sku.SkuPrice.AiPlatformManagedModelUsageFee").msgclass + Sku::SkuPrice::AiPlatformManagedModelUsageFee::AiPlatformManagedModelUsageMetric = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.commerceproducer.v1beta.Sku.SkuPrice.AiPlatformManagedModelUsageFee.AiPlatformManagedModelUsageMetric").msgclass + Sku::SkuPrice::AiPlatformManagedModelUsageFee::AiPlatformManagedModelUsageMetric::InputTokensMetric = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.commerceproducer.v1beta.Sku.SkuPrice.AiPlatformManagedModelUsageFee.AiPlatformManagedModelUsageMetric.InputTokensMetric").msgclass + Sku::SkuPrice::AiPlatformManagedModelUsageFee::AiPlatformManagedModelUsageMetric::CacheReadInputTokensMetric = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.commerceproducer.v1beta.Sku.SkuPrice.AiPlatformManagedModelUsageFee.AiPlatformManagedModelUsageMetric.CacheReadInputTokensMetric").msgclass + Sku::SkuPrice::AiPlatformManagedModelUsageFee::AiPlatformManagedModelUsageMetric::CacheWriteInputTokensMetric = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.commerceproducer.v1beta.Sku.SkuPrice.AiPlatformManagedModelUsageFee.AiPlatformManagedModelUsageMetric.CacheWriteInputTokensMetric").msgclass + Sku::SkuPrice::AiPlatformManagedModelUsageFee::AiPlatformManagedModelUsageMetric::OutputTokensMetric = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.commerceproducer.v1beta.Sku.SkuPrice.AiPlatformManagedModelUsageFee.AiPlatformManagedModelUsageMetric.OutputTokensMetric").msgclass + Sku::SkuPrice::AiPlatformManagedModelUsageFee::AiPlatformManagedModelUsageMetric::WebSearchRequestsMetric = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.commerceproducer.v1beta.Sku.SkuPrice.AiPlatformManagedModelUsageFee.AiPlatformManagedModelUsageMetric.WebSearchRequestsMetric").msgclass + Sku::SkuPrice::AiPlatformManagedModelUsageFee::CombinedRequestInputTokensRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.commerceproducer.v1beta.Sku.SkuPrice.AiPlatformManagedModelUsageFee.CombinedRequestInputTokensRange").msgclass + Sku::SkuPrice::AiPlatformManagedModelUsageFee::ProvisionedThroughputOverage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.commerceproducer.v1beta.Sku.SkuPrice.AiPlatformManagedModelUsageFee.ProvisionedThroughputOverage").msgclass + Sku::SkuPrice::AiPlatformManagedModelUsageFee::PredictionMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.commerceproducer.v1beta.Sku.SkuPrice.AiPlatformManagedModelUsageFee.PredictionMode").enummodule + Sku::SkuPrice::AiPlatformProvisionedThroughputFee = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.commerceproducer.v1beta.Sku.SkuPrice.AiPlatformProvisionedThroughputFee").msgclass + Sku::SkuPrice::AiPlatformDeployedModelUsageFee = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.commerceproducer.v1beta.Sku.SkuPrice.AiPlatformDeployedModelUsageFee").msgclass + Sku::SkuPrice::AiPlatformDeployedModelUsageFee::UsageCalculation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.commerceproducer.v1beta.Sku.SkuPrice.AiPlatformDeployedModelUsageFee.UsageCalculation").enummodule + Sku::SkuPrice::FlatSubscriptionFee = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.commerceproducer.v1beta.Sku.SkuPrice.FlatSubscriptionFee").msgclass + Sku::SkuPrice::TieredPrice = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.commerceproducer.v1beta.Sku.SkuPrice.TieredPrice").msgclass + Sku::SkuPrice::TieredPrice::PriceTier = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.commerceproducer.v1beta.Sku.SkuPrice.TieredPrice.PriceTier").msgclass + Sku::SkuPrice::AiPlatformManagedModelEndpointLocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.commerceproducer.v1beta.Sku.SkuPrice.AiPlatformManagedModelEndpointLocation").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerceproducer/v1beta/standard_offer_pb.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerceproducer/v1beta/standard_offer_pb.rb new file mode 100644 index 000000000000..63fdc3836bec --- /dev/null +++ b/owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerceproducer/v1beta/standard_offer_pb.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/commerceproducer/v1beta/standard_offer.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n9google/cloud/commerceproducer/v1beta/standard_offer.proto\x12$google.cloud.commerceproducer.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xa5\n\n\rStandardOffer\x12#\n\x14term_duration_months\x18\x07 \x01(\x05\x42\x03\xe0\x41\x03H\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x37\n\x0e\x65\x66\x66\x65\x63tive_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x65xpire_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1a\n\rservice_level\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12 \n\x13service_level_title\x18\t \x01(\tB\x03\xe0\x41\x03\x12X\n\x0bprice_model\x18\x08 \x01(\x0b\x32>.google.cloud.commerceproducer.v1beta.StandardOffer.PriceModelB\x03\xe0\x41\x03\x1a\xaf\x05\n\nPriceModel\x12k\n\x08\x66lat_fee\x18\x02 \x01(\x0b\x32R.google.cloud.commerceproducer.v1beta.StandardOffer.PriceModel.FlatFeeSubscriptionB\x03\xe0\x41\x03H\x00\x12X\n\x05usage\x18\x01 \x01(\x0b\x32\x44.google.cloud.commerceproducer.v1beta.StandardOffer.PriceModel.UsageB\x03\xe0\x41\x03\x1a\x44\n\x07SkuList\x12\x39\n\x04skus\x18\x01 \x03(\tB+\xe0\x41\x03\xfa\x41%\n#commerceproducer.googleapis.com/Sku\x1aT\n\x0cSkuGroupList\x12\x44\n\nsku_groups\x18\x01 \x03(\tB0\xe0\x41\x03\xfa\x41*\n(commerceproducer.googleapis.com/SkuGroup\x1a\xdc\x01\n\x05Usage\x12_\n\x08sku_list\x18\x01 \x01(\x0b\x32\x46.google.cloud.commerceproducer.v1beta.StandardOffer.PriceModel.SkuListB\x03\xe0\x41\x03H\x00\x12j\n\x0esku_group_list\x18\x02 \x01(\x0b\x32K.google.cloud.commerceproducer.v1beta.StandardOffer.PriceModel.SkuGroupListB\x03\xe0\x41\x03H\x00\x42\x06\n\x04skus\x1aO\n\x13\x46latFeeSubscription\x12\x38\n\x03sku\x18\x01 \x01(\tB+\xe0\x41\x03\xfa\x41%\n#commerceproducer.googleapis.com/SkuB\x0e\n\x0csubscription:\xae\x01\xea\x41\xaa\x01\n-commerceproducer.googleapis.com/StandardOffer\x12Zprojects/{project}/locations/{location}/services/{service}/standardOffers/{standard_offer}*\x0estandardOffers2\rstandardOfferB\x06\n\x04termB\x8e\x02\n(com.google.cloud.commerceproducer.v1betaB\x12StandardOfferProtoP\x01ZTcloud.google.com/go/commerceproducer/apiv1beta/commerceproducerpb;commerceproducerpb\xaa\x02$Google.Cloud.CommerceProducer.V1Beta\xca\x02$Google\\Cloud\\CommerceProducer\\V1beta\xea\x02\'Google::Cloud::CommerceProducer::V1betab\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module CommerceProducer + module V1beta + StandardOffer = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.commerceproducer.v1beta.StandardOffer").msgclass + StandardOffer::PriceModel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.commerceproducer.v1beta.StandardOffer.PriceModel").msgclass + StandardOffer::PriceModel::SkuList = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.commerceproducer.v1beta.StandardOffer.PriceModel.SkuList").msgclass + StandardOffer::PriceModel::SkuGroupList = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.commerceproducer.v1beta.StandardOffer.PriceModel.SkuGroupList").msgclass + StandardOffer::PriceModel::Usage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.commerceproducer.v1beta.StandardOffer.PriceModel.Usage").msgclass + StandardOffer::PriceModel::FlatFeeSubscription = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.commerceproducer.v1beta.StandardOffer.PriceModel.FlatFeeSubscription").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/README.md b/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/README.md new file mode 100644 index 000000000000..d787dcfce5e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/README.md @@ -0,0 +1,4 @@ +# Cloud Commerce Producer V1BETA Protocol Buffer Documentation + +These files are for the YARD documentation of the generated protobuf files. +They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/api/client.rb @@ -0,0 +1,593 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Required information for every language. + # @!attribute [rw] reference_docs_uri + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Link to automatically generated reference documentation. Example: + # https://cloud.google.com/nodejs/docs/reference/asset/latest + # @!attribute [rw] destinations + # @return [::Array<::Google::Api::ClientLibraryDestination>] + # The destination where API teams want this client library to be published. + # @!attribute [rw] selective_gapic_generation + # @return [::Google::Api::SelectiveGapicGeneration] + # Configuration for which RPCs should be generated in the GAPIC client. + # + # Note: This field should not be used in most cases. + class CommonLanguageSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about how and where to publish client libraries. + # @!attribute [rw] version + # @return [::String] + # Version of the API to apply these settings to. This is the full protobuf + # package for the API, ending in the version element. + # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Launch stage of this version of the API. + # @!attribute [rw] rest_numeric_enums + # @return [::Boolean] + # When using transport=rest, the client request will encode enums as + # numbers rather than strings. + # @!attribute [rw] java_settings + # @return [::Google::Api::JavaSettings] + # Settings for legacy Java features, supported in the Service YAML. + # @!attribute [rw] cpp_settings + # @return [::Google::Api::CppSettings] + # Settings for C++ client libraries. + # @!attribute [rw] php_settings + # @return [::Google::Api::PhpSettings] + # Settings for PHP client libraries. + # @!attribute [rw] python_settings + # @return [::Google::Api::PythonSettings] + # Settings for Python client libraries. + # @!attribute [rw] node_settings + # @return [::Google::Api::NodeSettings] + # Settings for Node client libraries. + # @!attribute [rw] dotnet_settings + # @return [::Google::Api::DotnetSettings] + # Settings for .NET client libraries. + # @!attribute [rw] ruby_settings + # @return [::Google::Api::RubySettings] + # Settings for Ruby client libraries. + # @!attribute [rw] go_settings + # @return [::Google::Api::GoSettings] + # Settings for Go client libraries. + class ClientLibrarySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This message configures the settings for publishing [Google Cloud Client + # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) + # generated from the service config. + # @!attribute [rw] method_settings + # @return [::Array<::Google::Api::MethodSettings>] + # A list of API method settings, e.g. the behavior for methods that use the + # long-running operation pattern. + # @!attribute [rw] new_issue_uri + # @return [::String] + # Link to a *public* URI where users can report issues. Example: + # https://issuetracker.google.com/issues/new?component=190865&template=1161103 + # @!attribute [rw] documentation_uri + # @return [::String] + # Link to product home page. Example: + # https://cloud.google.com/asset-inventory/docs/overview + # @!attribute [rw] api_short_name + # @return [::String] + # Used as a tracking tag when collecting data about the APIs developer + # relations artifacts like docs, packages delivered to package managers, + # etc. Example: "speech". + # @!attribute [rw] github_label + # @return [::String] + # GitHub label to apply to issues and pull requests opened for this API. + # @!attribute [rw] codeowner_github_teams + # @return [::Array<::String>] + # GitHub teams to be added to CODEOWNERS in the directory in GitHub + # containing source code for the client libraries for this API. + # @!attribute [rw] doc_tag_prefix + # @return [::String] + # A prefix used in sample code when demarking regions to be included in + # documentation. + # @!attribute [rw] organization + # @return [::Google::Api::ClientLibraryOrganization] + # For whom the client library is being published. + # @!attribute [rw] library_settings + # @return [::Array<::Google::Api::ClientLibrarySettings>] + # Client library settings. If the same version string appears multiple + # times in this list, then the last one wins. Settings from earlier + # settings with the same version string are discarded. + # @!attribute [rw] proto_reference_documentation_uri + # @return [::String] + # Optional link to proto reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rpc + # @!attribute [rw] rest_reference_documentation_uri + # @return [::String] + # Optional link to REST reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rest + class Publishing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Java client libraries. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Java. Clobbers the java_package option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.java.package_name" field + # in gapic.yaml. API teams should use the protobuf java_package option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Php. Clobbers the php_namespace option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.php.package_name" field + # in gapic.yaml. API teams should use the protobuf php_namespace option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # library_settings: + # php_settings: + # library_package: Google\Cloud\PubSub\V1 + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # Example: + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + # @!attribute [rw] batching + # @return [::Google::Api::BatchingConfigProto] + # Batching configuration for an API method in client libraries. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.BatchCreateExample + # batching: + # element_count_threshold: 1000 + # request_byte_threshold: 100000000 + # delay_threshold_millis: 10 + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # + # Note: This feature should not be used in most cases. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingConfigProto` defines the batching configuration for an API method. + # @!attribute [rw] thresholds + # @return [::Google::Api::BatchingSettingsProto] + # The thresholds which trigger a batched request to be sent. + # @!attribute [rw] batch_descriptor + # @return [::Google::Api::BatchingDescriptorProto] + # The request and response fields used in batching. + class BatchingConfigProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingSettingsProto` specifies a set of batching thresholds, each of + # which acts as a trigger to send a batch of messages as a request. At least + # one threshold must be positive nonzero. + # @!attribute [rw] element_count_threshold + # @return [::Integer] + # The number of elements of a field collected into a batch which, if + # exceeded, causes the batch to be sent. + # @!attribute [rw] request_byte_threshold + # @return [::Integer] + # The aggregated size of the batched field which, if exceeded, causes the + # batch to be sent. This size is computed by aggregating the sizes of the + # request field to be batched, not of the entire request message. + # @!attribute [rw] delay_threshold + # @return [::Google::Protobuf::Duration] + # The duration after which a batch should be sent, starting from the addition + # of the first message to that batch. + # @!attribute [rw] element_count_limit + # @return [::Integer] + # The maximum number of elements collected in a batch that could be accepted + # by server. + # @!attribute [rw] request_byte_limit + # @return [::Integer] + # The maximum size of the request that could be accepted by server. + # @!attribute [rw] flow_control_element_limit + # @return [::Integer] + # The maximum number of elements allowed by flow control. + # @!attribute [rw] flow_control_byte_limit + # @return [::Integer] + # The maximum size of data allowed by flow control. + # @!attribute [rw] flow_control_limit_exceeded_behavior + # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] + # The behavior to take when the flow control limit is exceeded. + class BatchingSettingsProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # `BatchingDescriptorProto` specifies the fields of the request message to be + # used for batching, and, optionally, the fields of the response message to be + # used for demultiplexing. + # @!attribute [rw] batched_field + # @return [::String] + # The repeated field in the request message to be aggregated by batching. + # @!attribute [rw] discriminator_fields + # @return [::Array<::String>] + # A list of the fields in the request message. Two requests will be batched + # together only if the values of every field specified in + # `request_discriminator_fields` is equal between the two requests. + # @!attribute [rw] subresponse_field + # @return [::String] + # Optional. When present, indicates the field in the response message to be + # used to demultiplex the response into multiple response messages, in + # correspondence with the multiple request messages originally batched + # together. + class BatchingDescriptorProto + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + + # The behavior to take when the flow control limit is exceeded. + module FlowControlLimitExceededBehaviorProto + # Default behavior, system-defined. + UNSET_BEHAVIOR = 0 + + # Stop operation, raise error. + THROW_EXCEPTION = 1 + + # Pause operation until limit clears. + BLOCK = 2 + + # Continue operation, disregard limit. + IGNORE = 3 + end + end +end diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/api/field_behavior.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # An indicator of the behavior of a given field (for example, that a field + # is required in requests, or given as output but ignored as input). + # This **does not** change the behavior in protocol buffers itself; it only + # denotes the behavior and may affect how API tooling handles the field. + # + # Note: This enum **may** receive new values in the future. + module FieldBehavior + # Conventional default for enums. Do not use this. + FIELD_BEHAVIOR_UNSPECIFIED = 0 + + # Specifically denotes a field as optional. + # While all fields in protocol buffers are optional, this may be specified + # for emphasis if appropriate. + OPTIONAL = 1 + + # Denotes a field as required. + # This indicates that the field **must** be provided as part of the request, + # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). + REQUIRED = 2 + + # Denotes a field as output only. + # This indicates that the field is provided in responses, but including the + # field in a request does nothing (the server *must* ignore it and + # *must not* throw an error as a result of the field's presence). + OUTPUT_ONLY = 3 + + # Denotes a field as input only. + # This indicates that the field is provided in requests, and the + # corresponding field is not included in output. + INPUT_ONLY = 4 + + # Denotes a field as immutable. + # This indicates that the field may be set once in a request to create a + # resource, but may not be changed thereafter. + IMMUTABLE = 5 + + # Denotes that a (repeated) field is an unordered list. + # This indicates that the service may provide the elements of the list + # in any arbitrary order, rather than the order the user originally + # provided. Additionally, the list's order may or may not be stable. + UNORDERED_LIST = 6 + + # Denotes that this field returns a non-empty default value if not set. + # This indicates that if the user provides the empty value in a request, + # a non-empty value will be returned. The user will not be aware of what + # non-empty value to expect. + NON_EMPTY_DEFAULT = 7 + + # Denotes that the field in a resource (a message annotated with + # google.api.resource) is used in the resource name to uniquely identify the + # resource. For AIP-compliant APIs, this should only be applied to the + # `name` field on the resource. + # + # This behavior should not be applied to references to other resources within + # the message. + # + # The identifier field of resources often have different field behavior + # depending on the request it is embedded in (e.g. for Create methods name + # is optional and unused, while for Update methods it is required). Instead + # of method-specific annotations, only `IDENTIFIER` is required. + IDENTIFIER = 8 + end + end +end diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/api/launch_stage.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # The launch stage as defined by [Google Cloud Platform + # Launch Stages](https://cloud.google.com/terms/launch-stages). + module LaunchStage + # Do not use this default value. + LAUNCH_STAGE_UNSPECIFIED = 0 + + # The feature is not yet implemented. Users can not use it. + UNIMPLEMENTED = 6 + + # Prelaunch features are hidden from users and are only visible internally. + PRELAUNCH = 7 + + # Early Access features are limited to a closed group of testers. To use + # these features, you must sign up in advance and sign a Trusted Tester + # agreement (which includes confidentiality provisions). These features may + # be unstable, changed in backward-incompatible ways, and are not + # guaranteed to be released. + EARLY_ACCESS = 1 + + # Alpha is a limited availability test for releases before they are cleared + # for widespread use. By Alpha, all significant design issues are resolved + # and we are in the process of verifying functionality. Alpha customers + # need to apply for access, agree to applicable terms, and have their + # projects allowlisted. Alpha releases don't have to be feature complete, + # no SLAs are provided, and there are no technical support obligations, but + # they will be far enough along that customers can actually use them in + # test environments or for limited-use tests -- just like they would in + # normal production cases. + ALPHA = 2 + + # Beta is the point at which we are ready to open a release for any + # customer to use. There are no SLA or technical support obligations in a + # Beta release. Products will be complete from a feature perspective, but + # may have some open outstanding issues. Beta releases are suitable for + # limited production use cases. + BETA = 3 + + # GA features are open to all developers and are considered stable and + # fully qualified for production use. + GA = 4 + + # Deprecated features are scheduled to be shut down and removed. For more + # information, see the "Deprecation Policy" section of our [Terms of + # Service](https://cloud.google.com/terms/) + # and the [Google Cloud Platform Subject to the Deprecation + # Policy](https://cloud.google.com/terms/deprecation) documentation. + DEPRECATED = 5 + end + end +end diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/api/resource.rb @@ -0,0 +1,227 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # A simple descriptor of a resource type. + # + # ResourceDescriptor annotates a resource message (either by means of a + # protobuf annotation or use in the service config), and associates the + # resource's schema, the resource type, and the pattern of the resource name. + # + # Example: + # + # message Topic { + # // Indicates this message defines a resource schema. + # // Declares the resource type in the format of {service}/{kind}. + # // For Kubernetes resources, the format is {api group}/{kind}. + # option (google.api.resource) = { + # type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # + # Sometimes, resources have multiple patterns, typically because they can + # live under multiple parents. + # + # Example: + # + # message LogEntry { + # option (google.api.resource) = { + # type: "logging.googleapis.com/LogEntry" + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: 'logging.googleapis.com/LogEntry' + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # @!attribute [rw] type + # @return [::String] + # The resource type. It must be in the format of + # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be + # singular and must not include version numbers. + # + # Example: `storage.googleapis.com/Bucket` + # + # The value of the resource_type_kind must follow the regular expression + # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and + # should use PascalCase (UpperCamelCase). The maximum number of + # characters allowed for the `resource_type_kind` is 100. + # @!attribute [rw] pattern + # @return [::Array<::String>] + # Optional. The relative resource name pattern associated with this resource + # type. The DNS prefix of the full resource name shouldn't be specified here. + # + # The path pattern must follow the syntax, which aligns with HTTP binding + # syntax: + # + # Template = Segment { "/" Segment } ; + # Segment = LITERAL | Variable ; + # Variable = "{" LITERAL "}" ; + # + # Examples: + # + # - "projects/\\{project}/topics/\\{topic}" + # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" + # + # The components in braces correspond to the IDs for each resource in the + # hierarchy. It is expected that, if multiple patterns are provided, + # the same component name (e.g. "project") refers to IDs of the same + # type of resource. + # @!attribute [rw] name_field + # @return [::String] + # Optional. The field on the resource that designates the resource name + # field. If omitted, this is assumed to be "name". + # @!attribute [rw] history + # @return [::Google::Api::ResourceDescriptor::History] + # Optional. The historical or future-looking state of the resource pattern. + # + # Example: + # + # // The InspectTemplate message originally only supported resource + # // names with organization, and project was added later. + # message InspectTemplate { + # option (google.api.resource) = { + # type: "dlp.googleapis.com/InspectTemplate" + # pattern: + # "organizations/{organization}/inspectTemplates/{inspect_template}" + # pattern: "projects/{project}/inspectTemplates/{inspect_template}" + # history: ORIGINALLY_SINGLE_PATTERN + # }; + # } + # @!attribute [rw] plural + # @return [::String] + # The plural name used in the resource name and permission names, such as + # 'projects' for the resource name of 'projects/\\{project}' and the permission + # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception + # to this is for Nested Collections that have stuttering names, as defined + # in [AIP-122](https://google.aip.dev/122#nested-collections), where the + # collection ID in the resource name pattern does not necessarily directly + # match the `plural` value. + # + # It is the same concept of the `plural` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # + # Note: The plural form is required even for singleton resources. See + # https://aip.dev/156 + # @!attribute [rw] singular + # @return [::String] + # The same concept of the `singular` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # Such as "project" for the `resourcemanager.googleapis.com/Project` type. + # @!attribute [rw] style + # @return [::Array<::Google::Api::ResourceDescriptor::Style>] + # Style flag(s) for this resource. + # These indicate that a resource is expected to conform to a given + # style. See the specific style flags for additional information. + class ResourceDescriptor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A description of the historical or future-looking state of the + # resource pattern. + module History + # The "unset" value. + HISTORY_UNSPECIFIED = 0 + + # The resource originally had one pattern and launched as such, and + # additional patterns were added later. + ORIGINALLY_SINGLE_PATTERN = 1 + + # The resource has one pattern, but the API owner expects to add more + # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents + # that from being necessary once there are multiple patterns.) + FUTURE_MULTI_PATTERN = 2 + end + + # A flag representing a specific style that a resource claims to conform to. + module Style + # The unspecified value. Do not use. + STYLE_UNSPECIFIED = 0 + + # This resource is intended to be "declarative-friendly". + # + # Declarative-friendly resources must be more strictly consistent, and + # setting this to true communicates to tools that this resource should + # adhere to declarative-friendly expectations. + # + # Note: This is used by the API linter (linter.aip.dev) to enable + # additional checks. + DECLARATIVE_FRIENDLY = 1 + end + end + + # Defines a proto annotation that describes a string field that refers to + # an API resource. + # @!attribute [rw] type + # @return [::String] + # The resource type that the annotated field references. + # + # Example: + # + # message Subscription { + # string topic = 2 [(google.api.resource_reference) = { + # type: "pubsub.googleapis.com/Topic" + # }]; + # } + # + # Occasionally, a field may reference an arbitrary resource. In this case, + # APIs use the special value * in their resource reference. + # + # Example: + # + # message GetIamPolicyRequest { + # string resource = 2 [(google.api.resource_reference) = { + # type: "*" + # }]; + # } + # @!attribute [rw] child_type + # @return [::String] + # The resource type of a child collection that the annotated field + # references. This is useful for annotating the `parent` field that + # doesn't have a fixed resource type. + # + # Example: + # + # message ListLogEntriesRequest { + # string parent = 1 [(google.api.resource_reference) = { + # child_type: "logging.googleapis.com/LogEntry" + # }; + # } + class ResourceReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/cloud/commerceproducer/v1beta/commerce_transaction.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/cloud/commerceproducer/v1beta/commerce_transaction.rb new file mode 100644 index 000000000000..0eeb3ecd914f --- /dev/null +++ b/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/cloud/commerceproducer/v1beta/commerce_transaction.rb @@ -0,0 +1,533 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module CommerceProducer + module V1beta + # Message for requesting list of PrivateOffers + # @!attribute [rw] parent + # @return [::String] + # Required. Parent value for ListPrivateOffersRequest + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Maximum results to return. The service may return fewer than this + # value. The maximum value is 500; values above 500 will be coerced to 500. + # If unspecified, the server will default to the maximum. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous list response message. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters of the list request must match the + # request that returned the page token. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filter expression that matches a subset of resources to show. + # See https://google.aip.dev/160 for more details. + # Only supports filtering by: + # + # * `update_time`. Example: `update_time > "2012-04-21T11:30:00-04:00"`. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Ordering expression for sorting the results. + # See https://google.aip.dev/132#ordering for more details. + # If no value is present the default ordering is unspecified. + # Only supports ordering by: + # + # * `update_time` + class ListPrivateOffersRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for response to listing PrivateOffers + # @!attribute [rw] private_offers + # @return [::Array<::Google::Cloud::CommerceProducer::V1beta::PrivateOffer>] + # The list of PrivateOffer + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListPrivateOffersResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for getting a PrivateOffer + # @!attribute [rw] name + # @return [::String] + # Required. Name of the resource + # @!attribute [rw] view + # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOfferView] + # Optional. The view of the PrivateOffer to return. + # If unspecified, the default view is BASIC. + class GetPrivateOfferRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for resolving an amended offer. + # @!attribute [rw] parent + # @return [::String] + # Required. Parent value for ResolveAmendmentTargetRequest + # @!attribute [rw] target_billing_account + # @return [::String] + # Required. The customer's billing account targeted by the offer. This is the + # billing account for which the new private offer will be created on. Format: + # billingAccounts/\\{billing_account}. + # @!attribute [rw] base_standard_offer + # @return [::String] + # Required. The base standard offer that the private offer will be based on. + # Format: + # projects/\\{project}/locations/\\{location}/services/\\{service}/standardOffers/\\{standard_offer}. + class ResolveAmendmentTargetRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message in response to ResolveAmendmentTarget. + # @!attribute [rw] required_private_offer + # @return [::String] + # The resource name of an existing private offer that MUST be amended. + # + # If this is set, the new private offer the client creates must populate + # the `single_product_offer.amended_private_offer` field with this value. + # + # Note: The following fields are mutually exclusive: `required_private_offer`, `required_standard_offer`, `optional_offers`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] required_standard_offer + # @return [::String] + # The resource name of an existing standard offer that MUST be amended. + # + # If this is set, the new private offer the client creates must populate + # the `single_product_offer.amended_standard_offer` field with this value. + # + # Note: The following fields are mutually exclusive: `required_standard_offer`, `required_private_offer`, `optional_offers`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] optional_offers + # @return [::Google::Cloud::CommerceProducer::V1beta::ResolveAmendmentTargetResponse::OptionalOffers] + # A list of existing offers that may optionally be amended. + # + # Note: The following fields are mutually exclusive: `optional_offers`, `required_private_offer`, `required_standard_offer`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class ResolveAmendmentTargetResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A wrapper message containing offers that can optionally be amended. + # @!attribute [rw] private_offers + # @return [::Array<::String>] + # A list of existing private offers that are eligible to be amended. + # + # When creating a new private offer, the client may choose to populate the + # `single_product_offer.amended_private_offer` field with one of these + # resource names. Alternatively, the client may leave the field unset to + # create a brand new offer. + class OptionalOffers + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Message for creating a PrivateOffer + # @!attribute [rw] parent + # @return [::String] + # Required. Value for parent. + # @!attribute [rw] private_offer + # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer] + # Required. The resource being created + class CreatePrivateOfferRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for updating a PrivateOffer + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. The list of fields to update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. + # The special value "*" means full replacement. + # If unspecified, all fields present in the request will be overwritten. + # @!attribute [rw] private_offer + # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer] + # Required. The resource being updated + class UpdatePrivateOfferRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for publishing a PrivateOffer + # @!attribute [rw] name + # @return [::String] + # Required. Name of the resource + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set to `true`, validates the request but does not execute it. + class PublishPrivateOfferRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for cancelling a PrivateOffer + # @!attribute [rw] name + # @return [::String] + # Required. Name of the resource + # @!attribute [rw] cancellation_note + # @return [::String] + # Optional. Internal note relating to the cancellation. + # Stored on the cancelled offer. Not visible to customers. + class CancelPrivateOfferRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for deleting a PrivateOffer + # @!attribute [rw] name + # @return [::String] + # Required. Name of the resource + # @!attribute [rw] force + # @return [::Boolean] + # Optional. Indicates whether to cascade the delete to child resources. + # If false, the request fails if child resources exist. + class DeletePrivateOfferRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for requesting list of PrivateOfferDocuments + # @!attribute [rw] parent + # @return [::String] + # Required. Parent value for ListPrivateOfferDocumentsRequest. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Maximum results to return. The service may return fewer than this + # value. The maximum value is 500; values above 500 will be coerced to 500. + # If unspecified, the server will default to the maximum. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous list response message. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters of the list request must match the + # request that returned the page token. + class ListPrivateOfferDocumentsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for response to listing PrivateOfferDocuments + # @!attribute [rw] private_offer_documents + # @return [::Array<::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument>] + # The list of PrivateOfferDocuments. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListPrivateOfferDocumentsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for getting a PrivateOfferDocument + # @!attribute [rw] name + # @return [::String] + # Required. Name of the resource. + class GetPrivateOfferDocumentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for creating a PrivateOfferDocument. + # @!attribute [rw] parent + # @return [::String] + # Required. Value for parent. + # @!attribute [rw] private_offer_document + # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument] + # Required. The resource being created. + class CreatePrivateOfferDocumentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for updating a PrivateOfferDocument + # @!attribute [rw] private_offer_document + # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument] + # Required. The resource being updated. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. The list of fields to update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. + # The special value "*" means full replacement. + # If unspecified, all fields present in the request will be overwritten. + class UpdatePrivateOfferDocumentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for deleting a PrivateOfferDocument + # @!attribute [rw] name + # @return [::String] + # Required. Name of the resource. + class DeletePrivateOfferDocumentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for requesting list of Services + # @!attribute [rw] parent + # @return [::String] + # Required. Parent value for ListServicesRequest + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Maximum results to return. The service may return fewer than this + # value. The maximum value is 500; values above 500 will be coerced to 500. + # If unspecified, the server will default to the maximum. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token identifying a page of results the server should return. + class ListServicesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for response to listing Services + # @!attribute [rw] services + # @return [::Array<::Google::Cloud::CommerceProducer::V1beta::Service>] + # The list of Service + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListServicesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for getting a Service + # @!attribute [rw] name + # @return [::String] + # Required. Name of the resource + # @!attribute [rw] view + # @return [::Google::Cloud::CommerceProducer::V1beta::ServiceView] + # Optional. The view of the Service to return. + # If unspecified, the default view is BASIC. + class GetServiceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for requesting list of StandardOffers + # @!attribute [rw] parent + # @return [::String] + # Required. Parent value for ListStandardOffersRequest + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Maximum results to return. The service may return fewer than this + # value. The maximum value is 500; values above 500 will be coerced to 500. + # If unspecified, the server will default to the maximum. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous list response message. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters of the list request must match the + # request that returned the page token. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filter expression that matches a subset of resources to show. + # See https://google.aip.dev/160 for more details. + # Supports filtering by: + # + # * `effective_time`. + # Example: `effective_time > "2012-04-21T11:30:00-04:00"`. + # * `expire_time`. Example: `expire_time < "2026-05-06T00:00:00Z"`. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Ordering expression for sorting the results. + # See https://google.aip.dev/132#ordering for more details. + # If no value is present the default ordering is unspecified. + # Supports ordering by: + # + # * `effective_time` + # * `expire_time` + class ListStandardOffersRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for response to listing StandardOffers + # @!attribute [rw] standard_offers + # @return [::Array<::Google::Cloud::CommerceProducer::V1beta::StandardOffer>] + # The list of StandardOffer + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListStandardOffersResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for getting a StandardOffer + # @!attribute [rw] name + # @return [::String] + # Required. Name of the resource + # @!attribute [rw] view + # @return [::Google::Cloud::CommerceProducer::V1beta::StandardOfferView] + # Optional. The view of the StandardOffer to return. + # If unspecified, the default view is BASIC. + class GetStandardOfferRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for requesting list of Skus + # @!attribute [rw] parent + # @return [::String] + # Required. Parent value for ListSkusRequest + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Maximum results to return. The service may return fewer than this + # value. The maximum value is 500; values above 500 will be coerced to 500. + # If unspecified, the server will default to the maximum. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous list response message. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters of the list request must match the + # request that returned the page token. + class ListSkusRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for response to listing Skus + # @!attribute [rw] skus + # @return [::Array<::Google::Cloud::CommerceProducer::V1beta::Sku>] + # The list of Sku + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListSkusResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for getting a Sku + # @!attribute [rw] name + # @return [::String] + # Required. Name of the resource + class GetSkuRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for getting a SkuGroup + # @!attribute [rw] name + # @return [::String] + # Required. Name of the resource + class GetSkuGroupRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for requesting list of SkuGroups + # @!attribute [rw] parent + # @return [::String] + # Required. Parent value for ListSkuGroupsRequest + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Maximum results to return. The service may return fewer than this + # value. The maximum value is 500; values above 500 will be coerced to 500. + # If unspecified, the server will default to the maximum. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous list response message. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters of the list request must match the + # request that returned the page token. + class ListSkuGroupsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for response to listing SkuGroups + # @!attribute [rw] sku_groups + # @return [::Array<::Google::Cloud::CommerceProducer::V1beta::SkuGroup>] + # The list of SkuGroup + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + class ListSkuGroupsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Controls which fields are returned in a PrivateOffer returned by the API. + # https://google.aip.dev/157 + module PrivateOfferView + # The default / unset value. + # The API will default to the BASIC view. + PRIVATE_OFFER_VIEW_UNSPECIFIED = 0 + + # Include basic metadata about the PrivateOffer, but not the full contents. + # This is the default value (for both List and Get requests). + PRIVATE_OFFER_VIEW_BASIC = 1 + + # Include everything. + PRIVATE_OFFER_VIEW_FULL = 2 + end + + # Controls which fields are returned in a StandardOffer returned by the API. + # https://google.aip.dev/157 + module StandardOfferView + # The default / unset value. + # The API will default to the BASIC view. + STANDARD_OFFER_VIEW_UNSPECIFIED = 0 + + # Include basic metadata about the StandardOffer, but not the full contents. + # This is the default value (for both List and Get requests). + STANDARD_OFFER_VIEW_BASIC = 1 + + # Include everything. + STANDARD_OFFER_VIEW_FULL = 2 + end + + # Controls which fields are returned in a Service returned by the API. + # https://google.aip.dev/157 + module ServiceView + # The default / unset value. + # The API will default to the BASIC view. + SERVICE_VIEW_UNSPECIFIED = 0 + + # Include basic metadata about the Service, but not the full contents. + # This is the default value (for both List and Get requests). + SERVICE_VIEW_BASIC = 1 + + # Include everything. + SERVICE_VIEW_FULL = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/cloud/commerceproducer/v1beta/private_offer.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/cloud/commerceproducer/v1beta/private_offer.rb new file mode 100644 index 000000000000..87b0eb5b580b --- /dev/null +++ b/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/cloud/commerceproducer/v1beta/private_offer.rb @@ -0,0 +1,1189 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module CommerceProducer + module V1beta + # Message describing PrivateOffer resource. + # + # Note on OPTIONAL fields: To facilitate saving incomplete draft offers, most + # fields are categorized as OPTIONAL irrespective of whether they are necessary + # for a private offer to be valid. Many fields labeled OPTIONAL must be set to + # publish the offer. + # @!attribute [rw] single_product_offer + # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer::SingleProductOffer] + # Optional. Configurations for the offer that is associated with a single + # product. + # @!attribute [rw] name + # @return [::String] + # Identifier. Name of the resource. + # @!attribute [r] state + # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer::State] + # Output only. The state of the private offer. + # @!attribute [r] publish_requirement_google_review + # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer::PublishRequirementGoogleReview] + # Output only. Information about the Google review process. + # Present only when the offer is determined to require review by Google. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The creation time. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The last update time. + # @!attribute [r] publish_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the offer transitioned to PUBLISHED state. + # @!attribute [r] accept_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the offer transitioned to ACCEPTED state. + # @!attribute [r] cancel_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the offer transited to CANCELLED state. + # @!attribute [r] end_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the offer ended. This can only be set for offers + # with `ENDED` state. + # @!attribute [r] cancellation_note + # @return [::String] + # Output only. Internal note supplied when the offer was cancelled. + # Present only for cancelled offers and only if a note was supplied. + # @!attribute [r] reseller_contact + # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer::ResellerContact] + # Output only. Information about the reseller contact. + # Present only for offers created by a reseller. + # @!attribute [rw] internal_note + # @return [::String] + # Optional. Unstructured text content that is not visible to the customer. + # Intended to be used by partners for storing notes about the private offer. + # Maximum length: 1500 characters. + # @!attribute [rw] offer_deal_type + # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer::OfferDealType] + # Optional. The type of the deal transacted with the offer. + # + # The deal type is not visible to customers. + # + # Must be present to publish the offer. + # @!attribute [rw] title + # @return [::String] + # Optional. A title that describes the offer and helps your customers + # identify it. This title will be visible to the customer. Maximum length: + # 256 characters. Must be present to publish the offer. + # @!attribute [rw] customer_note + # @return [::String] + # Optional. Unstructured text content that is visible to the customer. + # Maximum length: 120 characters. + # @!attribute [rw] partner_contact + # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer::PartnerContact] + # Optional. Information about the partner contact. + # Must be provided when publishing the offer. + # @!attribute [rw] customer + # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer::Customer] + # Optional. Information identifying the intended recipient of the offer. + # Must be provided when publishing the offer. + # @!attribute [rw] accept_deadline_time + # @return [::Google::Type::DateTime] + # Optional. Deadline for acceptance of published offers. + # A published offer not accepted by this time will expire. + # Only day boundaries in the America/Los_Angeles time zone are supported. + # Must be present to publish the offer. + # + # When publishing an offer the deadline must be set to a time in the future + # not more than 3 months from the time of publishing. For example, if the + # offer is published on 03/05 at 1PM, then the deadline must be at or before + # 06/05 12AM America/Los_Angeles time. + # + # The deadline must also be: + # + # * Before or equal to the scheduled start time of this offer (if + # `term.scheduled_start_time` is set and the term's start policy is + # `SCHEDULED_START_TIME`). + # * Before or equal to the scheduled end time of this offer, if + # `term.scheduled_end_time` is set and the term's end policy is + # `SCHEDULED_END_TIME`. + # * Before or equal to the upcoming installment start times on this offer. + # * Before or equal to the amended offer's end time, if the offer amends + # another private or standard offer. + # * Before or equal to the start time of the next pending installment of the + # amended offer, if amending a private offer with custom installments. For + # example, if the amended offer has installments on 01/01, 02/01, 03/01, + # 04/01, and today is 02/15, then this offer's `accept_deadline_time` + # must be at or before 03/01. + # + # In addition, if the offer amends another private offer, but there is + # already an accepted upcoming amendment against that private offer, then + # this deadline must be before or equal to the start time of the accepted + # upcoming offer. + # For example, today is 02/15, and this offer (offer C) amends private offer + # A, and private offer B has already been accepted which also amends private + # offer A. Private offer B has a start time of 03/01. Then this deadline + # must be at or before 03/01. Otherwise, on 03/01, private offer B would + # take effect, superseding offer A. This would mean offer C is no longer + # amending the currently active offer (Offer A), which is required for + # valid amendments. + # + # Once the offer is published, this field is still updatable to extend the + # deadline of the offer. However, the extension is still limited to be + # at most 3 months from the time of publishing. + # @!attribute [rw] term + # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer::Term] + # Optional. Configuration for the offer term. + # Must be set when publishing the offer. + class PrivateOffer + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Information about the Google review process. + # @!attribute [r] review_approve_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The approval time of the Google review process. + class PublishRequirementGoogleReview + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Contact information for a reseller. + # @!attribute [r] contact + # @return [::String] + # Output only. The name of the reseller contact for this offer. + # @!attribute [r] email + # @return [::String] + # Output only. The email of the reseller contact for this offer. + class ResellerContact + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Contact information for the partner representative. + # @!attribute [rw] contact + # @return [::String] + # Optional. Display text identifying the partner sales contact. + # Displayed to the customer. + # Must be provided when publishing the offer. + # Maximum length: 256 characters. + # @!attribute [rw] email + # @return [::String] + # Optional. The email address of the partner sales contact. + # Displayed to the customer. + # The format of the provided email address is validated when publishing the + # offer, but no verification is performed that the email address actually + # exists, accepts email, or is otherwise functional. + class PartnerContact + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Information about the customer. + # @!attribute [rw] entity_title + # @return [::String] + # Optional. A string identifying the customer's entity (for example, the + # customer's organization or company name). Must be provided when + # publishing the offer. Maximum length: 256 characters. + # @!attribute [rw] contact + # @return [::String] + # Optional. A string identifying the customer contact. + # Must be provided when publishing the offer. + # Maximum length: 256 characters. + # @!attribute [rw] email + # @return [::String] + # Optional. Email of customer contact. + # If provided, it must be a well-formed email address. + # @!attribute [r] address + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Output only. Legal address of the customer organization. + # This field can no longer be set, but it is preserved to return the + # data from existing offers where address is set. + # @!attribute [rw] target_billing_account + # @return [::String] + # Optional. The customer's billing account targeted by the offer. + # The private offer once published can be accepted by a billing + # administrator of the target billing account. If the customer accepts the + # offer and later moves the resulting order to a new billing account, this + # field will continue to reflect the original billing account to which the + # private offer was extended. Must be provided when publishing the offer. + # + # To publish this private offer: + # + # * The billing account must exist. + # * The billing account must not be in a free trial. + # * The billing account must comply with Marketplace Reselling Policies. + # * Reseller parent billing accounts are prohibited. Reseller subaccounts + # are prohibited unless the service is enabled for reselling. + # + # Format: billingAccounts/012345-567890-ABCDEF + class Customer + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configurations for the offer term and renewal options. + # Extending a private offer to a customer that covers a given term + # constitutes a guarantee to the customer that the product will remain + # available to them for the duration of the term. + # @!attribute [rw] duration_months + # @return [::Integer] + # Optional. Duration in months of the offer term. + # The offer will end on the same day of the month after this duration. If + # that date is not available, the offer will end on the last day of the + # month. For example, if the offer starts on 01/31/2024 and the duration + # is 13 months, the offer will end on 02/28/2025. + # Must be set to publish the offer if the end policy is `AFTER_DURATION` + # or `MATCH_AMENDED_OFFER`, and must be a positive value. + # + # The maximum possible offer duration, including all renewal terms, + # cannot exceed 7 years. For example, if `duration_months` is 9 and + # `term.max_renewal_count` is 9, then the maximum possible offer duration + # is 90 months and exceeds the 7 year limit. + # + # Note: The following fields are mutually exclusive: `duration_months`, `scheduled_end_time`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] scheduled_end_time + # @return [::Google::Type::DateTime] + # Optional. Specified end time of the offer. + # Must be set to publish the offer if the end policy is + # `SCHEDULED_END_TIME`. + # When set, the time must be in the future and at a day boundary in the + # America/Los_Angeles time zone, and must be after + # `term.scheduled_start_time` if applicable. + # + # Note: The following fields are mutually exclusive: `scheduled_end_time`, `duration_months`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] max_renewal_count + # @return [::Integer] + # Optional. The max number of renewals allowed, after the initial term + # ends. This field is only relevant to standard interval offers with + # interval of 'MONTHLY_PRORATED', 'MONTHLY_NOT_PRORATED', + # 'QUARTERLY_NOT_PRORATED' or 'YEARLY_NOT_PRORATED'. Other types of + # offers cannot be renewed. + # + # For example, if the initial term is 1 year and the max renewals is 3, + # the customer can renew the offer for up to 3 additional years after the + # initial term ends. Customers control whether they renew the offer. + # + # Allowing a customer to renew an offer does not constitute a guarantee + # to the customer that the offered product will still be available to be + # renewed at the renewal date. + # + # An offer with a max renewal count of 0 cannot be renewed. + # Must be non-negative. + # + # Note: The following fields are mutually exclusive: `max_renewal_count`, `unlimited_renewal`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] unlimited_renewal + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Boolean] + # Output only. Deprecated: This field can only be true on existing offers + # with standard interval of 'MONTHLY_POSTPAY'. As of May 2024, we no + # longer allow unlimited renewals. + # + # Note: The following fields are mutually exclusive: `unlimited_renewal`, `max_renewal_count`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] start_policy + # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer::Term::StartPolicy] + # Optional. Defines when the resulting order should start. + # Must be set when publishing the offer. + # @!attribute [rw] scheduled_start_time + # @return [::Google::Type::DateTime] + # Optional. The scheduled start time of the offer. Cannot exceed one year + # from the time of publish. + # + # If the start policy is `SCHEDULED_START_TIME`, a future time at a day + # boundary in the America/Los_Angeles time zone must be provided when + # publishing the offer. + # + # If the offer amends another private or standard offer, then the + # scheduled start time must be: + # + # * Before or equal to the amended offer's end time if the offer's + # end policy is not MATCH_AMENDED_OFFER. Otherwise, it has to be + # strictly before the amended offer's end time. + # * Before or equal to the start time of the next pending installment of + # the amended offer, if amending a private offer with custom + # installments. For example, if the amended offer has installments on + # 01/01, 02/01, 03/01, 04/01, and today is 02/15, then the new offer's + # `scheduled_start_time` must be at or before 03/01. + # @!attribute [rw] end_policy + # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer::Term::EndPolicy] + # Optional. Defines when an offer should end. + # Must be set when publishing the offer. + # @!attribute [r] effective_term_end_time + # @return [::Google::Type::DateTime] + # Output only. The expected end time of the current offer term. + # + # At the end of each offer term, an offer associated with an active + # order will either renew or end. When an offer renews, a new term begins + # and this value changes to reflect the end time of the new term. + # When an offer ends this value is no longer set and instead `end_time` is + # set. + # + # When the term of an offer ends and the offer does not renew, the + # associated order also ends if the base standard offer has a + # subscription price model. Otherwise, the associated order does not end + # and remains active. + # + # Not included for PRIVATE_OFFER_VIEW_BASIC. + # Included for PRIVATE_OFFER_VIEW_FULL when the offer has not ended and + # either the offer has started or the value can be derived from other + # fields. + # + # For offers that have not started, this field is set when one of the + # following conditions is true. + # + # * The offer sets `term.scheduled_end_time`. + # * The offer sets `term.scheduled_start_time` and `term.duration_months`, + # the offer's `term.end_policy` is not `MATCH_AMENDED_OFFER`, and the + # offer does not have standard_interval set to `MONTHLY_POSTPAY`. + class Term + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Defines when an offer should start. + module StartPolicy + # Default value. This value is unused. + START_POLICY_UNSPECIFIED = 0 + + # The resulting order starts immediately upon the customer's acceptance + # of the offer, if no partner approval is required, or else immediately + # after the partner approves the purchase if order approval is required. + # This enum value cannot be combined with `term.scheduled_start_time`. + IMMEDIATE = 1 + + # The resulting order starts at the scheduled start time. + SCHEDULED_START_TIME = 2 + end + + # Defines when an offer should end. + module EndPolicy + # Default value. This value is unused. + END_POLICY_UNSPECIFIED = 0 + + # Offer ends after the specified duration. + # If this is set, then `duration_months` must be positive. + AFTER_DURATION = 1 + + # Offer ends at the schduled time. + SCHEDULED_END_TIME = 2 + + # Offer coterms to the amended offer - the offer ends at the end of the + # amended offer's term + # + # For example, if the amended offer starts on 01/15/24, and has a + # duration of 6 months, then it ends on 07/15/24. If the current offer + # coterms to the previous offer, and the current offer starts on + # 05/06/24, then it will still end on 07/15/24. Assuming the current + # offer renews 3 times, then the terms on the current offer will be: + # + # 1. 05/06/24 - 07/15/24 (First term, ends on 07/15 to coterm with the + # amended offer) + # 2. 07/15/24 - 01/15/25 (First renewal term) + # 3. 01/15/25 - 07/15/25 (Second renewal term) + # 4. 07/15/25 - 01/15/26 (Third renewal term) + # + # As a contrast, if the current offer does not coterm with the amended + # offer (such as when `end_policy` is `AFTER_DURATION`), then the + # terms will be: + # + # 1. 05/06/24 - 11/06/24 (First term, ends on 11/06, no coterming) + # 2. 11/06/24 - 05/06/25 (First renewal term) + # 3. 05/06/25 - 11/06/25 (Second renewal term) + # 4. 11/06/25 - 05/06/26 (Third renewal term) + # + # If this is set, then the following conditions must be met: + # + # * `single_product_offer.amended_private_offer` must be set, and the + # amended private offer must not be ended. + # * The proration policy must not change (e.g., you cannot switch + # between `MONTHLY_PRORATED` and `MONTHLY_NOT_PRORATED`). + # * The current offer must not have custom intervals (where + # `custom_interval_price` is set). + # * `term.duration_months` must match the amended private offer's + # duration. + # * The amended private offer must not have a standard interval + # of `MONTHLY_POSTPAY`. + # + # This is currently not supported. + MATCH_AMENDED_OFFER = 3 + end + end + + # Configurations for the offer that is associated with a single product. + # @!attribute [rw] amended_private_offer + # @return [::String] + # Optional. An existing private offer that will be superseded by this + # offer. Unless the private offer is for a product type that supports + # [multiple active + # orders](https://cloud.google.com/marketplace/docs/partners/offers/multiple-offers), + # an amendment private offer must be transacted if and only if the + # destination customer billing account already contains an active order + # for the same product. The offer to be superseded must be the offer + # associated with an active order. + # + # Amendments generally fall into one of two scenarios: + # + # 1. **Active Order / Ended Offer**: The term of the amended offer has + # ended but it is still associated with an active order. The new + # offer must amend the ended private offer. + # 2. **Active Order / Active Offer**: The term of the amended offer is + # still active and the associated order is active. Similar to above, + # the new offer must amend the currently active offer (unless + # "multiple active orders" are supported). + # + # If this is set, then the `base_standard_offer` parent service must + # match the parent service of the `base_standard_offer` in the + # `amended_private_offer`. + # + # **Active Term Restrictions**: + # If the term of the amended private offer has *NOT* ended, then the + # following compatibility rules apply: + # + # * **Price Model Compatibility**: + # * Flat Fee (with or without usage) offers can amend Flat Fee + # offers. + # * Usage-only or CUD offers can amend usage-only offers. + # * Commitment-based offers must amend offers of the same price + # model subtype (e.g., "additional usage at list price" vs "all + # usage discounted"). + # * **Billing Frequency Compatibility**: Determined by + # `standard_interval` or `custom_interval_price`. + # * If the amended offer has a custom billing frequency, the new + # offer must also have a custom frequency. + # * If the amended offer has a standard frequency (Monthly, + # Quarterly, or Yearly), the new offer must maintain the same + # frequency or transition to a custom frequency. + # * Switching between different standard frequencies (e.g., Monthly + # to Quarterly) is not supported. + # * For Monthly frequency, switching between `MONTHLY_PRORATED` + # and `MONTHLY_NOT_PRORATED` is supported, unless the offer's + # `term.end_policy` is `MATCH_AMENDED_OFFER`. + # * For usage-only offers, there are no billing frequency + # restrictions. + # + # Other criteria for offer amendment are detailed elsewhere. + # + # Note: The following fields are mutually exclusive: `amended_private_offer`, `amended_standard_offer`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] amended_standard_offer + # @return [::String] + # Optional. An existing standard offer that will be superseded by this + # offer. An amendment private offer must be transacted if the destination + # customer billing account already contains an active order for the same + # product, and otherwise cannot be transacted. The offer to be superseded + # must be the offer associated with the active order. + # + # If this is set, then the `base_standard_offer` must contain the same + # parent service as the parent service of the `amended_standard_offer`. + # The price model of this offer must be compatible with the price model + # of the `amended_standard_offer`: + # + # * Flat Fee, or Flat Fee with usage offers can amend Flat Fee or Flat + # Fee with usage standard offers. + # * Usage-only offers, or CUD offers can amend usage-only standard + # offers. + # + # Other criteria for offer amendment are detailed elsewhere. + # + # Note: The following fields are mutually exclusive: `amended_standard_offer`, `amended_private_offer`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] standard_interval_price + # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer::SingleProductOffer::StandardIntervalPrice] + # Optional. Price configurations for offers with standard intervals. + # A price must be set when publishing the offer. + # + # Note: The following fields are mutually exclusive: `standard_interval_price`, `custom_interval_price`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] custom_interval_price + # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer::SingleProductOffer::CustomIntervalPrice] + # Optional. Price configurations for offers with custom intervals. + # Custom interval corresponds to "custom billing frequency", + # see + # https://docs.cloud.google.com/marketplace/docs/partners/offers/select-payment-schedule. + # A price must be set when publishing the offer. + # + # Note: The following fields are mutually exclusive: `custom_interval_price`, `standard_interval_price`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] base_standard_offer + # @return [::String] + # Optional. The StandardOffer this PrivateOffer is based on. + # Must be in the same project as the private offer, and must be effective + # at the time of publishing. Must be present to publish the offer. + # + # Format: + # projects/\\{project}/locations/\\{location}/services/\\{service}/standardOffers/\\{standard_offer} + # @!attribute [r] service_level + # @return [::String] + # Output only. The service level (also known as the 'plan') of the base + # standard offer. The value is populated at publish time from the base + # standard offer. + # @!attribute [r] reseller_private_offer_plan_id + # @return [::String] + # Output only. Present for offers created by a reseller from a reseller + # private offer plan (RPOP). When set, contains the ID of the originating + # RPOP. Not included for `PRIVATE_OFFER_VIEW_BASIC`. + # @!attribute [rw] features + # @return [::Array<::Google::Cloud::CommerceProducer::V1beta::PrivateOffer::SingleProductOffer::Feature>] + # Optional. The custom product features to display for this offer. + # Feature `display_name` values must be unique to publish the offer. + # The set of features specified here should generally include all features + # included in the base service level, with optionally customized values, + # but is not required to match exactly and may include additional features. + # @!attribute [r] effective_installment_timeline + # @return [::Array<::Google::Cloud::CommerceProducer::V1beta::PrivateOffer::SingleProductOffer::Installment>] + # Output only. The effective installment timeline of the offer. + # Not included for `PRIVATE_OFFER_VIEW_BASIC`. + # Included for `PRIVATE_OFFER_VIEW_FULL` if all necessary information is + # available to generate the timeline, and if the offer has + # 'standard_interval_price' of 'MONTHLY_PRORATED', 'MONTHLY_NOT_PRORATED', + # 'QUARTERLY_NOT_PRORATED', or 'YEARLY_NOT_PRORATED'. + # @!attribute [r] contract_value + # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer::SingleProductOffer::ContractValue] + # Output only. Contract value of the offer. + # Not included for `PRIVATE_OFFER_VIEW_BASIC`. + # @!attribute [r] revenue_share + # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer::SingleProductOffer::RevenueShare] + # Output only. Revenue share information for this Private Offer. + # Not included for `PRIVATE_OFFER_VIEW_BASIC`. + # @!attribute [rw] additional_contract_value + # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer::SingleProductOffer::AdditionalContractValue] + # Optional. Additional contract value that the customer is legally + # obligated to spend on the product over the duration of the offer. + class SingleProductOffer + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Additional details used to describe customization of the service level. + # + # Features are used to distinguish service levels of the same product. + # When a product has a single service level, all details can be contained + # in the product documentation. When a product has multiple service levels, + # each service level can be assigned a distinct set of features to + # distinguish the key differences between the service levels. + # + # In addition to customizing pricing and other transaction details, a + # private offer may include customization of partner-managed product + # behavior. When this is the case, the details of the custom behavior are + # described using features. + # @!attribute [rw] display_name + # @return [::String] + # Optional. Human readable display text characterizing the feature. + # Should be sufficiently detailed to identify the feature, allowing + # features to be correlated across separate offers and service levels. + # Must be non-empty to publish the offer. + # The maximum allowed length is 128 characters. + # Allows characters from the following Unicode Property Classes: + # Letters, Numbers, Punctuation, Symbols, and Separators + # @!attribute [rw] value + # @return [::String] + # Optional. Human readable display text reflecting the value of the + # feature. Used for variable features not captured by the display_name + # alone. The maximum allowed length is 3000 characters. Allows characters + # from the following Unicode Property Classes: Letters, Numbers, + # Punctuation, Symbols, and Separators + class Feature + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The price model of the private offer. + # + # Private offers are referred to as having different kinds of price models + # based on the combination of fields set in the price model. The following + # terminology is used in documentation and other reference material. + # + # * Usage-based: the price model does not set `flat_fee` + # * Usage-only: the price model sets only `usage` + # * CUD (committed use discount): the price model sets `commitment` + # * Commitment discount with additional usage at list price: + # The price model sets `commitment` and not `usage`. + # * Commitment with all usage discounted: The price model sets + # `commitment` and `usage`. + # * Flat fee: the price model sets only `flat_fee` + # * Flat fee with usage: the price model sets `flat_fee` and `usage` + # + # See + # https://docs.cloud.google.com/marketplace/docs/partners/offers/select-pricing-model#CUD + # for the price models. + # @!attribute [rw] flat_fee + # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer::SingleProductOffer::PriceModel::FlatFee] + # Optional. The price configurations for the flat fee subscription. + # Must be unset when the base standard offer's price model does not + # include subscription SKUs. + # + # Note: The following fields are mutually exclusive: `flat_fee`, `commitment`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] commitment + # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer::SingleProductOffer::PriceModel::Commitment] + # Optional. The price configurations for the commitment based + # subscription. Must be unset when the base standard offer's price + # model includes subscription SKUs. + # + # Note: The following fields are mutually exclusive: `commitment`, `flat_fee`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] usage + # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer::SingleProductOffer::PriceModel::Usage] + # Optional. The price configurations for the usage part. + # If this field is set, the `Commitment.discount_percent` must be unset. + # A private offer can apply a discount to all usage or to a usage + # commitment, but not both. + # Must be unset when the base standard offer's price model includes no + # usage SKUs. + class PriceModel + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The discount for a specific SKU. + # @!attribute [rw] sku + # @return [::String] + # Optional. The name of a partner SKU from this API. + # + # Must refer to a SKU in the price model of the base standard offer. + # Inclusion in the base price model can occur either directly or + # indirectly via inclusion in an included SkuGroup. + # + # Currently, standard offer price models include only partner SKUs + # in the same project as the standard offer. This may change. + # + # Format: + # projects/\\{project}/locations/\\{location}/services/\\{service}/skus/\\{sku} + # + # Note: The following fields are mutually exclusive: `sku`, `cloud_billing_sku`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] cloud_billing_sku + # @return [::String] + # Optional. The name of a Google SKU from the Cloud Billing API. + # + # Used for partner products sold by Google, such as Premium Operating + # System Images sold for use in Compute Engine. This is not common. + # SKUs of this type are not present on this API and can instead be + # found on the Cloud Billing API or at https://cloud.google.com/skus. + # + # Must refer to a SKU in the price model of the base standard offer. + # Google SKUs are always referenced in standard offers via SkuGroups. + # + # Format: services/\\{service}/skus/\\{sku} + # + # Note: The following fields are mutually exclusive: `cloud_billing_sku`, `sku`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] discount_percent + # @return [::Google::Type::Decimal] + # Optional. The discount percent for the SKU. + # For example, `10` means a discount of 10%. If the original SKU + # price is $100/hour then the discounted price will be $90/hour. + # + # Must be between 0 and 100 inclusive, with precision up to 2 decimal + # places. If this field is set, then the allowed pattern for 'value' + # is `^([0-9]{1,2}(\\.\\d{1,2})?|100(\\.0{1,2})?)$`. + # + # Examples of valid values: "0", "100.0", "12.34", "40.0". + # Example of invalid values: ".3", "-1", "100.1", "12.345", "+12", + # and "". + # Must be present to publish the offer. + class SkuDiscount + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The price for the usage SKUs. + # @!attribute [rw] default_discount_percent + # @return [::Google::Type::Decimal] + # Optional. The default discount percent for usage SKUs. + # An unset default discount percent is equivalent to 0 (no discount). + # + # Must be between 0 and 100 inclusive, with precision up to 2 decimal + # places. If this field is set, then the allowed pattern for 'value' + # is `^([0-9]{1,2}(\\.\\d{1,2})?|100(\\.0{1,2})?)$`. + # Examples of valid values: "0", "100.0", "12.34", "40.0". + # Example of invalid values: ".3", "-1", "100.1", "12.345", "+12", "". + # @!attribute [rw] sku_discounts + # @return [::Array<::Google::Cloud::CommerceProducer::V1beta::PrivateOffer::SingleProductOffer::PriceModel::SkuDiscount>] + # Optional. The discounts for the specific SKUs that override the + # `default_discount_percent`. + class Usage + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The price configurations for the flat fee subscriptions. + # @!attribute [rw] flat_fee_override + # @return [::Google::Type::Money] + # Optional. Flat fee overriding the default flat fee in the base + # standard offer. Value cannot be negative. The currency must be "USD" + # and precision is limited to cents. Must be present to publish the + # offer, if the parent message is set. The maximum allowed value is + # 1,000,000,000 USD. + class FlatFee + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The price configurations for the commitment based subscriptions. + # @!attribute [rw] commitment_amount + # @return [::Google::Type::Money] + # Optional. The commitment balance that the customer will receive. + # Value cannot be negative. + # The currency must be "USD" and precision is limited to cents. + # Must be present to publish the offer, if the parent message is set. + # The maximum allowed value is 1,000,000,000 USD. + # + # If the current offer amends a private offer where the term has not + # ended, and if the field + # `single_product_offer.standard_interval_price.price_model.commitment.commitment_amount` + # is set on both the current offer and the amended private offer, then + # the commitment amount must be equal or higher on the current offer, + # compared to the amended private offer. + # @!attribute [rw] discount_percent + # @return [::Google::Type::Decimal] + # Optional. The discount percent on `commitment_amount`. + # + # For example, `10` means a discount of 10%. If the original + # `commitment_amount` is $100 then the discounted amount will be $90. + # The customer is charged $90 and receives $100 in credits. + # + # All reported usage will be charged at the standard price. + # If this field is set, the `price_model.usage` must be unset. A + # private offer can apply a discount to all usage or to a usage + # commitment, but not both. + # + # Must be between 0 and 100 inclusive, with precision up to 2 decimal + # places. If this field is set, then the allowed pattern for 'value' + # is `^([0-9]{1,2}(\\.\\d{1,2})?|100(\\.0{1,2})?)$`. + # Examples of valid values: "0", "100.0", "12.34", "40.0". + # Example of invalid values: ".3", "-1", "100.1", "12.345", "+12", "". + # + # Must be present to publish the offer. + # @!attribute [rw] additional_credit + # @return [::Google::Type::Money] + # Optional. Additional credit granted to the customer. + # Additional credits are only supported for custom interval offers. + # Equivalent behavior can be achieved for standard interval offers by + # varying the `commitment_amount` and `discount_percent`. + # + # Value cannot be negative. + # The currency must be "USD" and precision is limited to cents. + # The maximum allowed value is 1,000,000 USD. + # @!attribute [rw] discard_previous_credit_balance + # @return [::Boolean] + # Optional. Whether to discard the previous credit balance when the + # associated installment starts. If not set, the previous credit + # balance will be rolled over to the current installment. + # + # If there are no previous installments, then the value of this field + # will not matter - since it has no effect when no credits exist. + class Commitment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Price configurations for offers with standard intervals. + # @!attribute [rw] standard_interval + # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer::SingleProductOffer::StandardIntervalPrice::StandardInterval] + # Optional. The standard interval of the offer. + # Must be present to publish unless the price model is usage-only. + # @!attribute [rw] price_model + # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer::SingleProductOffer::PriceModel] + # Optional. The price model of the offer. + # Must be present to publish the offer. + class StandardIntervalPrice + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The options for offers with standard intervals. + module StandardInterval + # The private offer does not have an interval. + # If this is set, then the offer is "usage-only". + # Field `term.duration_months` must be positive. + STANDARD_INTERVAL_UNSPECIFIED = 0 + + # The schedule of the monthly postpay offers. + # This type of offer has "Monthly" billing frequency (see + # https://docs.cloud.google.com/marketplace/docs/partners/offers/select-payment-schedule). + # No longer supported as of May 2024. Cannot be used to publish + # new offers. + MONTHLY_POSTPAY = 1 + + # Monthly installments with proration. + # This type of offer has "Monthly" billing frequency (see + # https://docs.cloud.google.com/marketplace/docs/partners/offers/select-payment-schedule). + # For example, if the offer starts on 04/15, and the offer duration is + # 3 months, the following installments will be created: + # # 1: from 04/15 to 05/01, at the prorated price for April. + # + # # 2: from 05/01 to 06/01, at the full monthly price for May. + # + # # 3: from 06/01 to 07/01, at the full monthly price for June. + # + # # 4: from 07/01 to 07/15, at the prorated price for July. + # + # All dates represent the start of that day in the America/Los_Angeles + # time zone. + # + # If this is set: + # + # * The `PriceModel.subscription` oneof must be set. + # * Field `term.duration_months` must be positive. + MONTHLY_PRORATED = 2 + + # Monthly installments without proration. + # This type of offer has "Monthly" billing frequency (see + # https://docs.cloud.google.com/marketplace/docs/partners/offers/select-payment-schedule). + # For example, if the offer starts on 04/15, and the offer duration is + # 3 months, the following installments will be created: + # # 1: from 04/15 to 05/15, at the full monthly price. + # + # # 2: from 05/15 to 06/15, at the full monthly price. + # + # # 3: from 06/15 to 07/15, at the full monthly price. + # + # All dates represent the start of that day in the America/Los_Angeles + # time zone. + # + # If this is set: + # + # * The `PriceModel.subscription` oneof must be set. + # * Field `term.duration_months` must be positive. + MONTHLY_NOT_PRORATED = 3 + + # Quarterly installments which are not prorated. + # This type of offer has "Quarterly" billing frequency (see + # https://docs.cloud.google.com/marketplace/docs/partners/offers/select-payment-schedule). + # For example, if the offer starts on 01/15, and the offer duration is + # 3 quarters, the following installments will be created: + # # 1: from 01/15 to 04/15, at the full quarterly price. + # + # # 2: from 04/15 to 07/15, at the full quarterly price. + # + # # 3: from 07/15 to 10/15, at the full quarterly price. + # + # All dates represent the start of that day in the America/Los_Angeles + # time zone. + # + # If this is set: + # + # * The `PriceModel.subscription` oneof must be set. + # * Field `term.duration_months` must be positive. + QUARTERLY_NOT_PRORATED = 4 + + # Yearly installments which are not prorated. + # This type of offer has "Yearly" billing frequency (see + # https://docs.cloud.google.com/marketplace/docs/partners/offers/select-payment-schedule). + # For example, if the offer starts on 01/15/2025, and the offer + # duration is 3 years, the following installments will be created: + # # 1: from 01/15/2025 to 01/15/2026, at the full yearly price. + # + # # 2: from 01/15/2026 to 01/15/2027, at the full yearly price. + # + # # 3: from 01/15/2027 to 01/15/2028, at the full yearly price. + # + # All dates represent the start of that day in the America/Los_Angeles + # time zone. + # + # If this is set: + # + # * The `PriceModel.subscription` oneof must be set. + # * Field `term.duration_months` must be positive. + YEARLY_NOT_PRORATED = 5 + end + end + + # An installment of the offer. + # @!attribute [rw] start_time + # @return [::Google::Type::DateTime] + # Optional. The start time of the installment. + # Each installment must have a unique start time with one exception: + # When the `term.start_policy` of the offer's term is `IMMEDIATE`, + # the `start_time` of the first installment must be unset. + # The actual start time is not recorded in the offer and instead is + # determined by the time the resulting order became active. + # + # When the `term.start_policy` of the offer's term is + # `SCHEDULED_START_TIME`, then the first installment's `start_time` must + # match `term.scheduled_start_time`. + # + # If the `term.end_policy` of the offer's term is `SCHEDULED_END_TIME`, + # then installment `start_time` must be before `term.scheduled_end_time`. + # If it's `AFTER_DURATION`, then installment `start_time` must be before + # the time calculated by adding the `term.duration_months` to + # the start time of the offer. + # + # The `start_time` of the installments cannot be before the + # `accept_deadline_time` of the offer. + # + # Installment start times must be in strictly increasing chronological + # order. + # @!attribute [rw] price_model + # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer::SingleProductOffer::PriceModel] + # Optional. The price model of the installment. + # All installments must have the same form of price model. + class Installment + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Price configurations for offers with custom intervals. + # @!attribute [rw] installments + # @return [::Array<::Google::Cloud::CommerceProducer::V1beta::PrivateOffer::SingleProductOffer::Installment>] + # Optional. The installments that make up the installment timeline. + # All installments must have the same form of price model (e.g. + # all commitment, or all flat fee). A subscription must be present + # under the price model for every installment. + # + # Must contain at least one installment to publish the offer. + class CustomIntervalPrice + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The contract value of the offer. + # @!attribute [r] total_contract_value + # @return [::Google::Type::Money] + # Output only. The total contract value of the offer. + # This will be set for all non-draft private offers, as long as + # 'PRIVATE_OFFER_VIEW_FULL' is requested. For DRAFT private offers, + # this will be populated only when the end user's billing account is + # set and when the pricing and term configuration is sufficiently + # complete to allow for a calculation. + class ContractValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Revenue Share information for a Private Offer. + # For more details about the revenue share, including how the value is + # determined, see + # https://docs.cloud.google.com/marketplace/docs/partners/revenue-share-scenarios. + # + # Not included for `PRIVATE_OFFER_VIEW_BASIC`, or for DRAFT private offers. + # + # For non-draft private offers, these fields are populated based on the + # following: + # + # * Offers published after April 20, 2025 will always have revenue + # share fields populated. + # * Offers published on or before April 20, 2025 will only have revenue + # share fields populated if they were associated with an active, + # unexpired order on that date. + # @!attribute [r] current_term_vendor_net_revenue_percent + # @return [::Google::Type::Decimal] + # Output only. The revenue share currently in effect. + # + # The range of the value is between 0 and 100. For example, 80 + # means the Vendor's current term revenue share is 80%. The vendor + # will keep 80% of the revenue. + # . + # @!attribute [r] renewal_term_vendor_net_revenue_percent + # @return [::Google::Type::Decimal] + # Output only. The expected revenue share for the renewal term. + # Not included if the offer does not have renewal terms. + # + # The range of the value is between 0 and 100. For example, 80 + # means the Vendor's current term revenue share is 80%. The vendor + # will keep 80% of the revenue after renewal. + # . + class RevenueShare + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Additional contract value that represents a spend obligation or target + # contract value tracked out-of-band by the partner. + # @!attribute [rw] contract_value + # @return [::Google::Type::Money] + # Optional. The absolute, cumulative contract value of the customer's + # spend obligation that is added on top of the automatically billed fees + # from Google. This amount is not automatically billed or invoiced by + # Google; instead, it is tracked as a legal spend guarantee to be met via + # usage reporting and manually trued-up by partners. + # + # The overall total contract value of the offer is calculated as the + # sum of Google-billed fees (from installments), plus this additional + # contract value. + # + # For amendments, this field must be set to the new cumulative + # additional total. + # + # For example: + # + # * Initial Offer: 3 installments of $15 (total $45 billed by Google) + # plus an `additional_contract_value` of $100 (billed by Partner, with + # true-ups happening at the end of the offer's term). + # The overall total contract value of the offer is $145 ($45 + $100). + # * Amended Offer: 6 installments of $15 (total $90 billed by Google) + # plus an `additional_contract_value` of $70 (billed by Partner, with + # true-ups happening at the end of the offer's term). + # The overall total contract value of the amended offer is $160 + # ($90 + $70). + # + # Must be non-negative. The maximum allowed value is 1,000,000,000 USD. + # @!attribute [rw] eligible_skus + # @return [::Array<::String>] + # Optional. The resource names of the SKUs whose tracked usage is + # eligible to contribute toward satisfying this additional contract value + # obligation. + # + # This list explicitly separates core spend obligations from exclusions + # like overage fees, which do not count toward meeting the customer's + # legal spend commitment. + # + # Must be non-empty for the offer to be published. + # + # Format: + # projects/\\{project}/locations/\\{location}/services/\\{service}/skus/\\{sku} + class AdditionalContractValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # State of an offer. + module State + # Default value. This value is unused. + STATE_UNSPECIFIED = 0 + + # The default state after creation when the offer can be edited. + # In all other states, the contents of the offer cannot be edited. + DRAFT = 1 + + # The offer is publishing. + # Publishing will complete when all publishing requirements are satisfied. + PUBLISHING = 2 + + # The offer has been published and is available to the customer to accept. + PUBLISHED = 3 + + # The offer has been accepted by the customer. + ACCEPTED = 4 + + # The offer was cancelled by the provider before it was transacted. + # Cancelled offers can no longer be accepted by the customer. + CANCELLED = 5 + + # The offer expired without being accepted by the customer. + # Expired offers can no longer be accepted by the customer. + EXPIRED = 6 + + # The offer has ended. + # + # Ended offers were accepted and active in the past, but have now reached + # the end of their term or have been terminated. + ENDED = 7 + end + + # The type of the deal transacted with the offer. The deal type of an offer + # is a factor in determining the offer's revenue share. + module OfferDealType + # Default value. This value is unused. + OFFER_DEAL_TYPE_UNSPECIFIED = 0 + + # The offer corresponds to a preexisting commercial arrangement for a + # workload on Google Cloud that is being transferred to the Cloud + # Marketplace. + CHANNEL_SHIFT = 1 + + # The offer corresponds to a preexisting commercial arrangement for a + # workload previously not on Google Cloud that is being transferred to + # Google Cloud. + MIGRATION = 2 + + # The offer corresponds to a renewal of a deal initially transacted on + # the Google Cloud Marketplace. + NATIVE_RENEWAL = 3 + + # The offer corresponds to a new deal transacted on the Google Cloud + # Marketplace. + # + # This value is not allowed if the offer amends another private offer + # where the term has not ended, and the amended private offer has a deal + # type of `MIGRATION`, `CHANNEL_SHIFT` or `NATIVE_RENEWAL`. + NEW = 4 + end + end + + # Message describing the PrivateOfferDocument resource. + # Used to attach documents to a private offer in state DRAFT. + # Once a private offer is no longer in state DRAFT, the set of child documents + # is immutable. Existing documents cannot be updated or deleted, and new + # documents cannot be added. + # + # A private offer must include a EULA, either by assigning a standard EULA + # or attaching a custom EULA document, or a statement of work document. + # @!attribute [rw] inline_content + # @return [::String] + # Optional. Byte content of an unstructured document. + # Max size: 4MB + # @!attribute [rw] name + # @return [::String] + # Identifier. Name of the resource. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The creation time of the resource. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The last update time of the resource. + # @!attribute [rw] document_type + # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument::DocumentType] + # Required. The classification type of the document. + # Used to distinguish between different types of documents that may be + # attached to a private offer for different business purposes. + # @!attribute [rw] mime_type + # @return [::String] + # Optional. The MIME type of the document. + # Used to distinguish between different document formats. + # Supported formats (which may be expanded in the future) + # + # - 'application/pdf' + class PrivateOfferDocument + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Supported types of documents. + # Additional document types may be added in future. Further editions of the + # Google Cloud Marketplace Standard EULA may be published in future, which + # may result in changes to the subset of Standard EULA versions permitted + # to be used in new offers. + module DocumentType + # The default / unset value. Do not use. + DOCUMENT_TYPE_UNSPECIFIED = 0 + + # The document is a custom EULA used in place of the standard product EULA. + # A private offer may not have more than one custom EULA document. + # + # If this enum value is set, then mime_type and inline_content must + # be set. + CUSTOM_END_USER_LICENSE_AGREEMENT = 1 + + # The document is the statement of work required by the [Cloud Marketplace + # Product Specific + # Terms](https://cloud.google.com/terms/marketplace-product-terms) for all + # Professional Services product private offers. + # This document type is not permitted for private offers of any other + # product type. + # A private offer may not have more than one statement of work document. + # + # The mime_type and inline_content fields must be set. + STATEMENT_OF_WORK = 2 + + # The document is the Marketplace standard EULA, with the following link: + # https://cloud.google.com/terms/marketplace/eula-standard-v1-12102020. + # Existing offers may have this document type, but this is not permitted + # for new offers. + STANDARD_END_USER_LICENSE_AGREEMENT_V1 = 3 + + # The document is the Marketplace standard EULA, with the following link: + # https://cloud.google.com/terms/marketplace/eula-standard-v2-01272021 + # + # New offers using Standard EULAs should set this enum value. This is not + # permitted for Professional Services products. + # + # The mime_type and inline_content fields must not be set. + STANDARD_END_USER_LICENSE_AGREEMENT_V2 = 4 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/cloud/commerceproducer/v1beta/service.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/cloud/commerceproducer/v1beta/service.rb new file mode 100644 index 000000000000..a3798605d979 --- /dev/null +++ b/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/cloud/commerceproducer/v1beta/service.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module CommerceProducer + module V1beta + # Message describing Service resource. + # @!attribute [rw] name + # @return [::String] + # Identifier. Name of resource. + # @!attribute [r] title + # @return [::String] + # Output only. Title of the service. + # + # Not included for `SERVICE_VIEW_BASIC`. + class Service + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/cloud/commerceproducer/v1beta/sku.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/cloud/commerceproducer/v1beta/sku.rb new file mode 100644 index 000000000000..fb1a88bd6527 --- /dev/null +++ b/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/cloud/commerceproducer/v1beta/sku.rb @@ -0,0 +1,794 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module CommerceProducer + module V1beta + # Message describing the Sku resource. + # + # Encapsulates and represents a stock keeping unit (SKU), the atomic unit of + # pricing and billing in Google Cloud. Each customer charge is associated with + # and originates from exactly one SKU. While the Cloud Marketplace Sku resource + # shares a close relationship with the public [Sku resource in the Cloud + # Billing + # API](https://cloud.google.com/billing/docs/how-to/get-pricing-information-api), + # Cloud Marketplace SKUs are represented here with additional information in + # an alternative format tailored for use by Cloud Marketplace partners, and are + # not necessarily public and by extension are not generally visible in the + # Cloud Billing API or the [Google Cloud Public + # SKUs](https://cloud.google.com/skus). + # + # Note on terminology: While the name of the resource derives from the acronym + # 'SKU' it is named 'Sku' for consistency with other resource type names, and + # may be rendered variously as 'Sku', 'sku', or 'SKU' across this and other + # documentation. + # @!attribute [r] name + # @return [::String] + # Output only. Identifier. Name of the SKU. + # @!attribute [r] description + # @return [::String] + # Output only. Description of the SKU. + # @!attribute [r] sku_price_timeline + # @return [::Array<::Google::Cloud::CommerceProducer::V1beta::Sku::SkuPrice>] + # Output only. Timeline of the SKU prices, in chronological order by + # `effective_time`. + # + # Each entry is active in the time range starting inclusively from the + # entry's `effective_time` and ending exclusively at the next entry's + # `effective_time`, if one exists, or else remaining active indefinitely if + # it is the final entry. The currently active entry is the entry with the + # latest `effective_time` that is in the past. Because of scheduled future + # price changes the currently active entry may not be the last entry in the + # timeline. A SKU does not necessarily have a currently active entry, as the + # SKU's first timeline entry may have an `effective_time` in the future. + class Sku + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The price of the SKU, active during a particular time range. + # Prices are in all cases in USD. Customers are billed in the currency of + # their billing account, subject to the currency conversion rate in effect + # at the time. + # @!attribute [r] inactive + # @return [::Google::Cloud::CommerceProducer::V1beta::Sku::SkuPrice::InactiveSkuPrice] + # Output only. The SKU has been disabled and has no price. + # SKUs, once created and allowed to go into effect, are never deleted. + # Disabled SKUs may accumulate over the lifetime of a product as the + # product's pricing evolves, and are retained for historical reference. + # A SKU in this state generally remains in this state indefinitely, but + # may be reactivated if needed. Clients must not depend on inactive SKUs + # remaining inactive. + # + # Note: The following fields are mutually exclusive: `inactive`, `managed_service_metric_usage_fee`, `gce_license_usage_fee`, `gke_pod_usage_fee`, `ai_platform_managed_model_usage_fee`, `ai_platform_provisioned_throughput_fee`, `ai_platform_deployed_model_usage_fee`, `flat_subscription_fee`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] managed_service_metric_usage_fee + # @return [::Google::Cloud::CommerceProducer::V1beta::Sku::SkuPrice::ManagedServiceMetricUsageFee] + # Output only. The SKU prices usage reported by the partner for a + # partner-defined custom billing metric. + # + # Note: The following fields are mutually exclusive: `managed_service_metric_usage_fee`, `inactive`, `gce_license_usage_fee`, `gke_pod_usage_fee`, `ai_platform_managed_model_usage_fee`, `ai_platform_provisioned_throughput_fee`, `ai_platform_deployed_model_usage_fee`, `flat_subscription_fee`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] gce_license_usage_fee + # @return [::Google::Cloud::CommerceProducer::V1beta::Sku::SkuPrice::ComputeEngineLicenseUsageFee] + # Output only. The SKU prices usage of a Compute Engine License via a + # license fee applied to running instances that use the license. + # + # Note: The following fields are mutually exclusive: `gce_license_usage_fee`, `inactive`, `managed_service_metric_usage_fee`, `gke_pod_usage_fee`, `ai_platform_managed_model_usage_fee`, `ai_platform_provisioned_throughput_fee`, `ai_platform_deployed_model_usage_fee`, `flat_subscription_fee`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] gke_pod_usage_fee + # @return [::Google::Cloud::CommerceProducer::V1beta::Sku::SkuPrice::KubernetesEnginePodUsageFee] + # Output only. The SKU prices usage of software deployed on Kubernetes + # Engine. + # + # Note: The following fields are mutually exclusive: `gke_pod_usage_fee`, `inactive`, `managed_service_metric_usage_fee`, `gce_license_usage_fee`, `ai_platform_managed_model_usage_fee`, `ai_platform_provisioned_throughput_fee`, `ai_platform_deployed_model_usage_fee`, `flat_subscription_fee`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] ai_platform_managed_model_usage_fee + # @return [::Google::Cloud::CommerceProducer::V1beta::Sku::SkuPrice::AiPlatformManagedModelUsageFee] + # Output only. The SKU prices usage of an AI Platform Managed Model + # (MaaS). + # + # Note: The following fields are mutually exclusive: `ai_platform_managed_model_usage_fee`, `inactive`, `managed_service_metric_usage_fee`, `gce_license_usage_fee`, `gke_pod_usage_fee`, `ai_platform_provisioned_throughput_fee`, `ai_platform_deployed_model_usage_fee`, `flat_subscription_fee`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] ai_platform_provisioned_throughput_fee + # @return [::Google::Cloud::CommerceProducer::V1beta::Sku::SkuPrice::AiPlatformProvisionedThroughputFee] + # Output only. The SKU prices reservation of AI Platform provisioned + # throughput. + # + # Note: The following fields are mutually exclusive: `ai_platform_provisioned_throughput_fee`, `inactive`, `managed_service_metric_usage_fee`, `gce_license_usage_fee`, `gke_pod_usage_fee`, `ai_platform_managed_model_usage_fee`, `ai_platform_deployed_model_usage_fee`, `flat_subscription_fee`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] ai_platform_deployed_model_usage_fee + # @return [::Google::Cloud::CommerceProducer::V1beta::Sku::SkuPrice::AiPlatformDeployedModelUsageFee] + # Output only. The SKU prices usage of an AI model deployed on AI + # Platform. + # + # Note: The following fields are mutually exclusive: `ai_platform_deployed_model_usage_fee`, `inactive`, `managed_service_metric_usage_fee`, `gce_license_usage_fee`, `gke_pod_usage_fee`, `ai_platform_managed_model_usage_fee`, `ai_platform_provisioned_throughput_fee`, `flat_subscription_fee`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] flat_subscription_fee + # @return [::Google::Cloud::CommerceProducer::V1beta::Sku::SkuPrice::FlatSubscriptionFee] + # Output only. The SKU applies a flat subscription fee. + # + # Note: The following fields are mutually exclusive: `flat_subscription_fee`, `inactive`, `managed_service_metric_usage_fee`, `gce_license_usage_fee`, `gke_pod_usage_fee`, `ai_platform_managed_model_usage_fee`, `ai_platform_provisioned_throughput_fee`, `ai_platform_deployed_model_usage_fee`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] effective_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The start of the time interval during which this price is + # effective. + class SkuPrice + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Representation for a SKU that is not active and has no price. + class InactiveSkuPrice + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about a SKU pricing usage of a [partner-reported custom billing + # metric](https://cloud.google.com/service-infrastructure/docs/reporting-billing-metrics) + # defined by the partner in the Service Management API and reported using + # the Service Control API. + # + # The customer's usage charge is computed by converting the customer's + # reported consumption to the SKU's composite price unit and applying the + # graduated price from the appropriate price tier. + # @!attribute [r] tiered_price + # @return [::Google::Cloud::CommerceProducer::V1beta::Sku::SkuPrice::TieredPrice] + # Output only. [Tiered + # pricing](https://cloud.google.com/billing/docs/how-to/pricing-table#tiered-pricing) + # of the SKU. + # @!attribute [r] canonical_metric + # @return [::String] + # Output only. The name of the metric, in canonical format. + # + # Note that in the canonical format the first character of the path + # component of the metric name is always uppercase, which may differ + # from the metric name in the service config. For example, a metric + # appearing in the service config as 'example.com/example_metric' will + # appear here in the SKU as 'example.com/Example_metric'. In the Service + # Management and Service Control APIs these two metric names are + # considered distinct, either or both may be defined, and usage must be + # reported using a name matching the name of a metric defined in the + # service config. But for billing purposes usage reported using either + # name will be aggregated under the canonical metric name. + # + # Example: "example.com/Example_metric" + class ManagedServiceMetricUsageFee + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about a SKU pricing usage of a [Compute Engine + # License](https://cloud.google.com/compute/docs/licenses/about). + # + # The SKU applies to a single license, and may be further scoped to a + # [Compute + # Engine VM Instance](https://cloud.google.com/compute/docs/instances) + # machine resource type (e.g. "vCPU") and size range for that machine + # resource. Instances deployed from [Compute + # Engine Images](https://cloud.google.com/compute/docs/images) + # incorporating the target license and (if applicable) matching the machine + # resource type size range will be charged by the SKU. A single license may + # be priced by multiple SKUs covering different combinations of machine + # resource type and size range, allowing a single running instance to be + # charged by up to one SKU per machine resource type, with pricing tiered + # according to machine shape. + # @!attribute [rw] price_per_unit + # @return [::Google::Type::Money] + # The price per unit of usage. + # The customer's usage charge is computed by measuring the customer's + # consumption denominated in price units and multiplying by this price. + # @!attribute [r] license_code + # @return [::String] + # Output only. The license code of the target Compute Engine License. + # Note that this is the numeric license code itself in uint64 format used + # to reference licenses attached to images, not the resource name of the + # related [Compute Engine LicenseCode + # resource](https://cloud.google.com/compute/docs/reference/rest/v1/licenseCodes). + # + # Example: "1234567890123456789" + # @!attribute [r] machine_resource + # @return [::Google::Cloud::CommerceProducer::V1beta::Sku::SkuPrice::ComputeEngineLicenseUsageFee::MachineResource] + # Output only. The machine resource type that the SKU applies to, if any. + # SKUs with a non-default value are referred to as "resource-based" SKUs. + # @!attribute [r] machine_resource_range + # @return [::Google::Cloud::CommerceProducer::V1beta::Sku::SkuPrice::ComputeEngineLicenseUsageFee::MachineResourceRange] + # Output only. The range of machine resource values that the SKU applies + # to. Unset when the SKU is not scoped to a particular machine resource + # type. The collection of SKUs in effect at any given time targeting the + # same license and machine resource type will cover all possible values + # for that machine resource type without overlap. Such a collection of + # SKUs form a "tiered" price structure over the possible values of the + # machine resource, with each SKU acting as a "tier". + # + # NOTE: This is distinct from a SKU with [tiered + # pricing](https://cloud.google.com/billing/docs/how-to/pricing-table#tiered-pricing). + # @!attribute [r] usage_calculation + # @return [::Google::Cloud::CommerceProducer::V1beta::Sku::SkuPrice::ComputeEngineLicenseUsageFee::UsageCalculation] + # Output only. Determines how the customer's usage is calculated. + # @!attribute [r] unit + # @return [::String] + # Output only. The price unit of the SKU. + # See https://ucum.org/ucum.html for the format of the price unit. + # For linear-priced memory SKUs, the price unit is 'GiBy.h'. + # For all other SKUs, the price unit is 'h'. This includes linear-priced + # vCPU and GPU SKUs because these resources have unitless dimensions and + # the application of these scaling factors does not change the price + # unit. + class ComputeEngineLicenseUsageFee + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The range of machine resource values that the SKU applies to. + # @!attribute [r] start_value + # @return [::Integer] + # Output only. The inclusive lower bound of the range. + # While the number zero may be the start of a range, it is not a + # possible machine resource value. An instance cannot exist with zero + # vCPU or memory, and an instance with no attached accelerators lacks a + # GPU dimension entirely rather than having a GPU count of zero. + # @!attribute [r] end_value + # @return [::Integer] + # Output only. The exclusive upper bound of the range. + # If no end value is specified, the range is unbounded from above. + class MachineResourceRange + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The machine resource type that the SKU applies to, if any. + module MachineResource + # The SKU applies to all instances irrespective of machine shape. + # This is referred to as "instance-based pricing" because the price + # is the same for all instances. + MACHINE_RESOURCE_UNSPECIFIED = 0 + + # The SKU applies based on the instance's vCPU count. + VCPU_COUNT = 1 + + # The SKU applies based on the instance's memory size in bytes. + MEMORY_BYTES = 2 + + # The SKU applies based on the instance's GPU count. + GPU_COUNT = 3 + end + + # Determines how the customer's usage is calculated. + module UsageCalculation + # Unused. + USAGE_CALCULATION_UNSPECIFIED = 0 + + # Usage is calculated from instance runtime. + # The customer's usage is metered according to the [Compute Engine VM + # instance pricing + # model](https://cloud.google.com/compute/vm-instance-pricing), + # measured on a per-instance basis in units of hours, with a minimum + # duration of one minute and an increment of one second. + # + # A SKU using this usage calculation is referred to as "flat" because + # the customer's usage charge is independent of the instance's machine + # resource shape apart from determining whether the SKU applies to the + # instance. + INSTANCE_RUNTIME = 1 + + # Usage is calculated from instance runtime and size. + # This calculation mode is only applicable to resource-based SKUs. + # Usage is calculated by measuring the instance runtime in the same + # manner as for `INSTANCE_RUNTIME` and multiplying by the instance's + # machine resource value matching the SKU's machine resource type. + # This converts the price from per-instance-hour to + # per-instance-hour-per-machine-resource, which changes the price unit + # for memory SKUs to 'GiBy.h'. The price unit otherwise remains 'h' + # because the other machine resources are dimensionless. + # + # A SKU using this usage calculation is referred to as "linear" because + # the customer's usage charge is linearly proportional to the + # instance's machine resource value. + LINEAR_RESOURCE_SCALED_INSTANCE_RUNTIME = 2 + end + end + + # Details about a SKU pricing usage of software running on a Kubernetes + # Engine pod. + # + # The SKU applies to pods annotated with the SKU's parent service name, and + # may be further scoped to a [k8s pod resource + # type](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/) + # (e.g. "CPU") and size range for that resource type. Running pods + # annotated with the parent service's service name and matching the pod + # resource type size range will be charged by the SKU. A service may be + # priced by multiple SKUs covering different combinations of pod resource + # type and size range, allowing a single running pod to be charged by up to + # one SKU per pod resource type, with pricing tiered according to pod + # shape. + # @!attribute [rw] price_per_unit + # @return [::Google::Type::Money] + # The price per unit of usage. + # The customer's usage charge is computed by measuring the customer's + # consumption denominated in price units and multiplying by this price. + # @!attribute [r] pod_resource + # @return [::Google::Cloud::CommerceProducer::V1beta::Sku::SkuPrice::KubernetesEnginePodUsageFee::PodResource] + # Output only. The pod resource type that the SKU applies to. + # SKUs with a non-default value are referred to as "resource-based" SKUs. + # @!attribute [r] pod_resource_range + # @return [::Google::Cloud::CommerceProducer::V1beta::Sku::SkuPrice::KubernetesEnginePodUsageFee::PodResourceRange] + # Output only. The range of pod resource values that the SKU applies to. + # The collection of SKUs in effect at any given time targeting the same + # service annotation and pod resource type will cover all possible values + # for that pod resource type without overlap. Such a collection of SKUs + # form a "tiered" price structure over the possible values of the pod + # resource, with each SKU acting as a "tier". + # + # NOTE: This is distinct from a SKU with [tiered + # pricing](https://cloud.google.com/billing/docs/how-to/pricing-table#tiered-pricing). + # @!attribute [r] usage_calculation + # @return [::Google::Cloud::CommerceProducer::V1beta::Sku::SkuPrice::KubernetesEnginePodUsageFee::UsageCalculation] + # Output only. Determines how the customer's usage is calculated. + # @!attribute [r] unit + # @return [::String] + # Output only. The price unit of the SKU. + # See https://ucum.org/ucum.html for the format of the price unit. + # For linear-priced memory SKUs, the price unit is 'GiBy.h'. + # For all other SKUs, the price unit is 'h'. This includes linear-priced + # VCPU, GPU, and TPU SKUs because these resources have unitless + # dimensions and the application of these scaling factors does not change + # the price unit. + class KubernetesEnginePodUsageFee + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The range of pod resource values that the SKU applies to. + # @!attribute [r] start_value + # @return [::Integer] + # Output only. The inclusive lower bound of the range. + # @!attribute [r] end_value + # @return [::Integer] + # Output only. The exclusive upper bound of the range. + # If no end value is specified, the range is unbounded from above. + class PodResourceRange + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The pod [resource + # type](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/) + # that the SKU applies to. + module PodResource + # Unused. + POD_RESOURCE_UNSPECIFIED = 0 + + # The SKU applies based on the pod's [vCPU + # count](https://kubernetes.io/docs/tasks/configure-pod-container/assign-cpu-resource/). + VCPU_COUNT = 1 + + # The SKU applies based on the pod's [memory + # size](https://kubernetes.io/docs/tasks/configure-pod-container/assign-memory-resource/) + # in bytes. + MEMORY_BYTES = 2 + + # The SKU applies based on the pod's GPU count. + GPU_COUNT = 3 + + # The SKU applies based on the pod's [TPU + # count](https://cloud.google.com/kubernetes-engine/docs/concepts/tpus#how_tpus_work). + TPU_COUNT = 4 + end + + # Determines how the customer's usage is calculated. + module UsageCalculation + # Unused. + USAGE_CALCULATION_UNSPECIFIED = 0 + + # Usage is calculated from pod runtime. + # The customer's usage is metered in a manner similar to the [GKE + # Autopilot mode for pods without specific hardware + # requirements](https://cloud.google.com/kubernetes-engine/pricing), + # priced on a per-pod basis in units of hours and measured in + # one-second increments, with no minimum duration. + # + # A SKU using this usage calculation is referred to as "flat" because + # the customer's usage charge is independent of the pod shape apart + # from determining whether the SKU applies to the pod. + POD_RUNTIME = 1 + + # Usage is calculated from pod runtime and size. + # This calculation mode is only applicable to resource-based SKUs. + # Usage is calculated by measuring the pod runtime in the same manner + # as for `POD_RUNTIME` and multiplying by the pod's resource value + # matching the SKU's pod resource type. + # This converts the price from per-pod-hour to + # per-pod-hour-per-resource, which changes the price unit for memory + # SKUs to 'GiBy.h'. The price unit otherwise remains 'h' because the + # other resources are dimensionless. + # + # A SKU using this usage calculation is referred to as "linear" because + # the customer's usage charge is linearly proportional to the + # pod's resource value. + LINEAR_RESOURCE_SCALED_POD_RUNTIME = 2 + end + end + + # Details about a SKU pricing usage of an [AI Platform Managed Model + # (MaaS)](https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/partner-models/use-partner-models). + # @!attribute [r] tiered_price + # @return [::Google::Cloud::CommerceProducer::V1beta::Sku::SkuPrice::TieredPrice] + # Output only. [Tiered + # pricing](https://cloud.google.com/billing/docs/how-to/pricing-table#tiered-pricing) + # of the SKU. + # @!attribute [r] usage_metric + # @return [::Google::Cloud::CommerceProducer::V1beta::Sku::SkuPrice::AiPlatformManagedModelUsageFee::AiPlatformManagedModelUsageMetric] + # Output only. The usage metric that the SKU applies to. + # @!attribute [r] location + # @return [::Google::Cloud::CommerceProducer::V1beta::Sku::SkuPrice::AiPlatformManagedModelEndpointLocation] + # Output only. The model endpoint location where usage is priced by this + # SKU. If no location is specified, the SKU applies to usage in all + # locations. + # @!attribute [r] prediction_mode + # @return [::Google::Cloud::CommerceProducer::V1beta::Sku::SkuPrice::AiPlatformManagedModelUsageFee::PredictionMode] + # Output only. The prediction mode of requests that the SKU applies to. + # @!attribute [r] combined_request_input_tokens_range + # @return [::Google::Cloud::CommerceProducer::V1beta::Sku::SkuPrice::AiPlatformManagedModelUsageFee::CombinedRequestInputTokensRange] + # Output only. The range of aggregated input token values covered by the + # SKU. Unset if the SKU is not scoped to a particular range. A request is + # in scope for this SKU if its aggregated input token value falls within + # the range. The collection of SKUs in effect at any given time scoped to + # a particular aggregated input token value range will cover all possible + # values without overlap. Such a collection of SKUs form a "tiered" price + # structure over the possible value, with each SKU acting as a "tier". + # + # NOTE: This is distinct from a SKU with [tiered + # pricing](https://cloud.google.com/billing/docs/how-to/pricing-table#tiered-pricing). + # @!attribute [r] provisioned_throughput_overage + # @return [::Google::Cloud::CommerceProducer::V1beta::Sku::SkuPrice::AiPlatformManagedModelUsageFee::ProvisionedThroughputOverage] + # Output only. Set when the SKU is a historical provisioned throughput + # overage SKU. Starting 2025-08-26 such SKUs have no effect, and usage in + # excess of provisioned throughput quota is now metered as standard + # usage. This field is set only in historical SKU timeline entries for + # overage SKUs belonging to partners that offered provisioned throughput + # for AI Platform managed model products prior to the unification of + # standard usage and provisioned throughput overage metering. + class AiPlatformManagedModelUsageFee + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The usage metric that the SKU applies to. + # @!attribute [r] input_tokens_metric + # @return [::Google::Cloud::CommerceProducer::V1beta::Sku::SkuPrice::AiPlatformManagedModelUsageFee::AiPlatformManagedModelUsageMetric::InputTokensMetric] + # Output only. Input tokens read from the prediction endpoint input. + # + # Note: The following fields are mutually exclusive: `input_tokens_metric`, `cache_read_input_tokens_metric`, `cache_write_input_tokens_metric`, `output_tokens_metric`, `web_search_requests_metric`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] cache_read_input_tokens_metric + # @return [::Google::Cloud::CommerceProducer::V1beta::Sku::SkuPrice::AiPlatformManagedModelUsageFee::AiPlatformManagedModelUsageMetric::CacheReadInputTokensMetric] + # Output only. Input tokens read from the cache. + # + # Note: The following fields are mutually exclusive: `cache_read_input_tokens_metric`, `input_tokens_metric`, `cache_write_input_tokens_metric`, `output_tokens_metric`, `web_search_requests_metric`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] cache_write_input_tokens_metric + # @return [::Google::Cloud::CommerceProducer::V1beta::Sku::SkuPrice::AiPlatformManagedModelUsageFee::AiPlatformManagedModelUsageMetric::CacheWriteInputTokensMetric] + # Output only. Input tokens written to the cache. + # + # Note: The following fields are mutually exclusive: `cache_write_input_tokens_metric`, `input_tokens_metric`, `cache_read_input_tokens_metric`, `output_tokens_metric`, `web_search_requests_metric`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] output_tokens_metric + # @return [::Google::Cloud::CommerceProducer::V1beta::Sku::SkuPrice::AiPlatformManagedModelUsageFee::AiPlatformManagedModelUsageMetric::OutputTokensMetric] + # Output only. Output tokens returned from the prediction endpoint. + # + # Note: The following fields are mutually exclusive: `output_tokens_metric`, `input_tokens_metric`, `cache_read_input_tokens_metric`, `cache_write_input_tokens_metric`, `web_search_requests_metric`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] web_search_requests_metric + # @return [::Google::Cloud::CommerceProducer::V1beta::Sku::SkuPrice::AiPlatformManagedModelUsageFee::AiPlatformManagedModelUsageMetric::WebSearchRequestsMetric] + # Output only. Web search requests executed by the model. + # + # Note: The following fields are mutually exclusive: `web_search_requests_metric`, `input_tokens_metric`, `cache_read_input_tokens_metric`, `cache_write_input_tokens_metric`, `output_tokens_metric`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class AiPlatformManagedModelUsageMetric + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Input tokens read from the input to the prediction endpoint. + # The unit for this metric is dimensionless. + class InputTokensMetric + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Input tokens read from the cache. + # The unit for this metric is dimensionless. + class CacheReadInputTokensMetric + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Input tokens written to the cache. + # The unit for this metric is dimensionless. + # @!attribute [r] ttl + # @return [::Google::Protobuf::Duration] + # Output only. The duration the write is retained in the cache. + class CacheWriteInputTokensMetric + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Output tokens returned from the prediction endpoint. + # The unit for this metric is dimensionless. + class OutputTokensMetric + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Web search requests executed by the model. + # The unit for this metric is dimensionless. + class WebSearchRequestsMetric + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # The range of aggregated input token values covered by the SKU. + # + # A request to a managed model has an aggregated input token value + # determined by the sum of the metric values of the input token metrics. + # + # * input tokens + # * cache read input tokens + # * cache write input tokens + # @!attribute [r] start_value + # @return [::Integer] + # Output only. The inclusive lower bound of the range. + # @!attribute [r] end_value + # @return [::Integer] + # Output only. The exclusive upper bound of the range. + # If no end value is specified, the range is unbounded from above. + class CombinedRequestInputTokensRange + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Additional details present for historical provisioned throughput + # "overage" SKUs that applied charges only to usage above the customer's + # provisioned throughput quota threshold. + # @!attribute [r] service + # @return [::String] + # Output only. The service whose usage the overage SKU applied to. + class ProvisionedThroughputOverage + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The prediction modes of requests that the SKU applies to. + module PredictionMode + # The SKU does not distinguish between prediction modes. + PREDICTION_MODE_UNSPECIFIED = 0 + + # The SKU applies to online prediction. + ONLINE_PREDICTION = 1 + + # The SKU applies to batch prediction. + BATCH_PREDICTION = 2 + end + end + + # Details about a SKU pricing reservation of [AI Platform Provisioned + # Throughput](https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/provisioned-throughput). + # + # Customers may purchase provisioned throughput reservations for AI + # Platform managed model products. This provides the customer with + # provisioned throughput quota for a particular model and location. Model + # usage below the provisioned throughput quota threshold is voided and is + # not charged by the product's managed model usage fees. + # @!attribute [r] term_duration_months + # @return [::Integer] + # Output only. The duration of the provisioned throughput reservation + # in months. + # @!attribute [rw] gsu_price_per_unit + # @return [::Google::Type::Money] + # The price per [Generative AI Scale Unit + # (GSU)](https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/provisioned-throughput/measure-provisioned-throughput) + # per `unit`. + # A provisioned throughput reservation reserves a certain number of + # GSUs, and the customer is billed for those GSUs on a continuous basis + # for the duration of the reservation. + # @!attribute [r] location + # @return [::Google::Cloud::CommerceProducer::V1beta::Sku::SkuPrice::AiPlatformManagedModelEndpointLocation] + # Output only. The location where provisioned throughput is priced by + # this SKU. + # @!attribute [r] unit + # @return [::String] + # Output only. The price unit of the SKU. + # See https://ucum.org/ucum.html for the format of the price unit. + # Since provisioned throughput reservations are billed by duration, this + # will always be a time unit. The price unit of a provisioned throughput + # SKU is not necessarily the same as the reservation term. + # This field is unrelated to the [Generative AI Scale Unit + # (GSU)](https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/provisioned-throughput/measure-provisioned-throughput). + # + # Currently the unit is always months ('mo'). + # Additional time units may be supported in future. + # + # The customary unit month ('mo') requires special handling to account + # for the variable duration of months. A price may be denominated in + # units of months, but the duration the reservation is active is measured + # in metric time and customers are billed on that basis. The exact hourly + # or per-second price can be calculated by dividing the monthly price + # by the number of hours or seconds in the desired month. A reservation + # active for N months is rarely billed exactly N times the monthly price. + # This is intended and is not a billing error. + class AiPlatformProvisionedThroughputFee + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about a SKU pricing usage of an [AI Platform Self Deployed + # Model](https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/model-garden/self-deployed-models). + # @!attribute [r] accelerator_type + # @return [::String] + # Output only. The SKU applies to a specific accelerator type. + # Contains the name of the matching [AI Platform AcceleratorType]( + # https://docs.cloud.google.com/gemini-enterprise-agent-platform/reference/rest/v1/MachineSpec#AcceleratorType). + # The corresponding linear scaling value is the dimensionless + # [`accelerator_count`](https://docs.cloud.google.com/gemini-enterprise-agent-platform/reference/rest/v1/MachineSpec#FIELDS.accelerator_count). + # @!attribute [r] price_per_unit + # @return [::Google::Type::Money] + # Output only. The price per unit of usage. + # The customer's usage charge is computed by measuring the customer's + # consumption denominated in price units and multiplying by this price. + # @!attribute [r] unit + # @return [::String] + # Output only. The price unit of the SKU. + # See https://ucum.org/ucum.html for the format of the price unit. + # Currently the unit is always hours ('h'). This may change in future. + # @!attribute [r] usage_calculation + # @return [::Google::Cloud::CommerceProducer::V1beta::Sku::SkuPrice::AiPlatformDeployedModelUsageFee::UsageCalculation] + # Output only. Determines how the customer's usage is calculated. + class AiPlatformDeployedModelUsageFee + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Determines how the customer's usage is calculated. + module UsageCalculation + # Unused. + USAGE_CALCULATION_UNSPECIFIED = 0 + + # Usage is calculated from deployment runtime and size. + # Usage is calculated by measuring the deployment runtime in hours and + # multiplying by the amount of the deployed model's hardware resource + # matching the SKU's hardware resource type. + # This results in a composite `unit` of hours ('h') multiplied by the + # unit that denominates the hardware resource, though note that + # multiplying by the dimensionless unit ("1") has no effect. + LINEAR_RESOURCE_SCALED_DEPLOYMENT_RUNTIME = 2 + end + end + + # Details about a SKU charging a flat subscription fee. + # @!attribute [r] price_per_unit + # @return [::Google::Type::Money] + # Output only. The price per time unit the subscription is active. + # @!attribute [r] unit + # @return [::String] + # Output only. The unit of the subscription SKU. + # See https://ucum.org/ucum.html for the format of the price unit. + # Since subscriptions are billed by duration, this will always be a time + # unit. The price unit of a subscription SKU is not necessarily the same + # as the subscription period of the corresponding StandardOffers. + # + # Currently the unit is always months ('mo'). + # Additional time units may be supported in future. + # + # The unit month ('mo') is a customary time unit and requires special + # handling to account for the variable duration of months. A price may be + # denominated in units of months, but the duration the subscription is + # active is measured in metric time and customers are billed on that + # basis. The exact hourly or per-second price can be calculated by + # dividing the monthly price by the number of hours or seconds in the + # desired month. A subscription active for N months is rarely billed + # exactly N times the monthly price. This is intended and is not a + # billing error. + class FlatSubscriptionFee + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Price structure for a SKU charging a [tiered + # price](https://cloud.google.com/billing/docs/how-to/pricing-table#tiered-pricing). + # @!attribute [r] unit + # @return [::String] + # Output only. Usage unit used for defining price tiers and for scaling + # with the price_unit_count to form the composite price unit. + # + # See https://ucum.org/ucum.html for the format of the price unit. + # A unitless dimension, such as a count, is represented as `1`. + # @!attribute [r] unit_description + # @return [::String] + # Output only. The display description of the unit, supplied at time of + # onboarding. This value is recommended to be set at least for + # dimensionless metrics, but may be empty if no description was provided + # at time of onboarding. + # @!attribute [r] price_unit_count + # @return [::Google::Type::Decimal] + # Output only. Scaling the `unit` by the `price_unit_count` forms the + # composite "price unit" which is priced by the price tiers. + # + # This scaling factor is in addition to any numerical prefix symbol on + # the `unit`, so the same composite "price unit" can be represented in + # several ways, differing only in their presentation to users. + # + # Examples: + # + # * $1 per 1 bytes : unit = By, price_unit_count = 1 + # * $1000 per 1 kilobytes : unit = kBy, price_unit_count = 1 + # * $5000 per 5 kilobytes : unit = kBy, price_unit_count = 5 + # @!attribute [r] price_tiers + # @return [::Array<::Google::Cloud::CommerceProducer::V1beta::Sku::SkuPrice::TieredPrice::PriceTier>] + # Output only. The list of price tiers for the SKU, ordered by the + # start_amount. + # + # The tiers are non-overlapping and are collectively bounded below by + # zero and unbounded above to cover the entire range of possible metric + # usage. Each tier is bounded below inclusively by its start_amount and + # bounded above exclusively by the start_amount of the next tier, or else + # unbounded above if there is no next tier. + # + # Usage of the metric is aggregated by customer billing account on a + # monthly basis and billed in a graduated manner according to the price + # tiers, with each marginal unit of usage priced accoring to the tier in + # which it falls. + class TieredPrice + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A [price + # tier](https://cloud.google.com/billing/docs/how-to/pricing-table#tiered-pricing) + # pricing metric usage within a range. + # + # Each marginal unit of usage is priced according to the price tier in + # which it falls. + # @!attribute [r] start_amount + # @return [::Google::Type::Decimal] + # Output only. Inclusive lower bound of the tier interval, denominated + # in `unit`. + # @!attribute [r] price + # @return [::Google::Type::Money] + # Output only. The price per `price_unit_count` of `unit` in the tier. + # The price is applied fractionally if the customer's usage within the + # tier is not an integer multiple of `price_unit_count`. + class PriceTier + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Location scope for a SKU that applies to an AI Platform Managed Model + # endpoint. + # @!attribute [r] region_id + # @return [::String] + # Output only. The SKU applies to a region. + # + # Note: The following fields are mutually exclusive: `region_id`, `global_endpoint`, `multi_region_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] global_endpoint + # @return [::Boolean] + # Output only. The SKU applies to a [global + # endpoint](https://docs.cloud.google.com/gemini-enterprise-agent-platform/resources/locations). + # **Note**: This is distinct from the conventional meaning of "global" + # as a SKU that applies to all locations. + # + # Note: The following fields are mutually exclusive: `global_endpoint`, `region_id`, `multi_region_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] multi_region_id + # @return [::String] + # Output only. The SKU applies to a multi-region. + # + # Note: The following fields are mutually exclusive: `multi_region_id`, `region_id`, `global_endpoint`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class AiPlatformManagedModelEndpointLocation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/cloud/commerceproducer/v1beta/sku_group.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/cloud/commerceproducer/v1beta/sku_group.rb new file mode 100644 index 000000000000..413f024d8e56 --- /dev/null +++ b/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/cloud/commerceproducer/v1beta/sku_group.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module CommerceProducer + module V1beta + # Message describing SkuGroup resource + # @!attribute [r] name + # @return [::String] + # Output only. Identifier. Name of the SkuGroup. + # @!attribute [r] skus + # @return [::Array<::String>] + # Output only. Partner SKUs included in the SkuGroup. + # Format: + # `projects/{project}/locations/{location}/services/{service}/skus/{sku}` + # @!attribute [r] cloud_billing_skus + # @return [::Array<::String>] + # Output only. Google SKUs included in the SkuGroup. + # + # Used for partner products sold by Google, such as Premium Operating System + # Images sold for use in Compute Engine. This is not common. + # SKUs of this type are not present on this API and can instead be found on + # the Cloud Billing API or at https://cloud.google.com/skus. + # + # Format: `services/{service}/skus/{sku}` + class SkuGroup + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/cloud/commerceproducer/v1beta/standard_offer.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/cloud/commerceproducer/v1beta/standard_offer.rb new file mode 100644 index 000000000000..0eaef9bbf285 --- /dev/null +++ b/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/cloud/commerceproducer/v1beta/standard_offer.rb @@ -0,0 +1,133 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module CommerceProducer + module V1beta + # Message describing the StandardOffer resource. + # @!attribute [r] term_duration_months + # @return [::Integer] + # Output only. Term duration of the offer in months. + # Applicable only to offers with a subscription price model. + # Additional forms of offer term may be added in the future. + # @!attribute [rw] name + # @return [::String] + # Identifier. Name of resource. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Creation time of the offer. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Last update time of the offer. + # @!attribute [r] effective_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Effective time of the offer. + # Prior to this time, the offer cannot be purchased or used as the base + # standard offer of a private offer. + # @!attribute [r] expire_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Expire time of the offer. + # An offer is expired if its expire time is in the past. + # An expired standard offer cannot be purchased or used as the base standard + # offer of a private offer. + # @!attribute [r] service_level + # @return [::String] + # Output only. Identifier that distinguishes between different service levels + # of the same product that constitute distinct offerings to customers with + # different pricing. + # + # The service levels of a product are also referred to in some cases as the + # product's 'plans', and the `service_level` value is referred to in some + # cases as the "plan ID". + # + # Multiple non-expired standard offers can share the same service level when + # they are subscription offers for different term durations. + # @!attribute [r] service_level_title + # @return [::String] + # Output only. Title of the service level. + # + # Not included for `STANDARD_OFFER_VIEW_BASIC`. + # @!attribute [r] price_model + # @return [::Google::Cloud::CommerceProducer::V1beta::StandardOffer::PriceModel] + # Output only. Price model of the offer. + class StandardOffer + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Price model of the offer. + # @!attribute [r] flat_fee + # @return [::Google::Cloud::CommerceProducer::V1beta::StandardOffer::PriceModel::FlatFeeSubscription] + # Output only. Price configurations for the flat fee subscription. + # @!attribute [r] usage + # @return [::Google::Cloud::CommerceProducer::V1beta::StandardOffer::PriceModel::Usage] + # Output only. Price configurations for the usage part. + class PriceModel + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A collection of SKUs. + # @!attribute [r] skus + # @return [::Array<::String>] + # Output only. List of SKUs by name. + class SkuList + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A collection of SkuGroups. + # @!attribute [r] sku_groups + # @return [::Array<::String>] + # Output only. List of SkuGroups by name. + class SkuGroupList + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Price configurations for the usage part. + # @!attribute [r] sku_list + # @return [::Google::Cloud::CommerceProducer::V1beta::StandardOffer::PriceModel::SkuList] + # Output only. The offer's usage fees are charged against these SKUs. + # + # Note: The following fields are mutually exclusive: `sku_list`, `sku_group_list`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] sku_group_list + # @return [::Google::Cloud::CommerceProducer::V1beta::StandardOffer::PriceModel::SkuGroupList] + # Output only. The offer's usage fees are charged against the SKUs in + # these groups. + # + # Note: The following fields are mutually exclusive: `sku_group_list`, `sku_list`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Usage + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Price configurations for flat fee subscriptions. + # @!attribute [r] sku + # @return [::String] + # Output only. Flat fee subscription SKU for the offer. + class FlatFeeSubscription + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/protobuf/any.rb @@ -0,0 +1,145 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `Any` contains an arbitrary serialized protocol buffer message along with a + # URL that describes the type of the serialized message. + # + # Protobuf library provides support to pack/unpack Any values in the form + # of utility functions or additional generated methods of the Any type. + # + # Example 1: Pack and unpack a message in C++. + # + # Foo foo = ...; + # Any any; + # any.PackFrom(foo); + # ... + # if (any.UnpackTo(&foo)) { + # ... + # } + # + # Example 2: Pack and unpack a message in Java. + # + # Foo foo = ...; + # Any any = Any.pack(foo); + # ... + # if (any.is(Foo.class)) { + # foo = any.unpack(Foo.class); + # } + # // or ... + # if (any.isSameTypeAs(Foo.getDefaultInstance())) { + # foo = any.unpack(Foo.getDefaultInstance()); + # } + # + # Example 3: Pack and unpack a message in Python. + # + # foo = Foo(...) + # any = Any() + # any.Pack(foo) + # ... + # if any.Is(Foo.DESCRIPTOR): + # any.Unpack(foo) + # ... + # + # Example 4: Pack and unpack a message in Go + # + # foo := &pb.Foo{...} + # any, err := anypb.New(foo) + # if err != nil { + # ... + # } + # ... + # foo := &pb.Foo{} + # if err := any.UnmarshalTo(foo); err != nil { + # ... + # } + # + # The pack methods provided by protobuf library will by default use + # 'type.googleapis.com/full.type.name' as the type URL and the unpack + # methods only use the fully qualified type name after the last '/' + # in the type URL, for example "foo.bar.com/x/y.z" will yield type + # name "y.z". + # + # JSON + # ==== + # The JSON representation of an `Any` value uses the regular + # representation of the deserialized, embedded message, with an + # additional field `@type` which contains the type URL. Example: + # + # package google.profile; + # message Person { + # string first_name = 1; + # string last_name = 2; + # } + # + # { + # "@type": "type.googleapis.com/google.profile.Person", + # "firstName": , + # "lastName": + # } + # + # If the embedded message type is well-known and has a custom JSON + # representation, that representation will be embedded adding a field + # `value` which holds the custom JSON in addition to the `@type` + # field. Example (for message [google.protobuf.Duration][]): + # + # { + # "@type": "type.googleapis.com/google.protobuf.Duration", + # "value": "1.212s" + # } + # @!attribute [rw] type_url + # @return [::String] + # A URL/resource name that uniquely identifies the type of the serialized + # protocol buffer message. This string must contain at least + # one "/" character. The last segment of the URL's path must represent + # the fully qualified name of the type (as in + # `path/google.protobuf.Duration`). The name should be in a canonical form + # (e.g., leading "." is not accepted). + # + # In practice, teams usually precompile into the binary all types that they + # expect it to use in the context of Any. However, for URLs which use the + # scheme `http`, `https`, or no scheme, one can optionally set up a type + # server that maps type URLs to message definitions as follows: + # + # * If no scheme is provided, `https` is assumed. + # * An HTTP GET on the URL must yield a [google.protobuf.Type][] + # value in binary format, or produce an error. + # * Applications are allowed to cache lookup results based on the + # URL, or have them precompiled into a binary to avoid any + # lookup. Therefore, binary compatibility needs to be preserved + # on changes to types. (Use versioned type names to manage + # breaking changes.) + # + # Note: this functionality is not currently available in the official + # protobuf release, and it is not used for type URLs beginning with + # type.googleapis.com. As of May 2023, there are no widely used type server + # implementations and no plans to implement one. + # + # Schemes other than `http`, `https` (or the empty scheme) might be + # used with implementation specific semantics. + # @!attribute [rw] value + # @return [::String] + # Must be a valid serialized protocol buffer of the above specified type. + class Any + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/protobuf/duration.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Duration represents a signed, fixed-length span of time represented + # as a count of seconds and fractions of seconds at nanosecond + # resolution. It is independent of any calendar and concepts like "day" + # or "month". It is related to Timestamp in that the difference between + # two Timestamp values is a Duration and it can be added or subtracted + # from a Timestamp. Range is approximately +-10,000 years. + # + # # Examples + # + # Example 1: Compute Duration from two Timestamps in pseudo code. + # + # Timestamp start = ...; + # Timestamp end = ...; + # Duration duration = ...; + # + # duration.seconds = end.seconds - start.seconds; + # duration.nanos = end.nanos - start.nanos; + # + # if (duration.seconds < 0 && duration.nanos > 0) { + # duration.seconds += 1; + # duration.nanos -= 1000000000; + # } else if (duration.seconds > 0 && duration.nanos < 0) { + # duration.seconds -= 1; + # duration.nanos += 1000000000; + # } + # + # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. + # + # Timestamp start = ...; + # Duration duration = ...; + # Timestamp end = ...; + # + # end.seconds = start.seconds + duration.seconds; + # end.nanos = start.nanos + duration.nanos; + # + # if (end.nanos < 0) { + # end.seconds -= 1; + # end.nanos += 1000000000; + # } else if (end.nanos >= 1000000000) { + # end.seconds += 1; + # end.nanos -= 1000000000; + # } + # + # Example 3: Compute Duration from datetime.timedelta in Python. + # + # td = datetime.timedelta(days=3, minutes=10) + # duration = Duration() + # duration.FromTimedelta(td) + # + # # JSON Mapping + # + # In JSON format, the Duration type is encoded as a string rather than an + # object, where the string ends in the suffix "s" (indicating seconds) and + # is preceded by the number of seconds, with nanoseconds expressed as + # fractional seconds. For example, 3 seconds with 0 nanoseconds should be + # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should + # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 + # microsecond should be expressed in JSON format as "3.000001s". + # @!attribute [rw] seconds + # @return [::Integer] + # Signed seconds of the span of time. Must be from -315,576,000,000 + # to +315,576,000,000 inclusive. Note: these bounds are computed from: + # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years + # @!attribute [rw] nanos + # @return [::Integer] + # Signed fractions of a second at nanosecond resolution of the span + # of time. Durations less than one second are represented with a 0 + # `seconds` field and a positive or negative `nanos` field. For durations + # of one second or more, a non-zero value for the `nanos` field must be + # of the same sign as the `seconds` field. Must be from -999,999,999 + # to +999,999,999 inclusive. + class Duration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/protobuf/empty.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A generic empty message that you can re-use to avoid defining duplicated + # empty messages in your APIs. A typical example is to use it as the request + # or the response type of an API method. For instance: + # + # service Foo { + # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + # } + class Empty + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/protobuf/field_mask.rb @@ -0,0 +1,229 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `FieldMask` represents a set of symbolic field paths, for example: + # + # paths: "f.a" + # paths: "f.b.d" + # + # Here `f` represents a field in some root message, `a` and `b` + # fields in the message found in `f`, and `d` a field found in the + # message in `f.b`. + # + # Field masks are used to specify a subset of fields that should be + # returned by a get operation or modified by an update operation. + # Field masks also have a custom JSON encoding (see below). + # + # # Field Masks in Projections + # + # When used in the context of a projection, a response message or + # sub-message is filtered by the API to only contain those fields as + # specified in the mask. For example, if the mask in the previous + # example is applied to a response message as follows: + # + # f { + # a : 22 + # b { + # d : 1 + # x : 2 + # } + # y : 13 + # } + # z: 8 + # + # The result will not contain specific values for fields x,y and z + # (their value will be set to the default, and omitted in proto text + # output): + # + # + # f { + # a : 22 + # b { + # d : 1 + # } + # } + # + # A repeated field is not allowed except at the last position of a + # paths string. + # + # If a FieldMask object is not present in a get operation, the + # operation applies to all fields (as if a FieldMask of all fields + # had been specified). + # + # Note that a field mask does not necessarily apply to the + # top-level response message. In case of a REST get operation, the + # field mask applies directly to the response, but in case of a REST + # list operation, the mask instead applies to each individual message + # in the returned resource list. In case of a REST custom method, + # other definitions may be used. Where the mask applies will be + # clearly documented together with its declaration in the API. In + # any case, the effect on the returned resource/resources is required + # behavior for APIs. + # + # # Field Masks in Update Operations + # + # A field mask in update operations specifies which fields of the + # targeted resource are going to be updated. The API is required + # to only change the values of the fields as specified in the mask + # and leave the others untouched. If a resource is passed in to + # describe the updated values, the API ignores the values of all + # fields not covered by the mask. + # + # If a repeated field is specified for an update operation, new values will + # be appended to the existing repeated field in the target resource. Note that + # a repeated field is only allowed in the last position of a `paths` string. + # + # If a sub-message is specified in the last position of the field mask for an + # update operation, then new value will be merged into the existing sub-message + # in the target resource. + # + # For example, given the target message: + # + # f { + # b { + # d: 1 + # x: 2 + # } + # c: [1] + # } + # + # And an update message: + # + # f { + # b { + # d: 10 + # } + # c: [2] + # } + # + # then if the field mask is: + # + # paths: ["f.b", "f.c"] + # + # then the result will be: + # + # f { + # b { + # d: 10 + # x: 2 + # } + # c: [1, 2] + # } + # + # An implementation may provide options to override this default behavior for + # repeated and message fields. + # + # In order to reset a field's value to the default, the field must + # be in the mask and set to the default value in the provided resource. + # Hence, in order to reset all fields of a resource, provide a default + # instance of the resource and set all fields in the mask, or do + # not provide a mask as described below. + # + # If a field mask is not present on update, the operation applies to + # all fields (as if a field mask of all fields has been specified). + # Note that in the presence of schema evolution, this may mean that + # fields the client does not know and has therefore not filled into + # the request will be reset to their default. If this is unwanted + # behavior, a specific service may require a client to always specify + # a field mask, producing an error if not. + # + # As with get operations, the location of the resource which + # describes the updated values in the request message depends on the + # operation kind. In any case, the effect of the field mask is + # required to be honored by the API. + # + # ## Considerations for HTTP REST + # + # The HTTP kind of an update operation which uses a field mask must + # be set to PATCH instead of PUT in order to satisfy HTTP semantics + # (PUT must only be used for full updates). + # + # # JSON Encoding of Field Masks + # + # In JSON, a field mask is encoded as a single string where paths are + # separated by a comma. Fields name in each path are converted + # to/from lower-camel naming conventions. + # + # As an example, consider the following message declarations: + # + # message Profile { + # User user = 1; + # Photo photo = 2; + # } + # message User { + # string display_name = 1; + # string address = 2; + # } + # + # In proto a field mask for `Profile` may look as such: + # + # mask { + # paths: "user.display_name" + # paths: "photo" + # } + # + # In JSON, the same mask is represented as below: + # + # { + # mask: "user.displayName,photo" + # } + # + # # Field Masks and Oneof Fields + # + # Field masks treat fields in oneofs just as regular fields. Consider the + # following message: + # + # message SampleMessage { + # oneof test_oneof { + # string name = 4; + # SubMessage sub_message = 9; + # } + # } + # + # The field mask can be: + # + # mask { + # paths: "name" + # } + # + # Or: + # + # mask { + # paths: "sub_message" + # } + # + # Note that oneof type names ("test_oneof" in this case) cannot be used in + # paths. + # + # ## Field Mask Verification + # + # The implementation of any API method which has a FieldMask type field in the + # request should verify the included field paths, and return an + # `INVALID_ARGUMENT` error if any path is unmappable. + # @!attribute [rw] paths + # @return [::Array<::String>] + # The set of field mask paths. + class FieldMask + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,127 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch + # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to + # 9999-12-31T23:59:59Z inclusive. + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. Negative + # second values with fractions must still have non-negative nanos values + # that count forward in time. Must be from 0 to 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/type/datetime.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/type/datetime.rb new file mode 100644 index 000000000000..10625864f3dd --- /dev/null +++ b/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/type/datetime.rb @@ -0,0 +1,104 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Type + # Represents civil time (or occasionally physical time). + # + # This type can represent a civil time in one of a few possible ways: + # + # * When utc_offset is set and time_zone is unset: a civil time on a calendar + # day with a particular offset from UTC. + # * When time_zone is set and utc_offset is unset: a civil time on a calendar + # day in a particular time zone. + # * When neither time_zone nor utc_offset is set: a civil time on a calendar + # day in local time. + # + # The date is relative to the Proleptic Gregorian Calendar. + # + # If year, month, or day are 0, the DateTime is considered not to have a + # specific year, month, or day respectively. + # + # This type may also be used to represent a physical time if all the date and + # time fields are set and either case of the `time_offset` oneof is set. + # Consider using `Timestamp` message for physical time instead. If your use + # case also would like to store the user's timezone, that can be done in + # another field. + # + # This type is more flexible than some applications may want. Make sure to + # document and validate your application's limitations. + # @!attribute [rw] year + # @return [::Integer] + # Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a + # datetime without a year. + # @!attribute [rw] month + # @return [::Integer] + # Optional. Month of year. Must be from 1 to 12, or 0 if specifying a + # datetime without a month. + # @!attribute [rw] day + # @return [::Integer] + # Optional. Day of month. Must be from 1 to 31 and valid for the year and + # month, or 0 if specifying a datetime without a day. + # @!attribute [rw] hours + # @return [::Integer] + # Optional. Hours of day in 24 hour format. Should be from 0 to 23, defaults + # to 0 (midnight). An API may choose to allow the value "24:00:00" for + # scenarios like business closing time. + # @!attribute [rw] minutes + # @return [::Integer] + # Optional. Minutes of hour of day. Must be from 0 to 59, defaults to 0. + # @!attribute [rw] seconds + # @return [::Integer] + # Optional. Seconds of minutes of the time. Must normally be from 0 to 59, + # defaults to 0. An API may allow the value 60 if it allows leap-seconds. + # @!attribute [rw] nanos + # @return [::Integer] + # Optional. Fractions of seconds in nanoseconds. Must be from 0 to + # 999,999,999, defaults to 0. + # @!attribute [rw] utc_offset + # @return [::Google::Protobuf::Duration] + # UTC offset. Must be whole seconds, between -18 hours and +18 hours. + # For example, a UTC offset of -4:00 would be represented as + # { seconds: -14400 }. + # + # Note: The following fields are mutually exclusive: `utc_offset`, `time_zone`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] time_zone + # @return [::Google::Type::TimeZone] + # Time zone. + # + # Note: The following fields are mutually exclusive: `time_zone`, `utc_offset`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class DateTime + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents a time zone from the + # [IANA Time Zone Database](https://www.iana.org/time-zones). + # @!attribute [rw] id + # @return [::String] + # IANA Time Zone Database time zone. For example "America/New_York". + # @!attribute [rw] version + # @return [::String] + # Optional. IANA Time Zone Database version number. For example "2019a". + class TimeZone + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/type/decimal.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/type/decimal.rb new file mode 100644 index 000000000000..1ae8cfa5d7d1 --- /dev/null +++ b/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/type/decimal.rb @@ -0,0 +1,95 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Type + # A representation of a decimal value, such as 2.5. Clients may convert values + # into language-native decimal formats, such as Java's + # [BigDecimal](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/math/BigDecimal.html) + # or Python's + # [decimal.Decimal](https://docs.python.org/3/library/decimal.html). + # @!attribute [rw] value + # @return [::String] + # The decimal value, as a string. + # + # The string representation consists of an optional sign, `+` (`U+002B`) + # or `-` (`U+002D`), followed by a sequence of zero or more decimal digits + # ("the integer"), optionally followed by a fraction, optionally followed + # by an exponent. An empty string **should** be interpreted as `0`. + # + # The fraction consists of a decimal point followed by zero or more decimal + # digits. The string must contain at least one digit in either the integer + # or the fraction. The number formed by the sign, the integer and the + # fraction is referred to as the significand. + # + # The exponent consists of the character `e` (`U+0065`) or `E` (`U+0045`) + # followed by one or more decimal digits. + # + # Services **should** normalize decimal values before storing them by: + # + # - Removing an explicitly-provided `+` sign (`+2.5` -> `2.5`). + # - Replacing a zero-length integer value with `0` (`.5` -> `0.5`). + # - Coercing the exponent character to upper-case, with explicit sign + # (`2.5e8` -> `2.5E+8`). + # - Removing an explicitly-provided zero exponent (`2.5E0` -> `2.5`). + # + # Services **may** perform additional normalization based on its own needs + # and the internal decimal implementation selected, such as shifting the + # decimal point and exponent value together (example: `2.5E-1` <-> `0.25`). + # Additionally, services **may** preserve trailing zeroes in the fraction + # to indicate increased precision, but are not required to do so. + # + # Note that only the `.` character is supported to divide the integer + # and the fraction; `,` **should not** be supported regardless of locale. + # Additionally, thousand separators **should not** be supported. If a + # service does support them, values **must** be normalized. + # + # The ENBF grammar is: + # + # DecimalString = + # '' | [Sign] Significand [Exponent]; + # + # Sign = '+' | '-'; + # + # Significand = + # Digits ['.'] [Digits] | [Digits] '.' Digits; + # + # Exponent = ('e' | 'E') [Sign] Digits; + # + # Digits = { '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' }; + # + # Services **should** clearly document the range of supported values, the + # maximum supported precision (total number of digits), and, if applicable, + # the scale (number of digits after the decimal point), as well as how it + # behaves when receiving out-of-bounds values. + # + # Services **may** choose to accept values passed as input even when the + # value has a higher precision or scale than the service supports, and + # **should** round the value to fit the supported scale. Alternatively, the + # service **may** error with `400 Bad Request` (`INVALID_ARGUMENT` in gRPC) + # if precision would be lost. + # + # Services **should** error with `400 Bad Request` (`INVALID_ARGUMENT` in + # gRPC) if the service receives a value outside of the supported range. + class Decimal + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/type/money.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/type/money.rb new file mode 100644 index 000000000000..56a32eee300d --- /dev/null +++ b/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/type/money.rb @@ -0,0 +1,43 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Type + # Represents an amount of money with its currency type. + # @!attribute [rw] currency_code + # @return [::String] + # The three-letter currency code defined in ISO 4217. + # @!attribute [rw] units + # @return [::Integer] + # The whole units of the amount. + # For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. + # @!attribute [rw] nanos + # @return [::Integer] + # Number of nano (10^-9) units of the amount. + # The value must be between -999,999,999 and +999,999,999 inclusive. + # If `units` is positive, `nanos` must be positive or zero. + # If `units` is zero, `nanos` can be positive, zero, or negative. + # If `units` is negative, `nanos` must be negative or zero. + # For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. + class Money + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/Gemfile b/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/Gemfile new file mode 100644 index 000000000000..d8679b2677ba --- /dev/null +++ b/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/Gemfile @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +source "https://rubygems.org" + +if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" + gem "google-cloud-commerce_producer-v1beta", path: "../" +else + gem "google-cloud-commerce_producer-v1beta" +end + +group :test do + gem "google-style", "~> 1.26.1" + gem "minitest", "~> 5.16" + gem "minitest-focus", "~> 1.1" + gem "minitest-hooks", "~> 1.5" +end diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/cancel_private_offer.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/cancel_private_offer.rb new file mode 100644 index 000000000000..b29c41d26557 --- /dev/null +++ b/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/cancel_private_offer.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START commerceproducer_v1beta_generated_CommerceTransaction_CancelPrivateOffer_sync] +require "google/cloud/commerce_producer/v1beta" + +## +# Snippet for the cancel_private_offer call in the CommerceTransaction service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#cancel_private_offer. +# +def cancel_private_offer + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CommerceProducer::V1beta::CancelPrivateOfferRequest.new + + # Call the cancel_private_offer method. + result = client.cancel_private_offer request + + # The returned object is of type Google::Cloud::CommerceProducer::V1beta::PrivateOffer. + p result +end +# [END commerceproducer_v1beta_generated_CommerceTransaction_CancelPrivateOffer_sync] diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/create_private_offer.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/create_private_offer.rb new file mode 100644 index 000000000000..717d8cfc38fd --- /dev/null +++ b/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/create_private_offer.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START commerceproducer_v1beta_generated_CommerceTransaction_CreatePrivateOffer_sync] +require "google/cloud/commerce_producer/v1beta" + +## +# Snippet for the create_private_offer call in the CommerceTransaction service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#create_private_offer. +# +def create_private_offer + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CommerceProducer::V1beta::CreatePrivateOfferRequest.new + + # Call the create_private_offer method. + result = client.create_private_offer request + + # The returned object is of type Google::Cloud::CommerceProducer::V1beta::PrivateOffer. + p result +end +# [END commerceproducer_v1beta_generated_CommerceTransaction_CreatePrivateOffer_sync] diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/create_private_offer_document.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/create_private_offer_document.rb new file mode 100644 index 000000000000..2fbf7a354da7 --- /dev/null +++ b/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/create_private_offer_document.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START commerceproducer_v1beta_generated_CommerceTransaction_CreatePrivateOfferDocument_sync] +require "google/cloud/commerce_producer/v1beta" + +## +# Snippet for the create_private_offer_document call in the CommerceTransaction service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#create_private_offer_document. +# +def create_private_offer_document + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CommerceProducer::V1beta::CreatePrivateOfferDocumentRequest.new + + # Call the create_private_offer_document method. + result = client.create_private_offer_document request + + # The returned object is of type Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument. + p result +end +# [END commerceproducer_v1beta_generated_CommerceTransaction_CreatePrivateOfferDocument_sync] diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/delete_private_offer.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/delete_private_offer.rb new file mode 100644 index 000000000000..d9043334fa0e --- /dev/null +++ b/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/delete_private_offer.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START commerceproducer_v1beta_generated_CommerceTransaction_DeletePrivateOffer_sync] +require "google/cloud/commerce_producer/v1beta" + +## +# Snippet for the delete_private_offer call in the CommerceTransaction service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#delete_private_offer. +# +def delete_private_offer + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CommerceProducer::V1beta::DeletePrivateOfferRequest.new + + # Call the delete_private_offer method. + result = client.delete_private_offer request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END commerceproducer_v1beta_generated_CommerceTransaction_DeletePrivateOffer_sync] diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/delete_private_offer_document.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/delete_private_offer_document.rb new file mode 100644 index 000000000000..a2a45518df24 --- /dev/null +++ b/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/delete_private_offer_document.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START commerceproducer_v1beta_generated_CommerceTransaction_DeletePrivateOfferDocument_sync] +require "google/cloud/commerce_producer/v1beta" + +## +# Snippet for the delete_private_offer_document call in the CommerceTransaction service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#delete_private_offer_document. +# +def delete_private_offer_document + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CommerceProducer::V1beta::DeletePrivateOfferDocumentRequest.new + + # Call the delete_private_offer_document method. + result = client.delete_private_offer_document request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END commerceproducer_v1beta_generated_CommerceTransaction_DeletePrivateOfferDocument_sync] diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/get_private_offer.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/get_private_offer.rb new file mode 100644 index 000000000000..f426fd9bf6f6 --- /dev/null +++ b/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/get_private_offer.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START commerceproducer_v1beta_generated_CommerceTransaction_GetPrivateOffer_sync] +require "google/cloud/commerce_producer/v1beta" + +## +# Snippet for the get_private_offer call in the CommerceTransaction service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#get_private_offer. +# +def get_private_offer + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CommerceProducer::V1beta::GetPrivateOfferRequest.new + + # Call the get_private_offer method. + result = client.get_private_offer request + + # The returned object is of type Google::Cloud::CommerceProducer::V1beta::PrivateOffer. + p result +end +# [END commerceproducer_v1beta_generated_CommerceTransaction_GetPrivateOffer_sync] diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/get_private_offer_document.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/get_private_offer_document.rb new file mode 100644 index 000000000000..2ee91eb5dba5 --- /dev/null +++ b/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/get_private_offer_document.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START commerceproducer_v1beta_generated_CommerceTransaction_GetPrivateOfferDocument_sync] +require "google/cloud/commerce_producer/v1beta" + +## +# Snippet for the get_private_offer_document call in the CommerceTransaction service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#get_private_offer_document. +# +def get_private_offer_document + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CommerceProducer::V1beta::GetPrivateOfferDocumentRequest.new + + # Call the get_private_offer_document method. + result = client.get_private_offer_document request + + # The returned object is of type Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument. + p result +end +# [END commerceproducer_v1beta_generated_CommerceTransaction_GetPrivateOfferDocument_sync] diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/get_service.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/get_service.rb new file mode 100644 index 000000000000..ea66e846642c --- /dev/null +++ b/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/get_service.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START commerceproducer_v1beta_generated_CommerceTransaction_GetService_sync] +require "google/cloud/commerce_producer/v1beta" + +## +# Snippet for the get_service call in the CommerceTransaction service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#get_service. +# +def get_service + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CommerceProducer::V1beta::GetServiceRequest.new + + # Call the get_service method. + result = client.get_service request + + # The returned object is of type Google::Cloud::CommerceProducer::V1beta::Service. + p result +end +# [END commerceproducer_v1beta_generated_CommerceTransaction_GetService_sync] diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/get_sku.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/get_sku.rb new file mode 100644 index 000000000000..6a01f721fa6e --- /dev/null +++ b/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/get_sku.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START commerceproducer_v1beta_generated_CommerceTransaction_GetSku_sync] +require "google/cloud/commerce_producer/v1beta" + +## +# Snippet for the get_sku call in the CommerceTransaction service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#get_sku. +# +def get_sku + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CommerceProducer::V1beta::GetSkuRequest.new + + # Call the get_sku method. + result = client.get_sku request + + # The returned object is of type Google::Cloud::CommerceProducer::V1beta::Sku. + p result +end +# [END commerceproducer_v1beta_generated_CommerceTransaction_GetSku_sync] diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/get_sku_group.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/get_sku_group.rb new file mode 100644 index 000000000000..f3f1cfe49856 --- /dev/null +++ b/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/get_sku_group.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START commerceproducer_v1beta_generated_CommerceTransaction_GetSkuGroup_sync] +require "google/cloud/commerce_producer/v1beta" + +## +# Snippet for the get_sku_group call in the CommerceTransaction service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#get_sku_group. +# +def get_sku_group + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CommerceProducer::V1beta::GetSkuGroupRequest.new + + # Call the get_sku_group method. + result = client.get_sku_group request + + # The returned object is of type Google::Cloud::CommerceProducer::V1beta::SkuGroup. + p result +end +# [END commerceproducer_v1beta_generated_CommerceTransaction_GetSkuGroup_sync] diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/get_standard_offer.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/get_standard_offer.rb new file mode 100644 index 000000000000..30bb3d82db00 --- /dev/null +++ b/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/get_standard_offer.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START commerceproducer_v1beta_generated_CommerceTransaction_GetStandardOffer_sync] +require "google/cloud/commerce_producer/v1beta" + +## +# Snippet for the get_standard_offer call in the CommerceTransaction service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#get_standard_offer. +# +def get_standard_offer + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CommerceProducer::V1beta::GetStandardOfferRequest.new + + # Call the get_standard_offer method. + result = client.get_standard_offer request + + # The returned object is of type Google::Cloud::CommerceProducer::V1beta::StandardOffer. + p result +end +# [END commerceproducer_v1beta_generated_CommerceTransaction_GetStandardOffer_sync] diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/list_private_offer_documents.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/list_private_offer_documents.rb new file mode 100644 index 000000000000..90be76588c1f --- /dev/null +++ b/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/list_private_offer_documents.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START commerceproducer_v1beta_generated_CommerceTransaction_ListPrivateOfferDocuments_sync] +require "google/cloud/commerce_producer/v1beta" + +## +# Snippet for the list_private_offer_documents call in the CommerceTransaction service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#list_private_offer_documents. +# +def list_private_offer_documents + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CommerceProducer::V1beta::ListPrivateOfferDocumentsRequest.new + + # Call the list_private_offer_documents method. + result = client.list_private_offer_documents request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument. + p item + end +end +# [END commerceproducer_v1beta_generated_CommerceTransaction_ListPrivateOfferDocuments_sync] diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/list_private_offers.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/list_private_offers.rb new file mode 100644 index 000000000000..69eebe671065 --- /dev/null +++ b/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/list_private_offers.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START commerceproducer_v1beta_generated_CommerceTransaction_ListPrivateOffers_sync] +require "google/cloud/commerce_producer/v1beta" + +## +# Snippet for the list_private_offers call in the CommerceTransaction service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#list_private_offers. +# +def list_private_offers + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CommerceProducer::V1beta::ListPrivateOffersRequest.new + + # Call the list_private_offers method. + result = client.list_private_offers request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::CommerceProducer::V1beta::PrivateOffer. + p item + end +end +# [END commerceproducer_v1beta_generated_CommerceTransaction_ListPrivateOffers_sync] diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/list_services.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/list_services.rb new file mode 100644 index 000000000000..1d7fbc02c82e --- /dev/null +++ b/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/list_services.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START commerceproducer_v1beta_generated_CommerceTransaction_ListServices_sync] +require "google/cloud/commerce_producer/v1beta" + +## +# Snippet for the list_services call in the CommerceTransaction service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#list_services. +# +def list_services + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CommerceProducer::V1beta::ListServicesRequest.new + + # Call the list_services method. + result = client.list_services request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::CommerceProducer::V1beta::Service. + p item + end +end +# [END commerceproducer_v1beta_generated_CommerceTransaction_ListServices_sync] diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/list_sku_groups.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/list_sku_groups.rb new file mode 100644 index 000000000000..1a3ed475eab3 --- /dev/null +++ b/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/list_sku_groups.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START commerceproducer_v1beta_generated_CommerceTransaction_ListSkuGroups_sync] +require "google/cloud/commerce_producer/v1beta" + +## +# Snippet for the list_sku_groups call in the CommerceTransaction service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#list_sku_groups. +# +def list_sku_groups + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CommerceProducer::V1beta::ListSkuGroupsRequest.new + + # Call the list_sku_groups method. + result = client.list_sku_groups request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::CommerceProducer::V1beta::SkuGroup. + p item + end +end +# [END commerceproducer_v1beta_generated_CommerceTransaction_ListSkuGroups_sync] diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/list_skus.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/list_skus.rb new file mode 100644 index 000000000000..0f4ed20c182e --- /dev/null +++ b/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/list_skus.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START commerceproducer_v1beta_generated_CommerceTransaction_ListSkus_sync] +require "google/cloud/commerce_producer/v1beta" + +## +# Snippet for the list_skus call in the CommerceTransaction service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#list_skus. +# +def list_skus + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CommerceProducer::V1beta::ListSkusRequest.new + + # Call the list_skus method. + result = client.list_skus request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::CommerceProducer::V1beta::Sku. + p item + end +end +# [END commerceproducer_v1beta_generated_CommerceTransaction_ListSkus_sync] diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/list_standard_offers.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/list_standard_offers.rb new file mode 100644 index 000000000000..3ea41da0474d --- /dev/null +++ b/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/list_standard_offers.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START commerceproducer_v1beta_generated_CommerceTransaction_ListStandardOffers_sync] +require "google/cloud/commerce_producer/v1beta" + +## +# Snippet for the list_standard_offers call in the CommerceTransaction service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#list_standard_offers. +# +def list_standard_offers + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CommerceProducer::V1beta::ListStandardOffersRequest.new + + # Call the list_standard_offers method. + result = client.list_standard_offers request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::CommerceProducer::V1beta::StandardOffer. + p item + end +end +# [END commerceproducer_v1beta_generated_CommerceTransaction_ListStandardOffers_sync] diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/publish_private_offer.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/publish_private_offer.rb new file mode 100644 index 000000000000..e46a86871be8 --- /dev/null +++ b/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/publish_private_offer.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START commerceproducer_v1beta_generated_CommerceTransaction_PublishPrivateOffer_sync] +require "google/cloud/commerce_producer/v1beta" + +## +# Snippet for the publish_private_offer call in the CommerceTransaction service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#publish_private_offer. +# +def publish_private_offer + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CommerceProducer::V1beta::PublishPrivateOfferRequest.new + + # Call the publish_private_offer method. + result = client.publish_private_offer request + + # The returned object is of type Google::Cloud::CommerceProducer::V1beta::PrivateOffer. + p result +end +# [END commerceproducer_v1beta_generated_CommerceTransaction_PublishPrivateOffer_sync] diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/resolve_amendment_target.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/resolve_amendment_target.rb new file mode 100644 index 000000000000..b9a314fa9449 --- /dev/null +++ b/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/resolve_amendment_target.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START commerceproducer_v1beta_generated_CommerceTransaction_ResolveAmendmentTarget_sync] +require "google/cloud/commerce_producer/v1beta" + +## +# Snippet for the resolve_amendment_target call in the CommerceTransaction service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#resolve_amendment_target. +# +def resolve_amendment_target + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CommerceProducer::V1beta::ResolveAmendmentTargetRequest.new + + # Call the resolve_amendment_target method. + result = client.resolve_amendment_target request + + # The returned object is of type Google::Cloud::CommerceProducer::V1beta::ResolveAmendmentTargetResponse. + p result +end +# [END commerceproducer_v1beta_generated_CommerceTransaction_ResolveAmendmentTarget_sync] diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/update_private_offer.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/update_private_offer.rb new file mode 100644 index 000000000000..4ce3fe737a2c --- /dev/null +++ b/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/update_private_offer.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START commerceproducer_v1beta_generated_CommerceTransaction_UpdatePrivateOffer_sync] +require "google/cloud/commerce_producer/v1beta" + +## +# Snippet for the update_private_offer call in the CommerceTransaction service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#update_private_offer. +# +def update_private_offer + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CommerceProducer::V1beta::UpdatePrivateOfferRequest.new + + # Call the update_private_offer method. + result = client.update_private_offer request + + # The returned object is of type Google::Cloud::CommerceProducer::V1beta::PrivateOffer. + p result +end +# [END commerceproducer_v1beta_generated_CommerceTransaction_UpdatePrivateOffer_sync] diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/update_private_offer_document.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/update_private_offer_document.rb new file mode 100644 index 000000000000..1c02c7e033bd --- /dev/null +++ b/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/update_private_offer_document.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START commerceproducer_v1beta_generated_CommerceTransaction_UpdatePrivateOfferDocument_sync] +require "google/cloud/commerce_producer/v1beta" + +## +# Snippet for the update_private_offer_document call in the CommerceTransaction service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#update_private_offer_document. +# +def update_private_offer_document + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::CommerceProducer::V1beta::UpdatePrivateOfferDocumentRequest.new + + # Call the update_private_offer_document method. + result = client.update_private_offer_document request + + # The returned object is of type Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument. + p result +end +# [END commerceproducer_v1beta_generated_CommerceTransaction_UpdatePrivateOfferDocument_sync] diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/snippet_metadata_google.cloud.commerceproducer.v1beta.json b/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/snippet_metadata_google.cloud.commerceproducer.v1beta.json new file mode 100644 index 000000000000..6e1a305a5059 --- /dev/null +++ b/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/snippet_metadata_google.cloud.commerceproducer.v1beta.json @@ -0,0 +1,855 @@ +{ + "client_library": { + "name": "google-cloud-commerce_producer-v1beta", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.commerceproducer.v1beta", + "version": "v1beta" + } + ] + }, + "snippets": [ + { + "region_tag": "commerceproducer_v1beta_generated_CommerceTransaction_ListServices_sync", + "title": "Snippet for the list_services call in the CommerceTransaction service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#list_services.", + "file": "commerce_transaction/list_services.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_services", + "full_name": "::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#list_services", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CommerceProducer::V1beta::ListServicesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::CommerceProducer::V1beta::ListServicesResponse", + "client": { + "short_name": "CommerceTransaction::Client", + "full_name": "::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client" + }, + "method": { + "short_name": "ListServices", + "full_name": "google.cloud.commerceproducer.v1beta.CommerceTransaction.ListServices", + "service": { + "short_name": "CommerceTransaction", + "full_name": "google.cloud.commerceproducer.v1beta.CommerceTransaction" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "commerceproducer_v1beta_generated_CommerceTransaction_GetService_sync", + "title": "Snippet for the get_service call in the CommerceTransaction service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#get_service.", + "file": "commerce_transaction/get_service.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_service", + "full_name": "::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#get_service", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CommerceProducer::V1beta::GetServiceRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::CommerceProducer::V1beta::Service", + "client": { + "short_name": "CommerceTransaction::Client", + "full_name": "::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client" + }, + "method": { + "short_name": "GetService", + "full_name": "google.cloud.commerceproducer.v1beta.CommerceTransaction.GetService", + "service": { + "short_name": "CommerceTransaction", + "full_name": "google.cloud.commerceproducer.v1beta.CommerceTransaction" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "commerceproducer_v1beta_generated_CommerceTransaction_ListPrivateOffers_sync", + "title": "Snippet for the list_private_offers call in the CommerceTransaction service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#list_private_offers.", + "file": "commerce_transaction/list_private_offers.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_private_offers", + "full_name": "::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#list_private_offers", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CommerceProducer::V1beta::ListPrivateOffersRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::CommerceProducer::V1beta::ListPrivateOffersResponse", + "client": { + "short_name": "CommerceTransaction::Client", + "full_name": "::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client" + }, + "method": { + "short_name": "ListPrivateOffers", + "full_name": "google.cloud.commerceproducer.v1beta.CommerceTransaction.ListPrivateOffers", + "service": { + "short_name": "CommerceTransaction", + "full_name": "google.cloud.commerceproducer.v1beta.CommerceTransaction" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "commerceproducer_v1beta_generated_CommerceTransaction_GetPrivateOffer_sync", + "title": "Snippet for the get_private_offer call in the CommerceTransaction service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#get_private_offer.", + "file": "commerce_transaction/get_private_offer.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_private_offer", + "full_name": "::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#get_private_offer", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CommerceProducer::V1beta::GetPrivateOfferRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::CommerceProducer::V1beta::PrivateOffer", + "client": { + "short_name": "CommerceTransaction::Client", + "full_name": "::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client" + }, + "method": { + "short_name": "GetPrivateOffer", + "full_name": "google.cloud.commerceproducer.v1beta.CommerceTransaction.GetPrivateOffer", + "service": { + "short_name": "CommerceTransaction", + "full_name": "google.cloud.commerceproducer.v1beta.CommerceTransaction" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "commerceproducer_v1beta_generated_CommerceTransaction_ResolveAmendmentTarget_sync", + "title": "Snippet for the resolve_amendment_target call in the CommerceTransaction service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#resolve_amendment_target.", + "file": "commerce_transaction/resolve_amendment_target.rb", + "language": "RUBY", + "client_method": { + "short_name": "resolve_amendment_target", + "full_name": "::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#resolve_amendment_target", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CommerceProducer::V1beta::ResolveAmendmentTargetRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::CommerceProducer::V1beta::ResolveAmendmentTargetResponse", + "client": { + "short_name": "CommerceTransaction::Client", + "full_name": "::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client" + }, + "method": { + "short_name": "ResolveAmendmentTarget", + "full_name": "google.cloud.commerceproducer.v1beta.CommerceTransaction.ResolveAmendmentTarget", + "service": { + "short_name": "CommerceTransaction", + "full_name": "google.cloud.commerceproducer.v1beta.CommerceTransaction" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "commerceproducer_v1beta_generated_CommerceTransaction_CreatePrivateOffer_sync", + "title": "Snippet for the create_private_offer call in the CommerceTransaction service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#create_private_offer.", + "file": "commerce_transaction/create_private_offer.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_private_offer", + "full_name": "::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#create_private_offer", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CommerceProducer::V1beta::CreatePrivateOfferRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::CommerceProducer::V1beta::PrivateOffer", + "client": { + "short_name": "CommerceTransaction::Client", + "full_name": "::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client" + }, + "method": { + "short_name": "CreatePrivateOffer", + "full_name": "google.cloud.commerceproducer.v1beta.CommerceTransaction.CreatePrivateOffer", + "service": { + "short_name": "CommerceTransaction", + "full_name": "google.cloud.commerceproducer.v1beta.CommerceTransaction" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "commerceproducer_v1beta_generated_CommerceTransaction_UpdatePrivateOffer_sync", + "title": "Snippet for the update_private_offer call in the CommerceTransaction service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#update_private_offer.", + "file": "commerce_transaction/update_private_offer.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_private_offer", + "full_name": "::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#update_private_offer", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CommerceProducer::V1beta::UpdatePrivateOfferRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::CommerceProducer::V1beta::PrivateOffer", + "client": { + "short_name": "CommerceTransaction::Client", + "full_name": "::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client" + }, + "method": { + "short_name": "UpdatePrivateOffer", + "full_name": "google.cloud.commerceproducer.v1beta.CommerceTransaction.UpdatePrivateOffer", + "service": { + "short_name": "CommerceTransaction", + "full_name": "google.cloud.commerceproducer.v1beta.CommerceTransaction" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "commerceproducer_v1beta_generated_CommerceTransaction_PublishPrivateOffer_sync", + "title": "Snippet for the publish_private_offer call in the CommerceTransaction service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#publish_private_offer.", + "file": "commerce_transaction/publish_private_offer.rb", + "language": "RUBY", + "client_method": { + "short_name": "publish_private_offer", + "full_name": "::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#publish_private_offer", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CommerceProducer::V1beta::PublishPrivateOfferRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::CommerceProducer::V1beta::PrivateOffer", + "client": { + "short_name": "CommerceTransaction::Client", + "full_name": "::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client" + }, + "method": { + "short_name": "PublishPrivateOffer", + "full_name": "google.cloud.commerceproducer.v1beta.CommerceTransaction.PublishPrivateOffer", + "service": { + "short_name": "CommerceTransaction", + "full_name": "google.cloud.commerceproducer.v1beta.CommerceTransaction" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "commerceproducer_v1beta_generated_CommerceTransaction_CancelPrivateOffer_sync", + "title": "Snippet for the cancel_private_offer call in the CommerceTransaction service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#cancel_private_offer.", + "file": "commerce_transaction/cancel_private_offer.rb", + "language": "RUBY", + "client_method": { + "short_name": "cancel_private_offer", + "full_name": "::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#cancel_private_offer", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CommerceProducer::V1beta::CancelPrivateOfferRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::CommerceProducer::V1beta::PrivateOffer", + "client": { + "short_name": "CommerceTransaction::Client", + "full_name": "::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client" + }, + "method": { + "short_name": "CancelPrivateOffer", + "full_name": "google.cloud.commerceproducer.v1beta.CommerceTransaction.CancelPrivateOffer", + "service": { + "short_name": "CommerceTransaction", + "full_name": "google.cloud.commerceproducer.v1beta.CommerceTransaction" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "commerceproducer_v1beta_generated_CommerceTransaction_DeletePrivateOffer_sync", + "title": "Snippet for the delete_private_offer call in the CommerceTransaction service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#delete_private_offer.", + "file": "commerce_transaction/delete_private_offer.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_private_offer", + "full_name": "::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#delete_private_offer", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CommerceProducer::V1beta::DeletePrivateOfferRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "CommerceTransaction::Client", + "full_name": "::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client" + }, + "method": { + "short_name": "DeletePrivateOffer", + "full_name": "google.cloud.commerceproducer.v1beta.CommerceTransaction.DeletePrivateOffer", + "service": { + "short_name": "CommerceTransaction", + "full_name": "google.cloud.commerceproducer.v1beta.CommerceTransaction" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "commerceproducer_v1beta_generated_CommerceTransaction_ListPrivateOfferDocuments_sync", + "title": "Snippet for the list_private_offer_documents call in the CommerceTransaction service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#list_private_offer_documents.", + "file": "commerce_transaction/list_private_offer_documents.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_private_offer_documents", + "full_name": "::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#list_private_offer_documents", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CommerceProducer::V1beta::ListPrivateOfferDocumentsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::CommerceProducer::V1beta::ListPrivateOfferDocumentsResponse", + "client": { + "short_name": "CommerceTransaction::Client", + "full_name": "::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client" + }, + "method": { + "short_name": "ListPrivateOfferDocuments", + "full_name": "google.cloud.commerceproducer.v1beta.CommerceTransaction.ListPrivateOfferDocuments", + "service": { + "short_name": "CommerceTransaction", + "full_name": "google.cloud.commerceproducer.v1beta.CommerceTransaction" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "commerceproducer_v1beta_generated_CommerceTransaction_GetPrivateOfferDocument_sync", + "title": "Snippet for the get_private_offer_document call in the CommerceTransaction service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#get_private_offer_document.", + "file": "commerce_transaction/get_private_offer_document.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_private_offer_document", + "full_name": "::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#get_private_offer_document", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CommerceProducer::V1beta::GetPrivateOfferDocumentRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument", + "client": { + "short_name": "CommerceTransaction::Client", + "full_name": "::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client" + }, + "method": { + "short_name": "GetPrivateOfferDocument", + "full_name": "google.cloud.commerceproducer.v1beta.CommerceTransaction.GetPrivateOfferDocument", + "service": { + "short_name": "CommerceTransaction", + "full_name": "google.cloud.commerceproducer.v1beta.CommerceTransaction" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "commerceproducer_v1beta_generated_CommerceTransaction_CreatePrivateOfferDocument_sync", + "title": "Snippet for the create_private_offer_document call in the CommerceTransaction service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#create_private_offer_document.", + "file": "commerce_transaction/create_private_offer_document.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_private_offer_document", + "full_name": "::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#create_private_offer_document", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CommerceProducer::V1beta::CreatePrivateOfferDocumentRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument", + "client": { + "short_name": "CommerceTransaction::Client", + "full_name": "::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client" + }, + "method": { + "short_name": "CreatePrivateOfferDocument", + "full_name": "google.cloud.commerceproducer.v1beta.CommerceTransaction.CreatePrivateOfferDocument", + "service": { + "short_name": "CommerceTransaction", + "full_name": "google.cloud.commerceproducer.v1beta.CommerceTransaction" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "commerceproducer_v1beta_generated_CommerceTransaction_UpdatePrivateOfferDocument_sync", + "title": "Snippet for the update_private_offer_document call in the CommerceTransaction service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#update_private_offer_document.", + "file": "commerce_transaction/update_private_offer_document.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_private_offer_document", + "full_name": "::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#update_private_offer_document", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CommerceProducer::V1beta::UpdatePrivateOfferDocumentRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument", + "client": { + "short_name": "CommerceTransaction::Client", + "full_name": "::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client" + }, + "method": { + "short_name": "UpdatePrivateOfferDocument", + "full_name": "google.cloud.commerceproducer.v1beta.CommerceTransaction.UpdatePrivateOfferDocument", + "service": { + "short_name": "CommerceTransaction", + "full_name": "google.cloud.commerceproducer.v1beta.CommerceTransaction" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "commerceproducer_v1beta_generated_CommerceTransaction_DeletePrivateOfferDocument_sync", + "title": "Snippet for the delete_private_offer_document call in the CommerceTransaction service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#delete_private_offer_document.", + "file": "commerce_transaction/delete_private_offer_document.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_private_offer_document", + "full_name": "::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#delete_private_offer_document", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CommerceProducer::V1beta::DeletePrivateOfferDocumentRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "CommerceTransaction::Client", + "full_name": "::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client" + }, + "method": { + "short_name": "DeletePrivateOfferDocument", + "full_name": "google.cloud.commerceproducer.v1beta.CommerceTransaction.DeletePrivateOfferDocument", + "service": { + "short_name": "CommerceTransaction", + "full_name": "google.cloud.commerceproducer.v1beta.CommerceTransaction" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "commerceproducer_v1beta_generated_CommerceTransaction_ListStandardOffers_sync", + "title": "Snippet for the list_standard_offers call in the CommerceTransaction service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#list_standard_offers.", + "file": "commerce_transaction/list_standard_offers.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_standard_offers", + "full_name": "::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#list_standard_offers", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CommerceProducer::V1beta::ListStandardOffersRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::CommerceProducer::V1beta::ListStandardOffersResponse", + "client": { + "short_name": "CommerceTransaction::Client", + "full_name": "::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client" + }, + "method": { + "short_name": "ListStandardOffers", + "full_name": "google.cloud.commerceproducer.v1beta.CommerceTransaction.ListStandardOffers", + "service": { + "short_name": "CommerceTransaction", + "full_name": "google.cloud.commerceproducer.v1beta.CommerceTransaction" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "commerceproducer_v1beta_generated_CommerceTransaction_GetStandardOffer_sync", + "title": "Snippet for the get_standard_offer call in the CommerceTransaction service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#get_standard_offer.", + "file": "commerce_transaction/get_standard_offer.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_standard_offer", + "full_name": "::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#get_standard_offer", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CommerceProducer::V1beta::GetStandardOfferRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::CommerceProducer::V1beta::StandardOffer", + "client": { + "short_name": "CommerceTransaction::Client", + "full_name": "::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client" + }, + "method": { + "short_name": "GetStandardOffer", + "full_name": "google.cloud.commerceproducer.v1beta.CommerceTransaction.GetStandardOffer", + "service": { + "short_name": "CommerceTransaction", + "full_name": "google.cloud.commerceproducer.v1beta.CommerceTransaction" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "commerceproducer_v1beta_generated_CommerceTransaction_GetSku_sync", + "title": "Snippet for the get_sku call in the CommerceTransaction service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#get_sku.", + "file": "commerce_transaction/get_sku.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_sku", + "full_name": "::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#get_sku", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CommerceProducer::V1beta::GetSkuRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::CommerceProducer::V1beta::Sku", + "client": { + "short_name": "CommerceTransaction::Client", + "full_name": "::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client" + }, + "method": { + "short_name": "GetSku", + "full_name": "google.cloud.commerceproducer.v1beta.CommerceTransaction.GetSku", + "service": { + "short_name": "CommerceTransaction", + "full_name": "google.cloud.commerceproducer.v1beta.CommerceTransaction" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "commerceproducer_v1beta_generated_CommerceTransaction_ListSkus_sync", + "title": "Snippet for the list_skus call in the CommerceTransaction service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#list_skus.", + "file": "commerce_transaction/list_skus.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_skus", + "full_name": "::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#list_skus", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CommerceProducer::V1beta::ListSkusRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::CommerceProducer::V1beta::ListSkusResponse", + "client": { + "short_name": "CommerceTransaction::Client", + "full_name": "::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client" + }, + "method": { + "short_name": "ListSkus", + "full_name": "google.cloud.commerceproducer.v1beta.CommerceTransaction.ListSkus", + "service": { + "short_name": "CommerceTransaction", + "full_name": "google.cloud.commerceproducer.v1beta.CommerceTransaction" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "commerceproducer_v1beta_generated_CommerceTransaction_GetSkuGroup_sync", + "title": "Snippet for the get_sku_group call in the CommerceTransaction service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#get_sku_group.", + "file": "commerce_transaction/get_sku_group.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_sku_group", + "full_name": "::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#get_sku_group", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CommerceProducer::V1beta::GetSkuGroupRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::CommerceProducer::V1beta::SkuGroup", + "client": { + "short_name": "CommerceTransaction::Client", + "full_name": "::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client" + }, + "method": { + "short_name": "GetSkuGroup", + "full_name": "google.cloud.commerceproducer.v1beta.CommerceTransaction.GetSkuGroup", + "service": { + "short_name": "CommerceTransaction", + "full_name": "google.cloud.commerceproducer.v1beta.CommerceTransaction" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "commerceproducer_v1beta_generated_CommerceTransaction_ListSkuGroups_sync", + "title": "Snippet for the list_sku_groups call in the CommerceTransaction service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#list_sku_groups.", + "file": "commerce_transaction/list_sku_groups.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_sku_groups", + "full_name": "::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#list_sku_groups", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::CommerceProducer::V1beta::ListSkuGroupsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::CommerceProducer::V1beta::ListSkuGroupsResponse", + "client": { + "short_name": "CommerceTransaction::Client", + "full_name": "::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client" + }, + "method": { + "short_name": "ListSkuGroups", + "full_name": "google.cloud.commerceproducer.v1beta.CommerceTransaction.ListSkuGroups", + "service": { + "short_name": "CommerceTransaction", + "full_name": "google.cloud.commerceproducer.v1beta.CommerceTransaction" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/test/google/cloud/commerce_producer/v1beta/commerce_transaction_paths_test.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/test/google/cloud/commerce_producer/v1beta/commerce_transaction_paths_test.rb new file mode 100644 index 000000000000..f104260060f1 --- /dev/null +++ b/owl-bot-staging/google-cloud-commerce_producer-v1beta/test/google/cloud/commerce_producer/v1beta/commerce_transaction_paths_test.rb @@ -0,0 +1,139 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/commerce_producer/v1beta/commerce_transaction" + +class ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_billing_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.billing_account_path billing_account: "value0" + assert_equal "billingAccounts/value0", path + end + end + + def test_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.location_path project: "value0", location: "value1" + assert_equal "projects/value0/locations/value1", path + end + end + + def test_private_offer_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.private_offer_path project: "value0", location: "value1", private_offer: "value2" + assert_equal "projects/value0/locations/value1/privateOffers/value2", path + end + end + + def test_private_offer_document_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.private_offer_document_path project: "value0", location: "value1", private_offer: "value2", document: "value3" + assert_equal "projects/value0/locations/value1/privateOffers/value2/documents/value3", path + end + end + + def test_service_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.service_path project: "value0", location: "value1", service: "value2" + assert_equal "projects/value0/locations/value1/services/value2", path + end + end + + def test_sku_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.sku_path project: "value0", location: "value1", service: "value2", sku: "value3" + assert_equal "projects/value0/locations/value1/services/value2/skus/value3", path + end + end + + def test_sku_group_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.sku_group_path project: "value0", location: "value1", sku_group: "value2" + assert_equal "projects/value0/locations/value1/skuGroups/value2", path + end + end + + def test_standard_offer_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.standard_offer_path project: "value0", location: "value1", service: "value2", standard_offer: "value3" + assert_equal "projects/value0/locations/value1/services/value2/standardOffers/value3", path + end + end +end diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/test/google/cloud/commerce_producer/v1beta/commerce_transaction_rest_test.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/test/google/cloud/commerce_producer/v1beta/commerce_transaction_rest_test.rb new file mode 100644 index 000000000000..ec7162fbeb3b --- /dev/null +++ b/owl-bot-staging/google-cloud-commerce_producer-v1beta/test/google/cloud/commerce_producer/v1beta/commerce_transaction_rest_test.rb @@ -0,0 +1,1261 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/cloud/commerceproducer/v1beta/commerce_transaction_pb" +require "google/cloud/commerce_producer/v1beta/commerce_transaction/rest" + + +class ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_services + # Create test objects. + client_result = ::Google::Cloud::CommerceProducer::V1beta::ListServicesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_services_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::ServiceStub.stub :transcode_list_services_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_services_client_stub do + # Create client + c = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_services({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_services parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_services ::Google::Cloud::CommerceProducer::V1beta::ListServicesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_services({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_services(::Google::Cloud::CommerceProducer::V1beta::ListServicesRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_services_client_stub.call_count + end + end + end + + def test_get_service + # Create test objects. + client_result = ::Google::Cloud::CommerceProducer::V1beta::Service.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + view = :SERVICE_VIEW_UNSPECIFIED + + get_service_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::ServiceStub.stub :transcode_get_service_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_service_client_stub do + # Create client + c = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_service({ name: name, view: view }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_service name: name, view: view do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_service ::Google::Cloud::CommerceProducer::V1beta::GetServiceRequest.new(name: name, view: view) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_service({ name: name, view: view }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_service(::Google::Cloud::CommerceProducer::V1beta::GetServiceRequest.new(name: name, view: view), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_service_client_stub.call_count + end + end + end + + def test_list_private_offers + # Create test objects. + client_result = ::Google::Cloud::CommerceProducer::V1beta::ListPrivateOffersResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_private_offers_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::ServiceStub.stub :transcode_list_private_offers_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_private_offers_client_stub do + # Create client + c = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_private_offers({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_private_offers parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_private_offers ::Google::Cloud::CommerceProducer::V1beta::ListPrivateOffersRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_private_offers({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_private_offers(::Google::Cloud::CommerceProducer::V1beta::ListPrivateOffersRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_private_offers_client_stub.call_count + end + end + end + + def test_get_private_offer + # Create test objects. + client_result = ::Google::Cloud::CommerceProducer::V1beta::PrivateOffer.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + view = :PRIVATE_OFFER_VIEW_UNSPECIFIED + + get_private_offer_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::ServiceStub.stub :transcode_get_private_offer_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_private_offer_client_stub do + # Create client + c = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_private_offer({ name: name, view: view }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_private_offer name: name, view: view do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_private_offer ::Google::Cloud::CommerceProducer::V1beta::GetPrivateOfferRequest.new(name: name, view: view) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_private_offer({ name: name, view: view }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_private_offer(::Google::Cloud::CommerceProducer::V1beta::GetPrivateOfferRequest.new(name: name, view: view), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_private_offer_client_stub.call_count + end + end + end + + def test_resolve_amendment_target + # Create test objects. + client_result = ::Google::Cloud::CommerceProducer::V1beta::ResolveAmendmentTargetResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + target_billing_account = "hello world" + base_standard_offer = "hello world" + + resolve_amendment_target_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::ServiceStub.stub :transcode_resolve_amendment_target_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, resolve_amendment_target_client_stub do + # Create client + c = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.resolve_amendment_target({ parent: parent, target_billing_account: target_billing_account, base_standard_offer: base_standard_offer }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.resolve_amendment_target parent: parent, target_billing_account: target_billing_account, base_standard_offer: base_standard_offer do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.resolve_amendment_target ::Google::Cloud::CommerceProducer::V1beta::ResolveAmendmentTargetRequest.new(parent: parent, target_billing_account: target_billing_account, base_standard_offer: base_standard_offer) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.resolve_amendment_target({ parent: parent, target_billing_account: target_billing_account, base_standard_offer: base_standard_offer }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.resolve_amendment_target(::Google::Cloud::CommerceProducer::V1beta::ResolveAmendmentTargetRequest.new(parent: parent, target_billing_account: target_billing_account, base_standard_offer: base_standard_offer), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, resolve_amendment_target_client_stub.call_count + end + end + end + + def test_create_private_offer + # Create test objects. + client_result = ::Google::Cloud::CommerceProducer::V1beta::PrivateOffer.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + private_offer = {} + + create_private_offer_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::ServiceStub.stub :transcode_create_private_offer_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_private_offer_client_stub do + # Create client + c = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_private_offer({ parent: parent, private_offer: private_offer }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_private_offer parent: parent, private_offer: private_offer do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_private_offer ::Google::Cloud::CommerceProducer::V1beta::CreatePrivateOfferRequest.new(parent: parent, private_offer: private_offer) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_private_offer({ parent: parent, private_offer: private_offer }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_private_offer(::Google::Cloud::CommerceProducer::V1beta::CreatePrivateOfferRequest.new(parent: parent, private_offer: private_offer), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_private_offer_client_stub.call_count + end + end + end + + def test_update_private_offer + # Create test objects. + client_result = ::Google::Cloud::CommerceProducer::V1beta::PrivateOffer.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + update_mask = {} + private_offer = {} + + update_private_offer_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::ServiceStub.stub :transcode_update_private_offer_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_private_offer_client_stub do + # Create client + c = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_private_offer({ update_mask: update_mask, private_offer: private_offer }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_private_offer update_mask: update_mask, private_offer: private_offer do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_private_offer ::Google::Cloud::CommerceProducer::V1beta::UpdatePrivateOfferRequest.new(update_mask: update_mask, private_offer: private_offer) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_private_offer({ update_mask: update_mask, private_offer: private_offer }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_private_offer(::Google::Cloud::CommerceProducer::V1beta::UpdatePrivateOfferRequest.new(update_mask: update_mask, private_offer: private_offer), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_private_offer_client_stub.call_count + end + end + end + + def test_publish_private_offer + # Create test objects. + client_result = ::Google::Cloud::CommerceProducer::V1beta::PrivateOffer.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + validate_only = true + + publish_private_offer_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::ServiceStub.stub :transcode_publish_private_offer_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, publish_private_offer_client_stub do + # Create client + c = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.publish_private_offer({ name: name, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.publish_private_offer name: name, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.publish_private_offer ::Google::Cloud::CommerceProducer::V1beta::PublishPrivateOfferRequest.new(name: name, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.publish_private_offer({ name: name, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.publish_private_offer(::Google::Cloud::CommerceProducer::V1beta::PublishPrivateOfferRequest.new(name: name, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, publish_private_offer_client_stub.call_count + end + end + end + + def test_cancel_private_offer + # Create test objects. + client_result = ::Google::Cloud::CommerceProducer::V1beta::PrivateOffer.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + cancellation_note = "hello world" + + cancel_private_offer_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::ServiceStub.stub :transcode_cancel_private_offer_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, cancel_private_offer_client_stub do + # Create client + c = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.cancel_private_offer({ name: name, cancellation_note: cancellation_note }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.cancel_private_offer name: name, cancellation_note: cancellation_note do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.cancel_private_offer ::Google::Cloud::CommerceProducer::V1beta::CancelPrivateOfferRequest.new(name: name, cancellation_note: cancellation_note) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.cancel_private_offer({ name: name, cancellation_note: cancellation_note }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.cancel_private_offer(::Google::Cloud::CommerceProducer::V1beta::CancelPrivateOfferRequest.new(name: name, cancellation_note: cancellation_note), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, cancel_private_offer_client_stub.call_count + end + end + end + + def test_delete_private_offer + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + force = true + + delete_private_offer_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::ServiceStub.stub :transcode_delete_private_offer_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_private_offer_client_stub do + # Create client + c = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_private_offer({ name: name, force: force }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_private_offer name: name, force: force do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_private_offer ::Google::Cloud::CommerceProducer::V1beta::DeletePrivateOfferRequest.new(name: name, force: force) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_private_offer({ name: name, force: force }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_private_offer(::Google::Cloud::CommerceProducer::V1beta::DeletePrivateOfferRequest.new(name: name, force: force), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_private_offer_client_stub.call_count + end + end + end + + def test_list_private_offer_documents + # Create test objects. + client_result = ::Google::Cloud::CommerceProducer::V1beta::ListPrivateOfferDocumentsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_private_offer_documents_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::ServiceStub.stub :transcode_list_private_offer_documents_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_private_offer_documents_client_stub do + # Create client + c = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_private_offer_documents({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_private_offer_documents parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_private_offer_documents ::Google::Cloud::CommerceProducer::V1beta::ListPrivateOfferDocumentsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_private_offer_documents({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_private_offer_documents(::Google::Cloud::CommerceProducer::V1beta::ListPrivateOfferDocumentsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_private_offer_documents_client_stub.call_count + end + end + end + + def test_get_private_offer_document + # Create test objects. + client_result = ::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_private_offer_document_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::ServiceStub.stub :transcode_get_private_offer_document_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_private_offer_document_client_stub do + # Create client + c = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_private_offer_document({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_private_offer_document name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_private_offer_document ::Google::Cloud::CommerceProducer::V1beta::GetPrivateOfferDocumentRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_private_offer_document({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_private_offer_document(::Google::Cloud::CommerceProducer::V1beta::GetPrivateOfferDocumentRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_private_offer_document_client_stub.call_count + end + end + end + + def test_create_private_offer_document + # Create test objects. + client_result = ::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + private_offer_document = {} + + create_private_offer_document_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::ServiceStub.stub :transcode_create_private_offer_document_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_private_offer_document_client_stub do + # Create client + c = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_private_offer_document({ parent: parent, private_offer_document: private_offer_document }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_private_offer_document parent: parent, private_offer_document: private_offer_document do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_private_offer_document ::Google::Cloud::CommerceProducer::V1beta::CreatePrivateOfferDocumentRequest.new(parent: parent, private_offer_document: private_offer_document) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_private_offer_document({ parent: parent, private_offer_document: private_offer_document }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_private_offer_document(::Google::Cloud::CommerceProducer::V1beta::CreatePrivateOfferDocumentRequest.new(parent: parent, private_offer_document: private_offer_document), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_private_offer_document_client_stub.call_count + end + end + end + + def test_update_private_offer_document + # Create test objects. + client_result = ::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + private_offer_document = {} + update_mask = {} + + update_private_offer_document_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::ServiceStub.stub :transcode_update_private_offer_document_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_private_offer_document_client_stub do + # Create client + c = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_private_offer_document({ private_offer_document: private_offer_document, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_private_offer_document private_offer_document: private_offer_document, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_private_offer_document ::Google::Cloud::CommerceProducer::V1beta::UpdatePrivateOfferDocumentRequest.new(private_offer_document: private_offer_document, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_private_offer_document({ private_offer_document: private_offer_document, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_private_offer_document(::Google::Cloud::CommerceProducer::V1beta::UpdatePrivateOfferDocumentRequest.new(private_offer_document: private_offer_document, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_private_offer_document_client_stub.call_count + end + end + end + + def test_delete_private_offer_document + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_private_offer_document_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::ServiceStub.stub :transcode_delete_private_offer_document_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_private_offer_document_client_stub do + # Create client + c = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_private_offer_document({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_private_offer_document name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_private_offer_document ::Google::Cloud::CommerceProducer::V1beta::DeletePrivateOfferDocumentRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_private_offer_document({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_private_offer_document(::Google::Cloud::CommerceProducer::V1beta::DeletePrivateOfferDocumentRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_private_offer_document_client_stub.call_count + end + end + end + + def test_list_standard_offers + # Create test objects. + client_result = ::Google::Cloud::CommerceProducer::V1beta::ListStandardOffersResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_standard_offers_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::ServiceStub.stub :transcode_list_standard_offers_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_standard_offers_client_stub do + # Create client + c = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_standard_offers({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_standard_offers parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_standard_offers ::Google::Cloud::CommerceProducer::V1beta::ListStandardOffersRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_standard_offers({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_standard_offers(::Google::Cloud::CommerceProducer::V1beta::ListStandardOffersRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_standard_offers_client_stub.call_count + end + end + end + + def test_get_standard_offer + # Create test objects. + client_result = ::Google::Cloud::CommerceProducer::V1beta::StandardOffer.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + view = :STANDARD_OFFER_VIEW_UNSPECIFIED + + get_standard_offer_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::ServiceStub.stub :transcode_get_standard_offer_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_standard_offer_client_stub do + # Create client + c = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_standard_offer({ name: name, view: view }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_standard_offer name: name, view: view do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_standard_offer ::Google::Cloud::CommerceProducer::V1beta::GetStandardOfferRequest.new(name: name, view: view) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_standard_offer({ name: name, view: view }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_standard_offer(::Google::Cloud::CommerceProducer::V1beta::GetStandardOfferRequest.new(name: name, view: view), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_standard_offer_client_stub.call_count + end + end + end + + def test_get_sku + # Create test objects. + client_result = ::Google::Cloud::CommerceProducer::V1beta::Sku.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_sku_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::ServiceStub.stub :transcode_get_sku_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_sku_client_stub do + # Create client + c = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_sku({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_sku name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_sku ::Google::Cloud::CommerceProducer::V1beta::GetSkuRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_sku({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_sku(::Google::Cloud::CommerceProducer::V1beta::GetSkuRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_sku_client_stub.call_count + end + end + end + + def test_list_skus + # Create test objects. + client_result = ::Google::Cloud::CommerceProducer::V1beta::ListSkusResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_skus_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::ServiceStub.stub :transcode_list_skus_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_skus_client_stub do + # Create client + c = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_skus({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_skus parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_skus ::Google::Cloud::CommerceProducer::V1beta::ListSkusRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_skus({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_skus(::Google::Cloud::CommerceProducer::V1beta::ListSkusRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_skus_client_stub.call_count + end + end + end + + def test_get_sku_group + # Create test objects. + client_result = ::Google::Cloud::CommerceProducer::V1beta::SkuGroup.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_sku_group_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::ServiceStub.stub :transcode_get_sku_group_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_sku_group_client_stub do + # Create client + c = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_sku_group({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_sku_group name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_sku_group ::Google::Cloud::CommerceProducer::V1beta::GetSkuGroupRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_sku_group({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_sku_group(::Google::Cloud::CommerceProducer::V1beta::GetSkuGroupRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_sku_group_client_stub.call_count + end + end + end + + def test_list_sku_groups + # Create test objects. + client_result = ::Google::Cloud::CommerceProducer::V1beta::ListSkuGroupsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_sku_groups_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::ServiceStub.stub :transcode_list_sku_groups_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_sku_groups_client_stub do + # Create client + c = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_sku_groups({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_sku_groups parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_sku_groups ::Google::Cloud::CommerceProducer::V1beta::ListSkuGroupsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.list_sku_groups({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.list_sku_groups(::Google::Cloud::CommerceProducer::V1beta::ListSkuGroupsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_sku_groups_client_stub.call_count + end + end + end + + def test_configure + credentials_token = :dummy_value + + client = block_config = config = nil + dummy_stub = ClientStub.new nil + Gapic::Rest::ClientStub.stub :new, dummy_stub do + client = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new do |config| + config.credentials = credentials_token + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/test/google/cloud/commerce_producer/v1beta/commerce_transaction_test.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/test/google/cloud/commerce_producer/v1beta/commerce_transaction_test.rb new file mode 100644 index 000000000000..c33bb10dda26 --- /dev/null +++ b/owl-bot-staging/google-cloud-commerce_producer-v1beta/test/google/cloud/commerce_producer/v1beta/commerce_transaction_test.rb @@ -0,0 +1,1408 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/commerceproducer/v1beta/commerce_transaction_pb" +require "google/cloud/commerce_producer/v1beta/commerce_transaction" + +class ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_services + # Create GRPC objects. + grpc_response = ::Google::Cloud::CommerceProducer::V1beta::ListServicesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_services_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_services, name + assert_kind_of ::Google::Cloud::CommerceProducer::V1beta::ListServicesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_services_client_stub do + # Create client + c = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_services({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_services parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_services ::Google::Cloud::CommerceProducer::V1beta::ListServicesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_services({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_services(::Google::Cloud::CommerceProducer::V1beta::ListServicesRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_services_client_stub.call_rpc_count + end + end + + def test_get_service + # Create GRPC objects. + grpc_response = ::Google::Cloud::CommerceProducer::V1beta::Service.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + view = :SERVICE_VIEW_UNSPECIFIED + + get_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_service, name + assert_kind_of ::Google::Cloud::CommerceProducer::V1beta::GetServiceRequest, request + assert_equal "hello world", request["name"] + assert_equal :SERVICE_VIEW_UNSPECIFIED, request["view"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_service_client_stub do + # Create client + c = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_service({ name: name, view: view }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_service name: name, view: view do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_service ::Google::Cloud::CommerceProducer::V1beta::GetServiceRequest.new(name: name, view: view) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_service({ name: name, view: view }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_service(::Google::Cloud::CommerceProducer::V1beta::GetServiceRequest.new(name: name, view: view), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_service_client_stub.call_rpc_count + end + end + + def test_list_private_offers + # Create GRPC objects. + grpc_response = ::Google::Cloud::CommerceProducer::V1beta::ListPrivateOffersResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_private_offers_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_private_offers, name + assert_kind_of ::Google::Cloud::CommerceProducer::V1beta::ListPrivateOffersRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_private_offers_client_stub do + # Create client + c = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_private_offers({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_private_offers parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_private_offers ::Google::Cloud::CommerceProducer::V1beta::ListPrivateOffersRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_private_offers({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_private_offers(::Google::Cloud::CommerceProducer::V1beta::ListPrivateOffersRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_private_offers_client_stub.call_rpc_count + end + end + + def test_get_private_offer + # Create GRPC objects. + grpc_response = ::Google::Cloud::CommerceProducer::V1beta::PrivateOffer.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + view = :PRIVATE_OFFER_VIEW_UNSPECIFIED + + get_private_offer_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_private_offer, name + assert_kind_of ::Google::Cloud::CommerceProducer::V1beta::GetPrivateOfferRequest, request + assert_equal "hello world", request["name"] + assert_equal :PRIVATE_OFFER_VIEW_UNSPECIFIED, request["view"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_private_offer_client_stub do + # Create client + c = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_private_offer({ name: name, view: view }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_private_offer name: name, view: view do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_private_offer ::Google::Cloud::CommerceProducer::V1beta::GetPrivateOfferRequest.new(name: name, view: view) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_private_offer({ name: name, view: view }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_private_offer(::Google::Cloud::CommerceProducer::V1beta::GetPrivateOfferRequest.new(name: name, view: view), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_private_offer_client_stub.call_rpc_count + end + end + + def test_resolve_amendment_target + # Create GRPC objects. + grpc_response = ::Google::Cloud::CommerceProducer::V1beta::ResolveAmendmentTargetResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + target_billing_account = "hello world" + base_standard_offer = "hello world" + + resolve_amendment_target_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :resolve_amendment_target, name + assert_kind_of ::Google::Cloud::CommerceProducer::V1beta::ResolveAmendmentTargetRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["target_billing_account"] + assert_equal "hello world", request["base_standard_offer"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, resolve_amendment_target_client_stub do + # Create client + c = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.resolve_amendment_target({ parent: parent, target_billing_account: target_billing_account, base_standard_offer: base_standard_offer }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.resolve_amendment_target parent: parent, target_billing_account: target_billing_account, base_standard_offer: base_standard_offer do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.resolve_amendment_target ::Google::Cloud::CommerceProducer::V1beta::ResolveAmendmentTargetRequest.new(parent: parent, target_billing_account: target_billing_account, base_standard_offer: base_standard_offer) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.resolve_amendment_target({ parent: parent, target_billing_account: target_billing_account, base_standard_offer: base_standard_offer }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.resolve_amendment_target(::Google::Cloud::CommerceProducer::V1beta::ResolveAmendmentTargetRequest.new(parent: parent, target_billing_account: target_billing_account, base_standard_offer: base_standard_offer), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, resolve_amendment_target_client_stub.call_rpc_count + end + end + + def test_create_private_offer + # Create GRPC objects. + grpc_response = ::Google::Cloud::CommerceProducer::V1beta::PrivateOffer.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + private_offer = {} + + create_private_offer_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_private_offer, name + assert_kind_of ::Google::Cloud::CommerceProducer::V1beta::CreatePrivateOfferRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::CommerceProducer::V1beta::PrivateOffer), request["private_offer"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_private_offer_client_stub do + # Create client + c = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_private_offer({ parent: parent, private_offer: private_offer }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_private_offer parent: parent, private_offer: private_offer do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_private_offer ::Google::Cloud::CommerceProducer::V1beta::CreatePrivateOfferRequest.new(parent: parent, private_offer: private_offer) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_private_offer({ parent: parent, private_offer: private_offer }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_private_offer(::Google::Cloud::CommerceProducer::V1beta::CreatePrivateOfferRequest.new(parent: parent, private_offer: private_offer), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_private_offer_client_stub.call_rpc_count + end + end + + def test_update_private_offer + # Create GRPC objects. + grpc_response = ::Google::Cloud::CommerceProducer::V1beta::PrivateOffer.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + update_mask = {} + private_offer = {} + + update_private_offer_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_private_offer, name + assert_kind_of ::Google::Cloud::CommerceProducer::V1beta::UpdatePrivateOfferRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::CommerceProducer::V1beta::PrivateOffer), request["private_offer"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_private_offer_client_stub do + # Create client + c = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_private_offer({ update_mask: update_mask, private_offer: private_offer }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_private_offer update_mask: update_mask, private_offer: private_offer do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_private_offer ::Google::Cloud::CommerceProducer::V1beta::UpdatePrivateOfferRequest.new(update_mask: update_mask, private_offer: private_offer) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_private_offer({ update_mask: update_mask, private_offer: private_offer }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_private_offer(::Google::Cloud::CommerceProducer::V1beta::UpdatePrivateOfferRequest.new(update_mask: update_mask, private_offer: private_offer), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_private_offer_client_stub.call_rpc_count + end + end + + def test_publish_private_offer + # Create GRPC objects. + grpc_response = ::Google::Cloud::CommerceProducer::V1beta::PrivateOffer.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + validate_only = true + + publish_private_offer_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :publish_private_offer, name + assert_kind_of ::Google::Cloud::CommerceProducer::V1beta::PublishPrivateOfferRequest, request + assert_equal "hello world", request["name"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, publish_private_offer_client_stub do + # Create client + c = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.publish_private_offer({ name: name, validate_only: validate_only }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.publish_private_offer name: name, validate_only: validate_only do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.publish_private_offer ::Google::Cloud::CommerceProducer::V1beta::PublishPrivateOfferRequest.new(name: name, validate_only: validate_only) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.publish_private_offer({ name: name, validate_only: validate_only }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.publish_private_offer(::Google::Cloud::CommerceProducer::V1beta::PublishPrivateOfferRequest.new(name: name, validate_only: validate_only), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, publish_private_offer_client_stub.call_rpc_count + end + end + + def test_cancel_private_offer + # Create GRPC objects. + grpc_response = ::Google::Cloud::CommerceProducer::V1beta::PrivateOffer.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + cancellation_note = "hello world" + + cancel_private_offer_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_private_offer, name + assert_kind_of ::Google::Cloud::CommerceProducer::V1beta::CancelPrivateOfferRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["cancellation_note"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_private_offer_client_stub do + # Create client + c = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.cancel_private_offer({ name: name, cancellation_note: cancellation_note }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.cancel_private_offer name: name, cancellation_note: cancellation_note do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.cancel_private_offer ::Google::Cloud::CommerceProducer::V1beta::CancelPrivateOfferRequest.new(name: name, cancellation_note: cancellation_note) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.cancel_private_offer({ name: name, cancellation_note: cancellation_note }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.cancel_private_offer(::Google::Cloud::CommerceProducer::V1beta::CancelPrivateOfferRequest.new(name: name, cancellation_note: cancellation_note), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, cancel_private_offer_client_stub.call_rpc_count + end + end + + def test_delete_private_offer + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + force = true + + delete_private_offer_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_private_offer, name + assert_kind_of ::Google::Cloud::CommerceProducer::V1beta::DeletePrivateOfferRequest, request + assert_equal "hello world", request["name"] + assert_equal true, request["force"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_private_offer_client_stub do + # Create client + c = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_private_offer({ name: name, force: force }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_private_offer name: name, force: force do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_private_offer ::Google::Cloud::CommerceProducer::V1beta::DeletePrivateOfferRequest.new(name: name, force: force) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_private_offer({ name: name, force: force }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_private_offer(::Google::Cloud::CommerceProducer::V1beta::DeletePrivateOfferRequest.new(name: name, force: force), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_private_offer_client_stub.call_rpc_count + end + end + + def test_list_private_offer_documents + # Create GRPC objects. + grpc_response = ::Google::Cloud::CommerceProducer::V1beta::ListPrivateOfferDocumentsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_private_offer_documents_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_private_offer_documents, name + assert_kind_of ::Google::Cloud::CommerceProducer::V1beta::ListPrivateOfferDocumentsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_private_offer_documents_client_stub do + # Create client + c = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_private_offer_documents({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_private_offer_documents parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_private_offer_documents ::Google::Cloud::CommerceProducer::V1beta::ListPrivateOfferDocumentsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_private_offer_documents({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_private_offer_documents(::Google::Cloud::CommerceProducer::V1beta::ListPrivateOfferDocumentsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_private_offer_documents_client_stub.call_rpc_count + end + end + + def test_get_private_offer_document + # Create GRPC objects. + grpc_response = ::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_private_offer_document_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_private_offer_document, name + assert_kind_of ::Google::Cloud::CommerceProducer::V1beta::GetPrivateOfferDocumentRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_private_offer_document_client_stub do + # Create client + c = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_private_offer_document({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_private_offer_document name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_private_offer_document ::Google::Cloud::CommerceProducer::V1beta::GetPrivateOfferDocumentRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_private_offer_document({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_private_offer_document(::Google::Cloud::CommerceProducer::V1beta::GetPrivateOfferDocumentRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_private_offer_document_client_stub.call_rpc_count + end + end + + def test_create_private_offer_document + # Create GRPC objects. + grpc_response = ::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + private_offer_document = {} + + create_private_offer_document_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_private_offer_document, name + assert_kind_of ::Google::Cloud::CommerceProducer::V1beta::CreatePrivateOfferDocumentRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument), request["private_offer_document"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_private_offer_document_client_stub do + # Create client + c = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_private_offer_document({ parent: parent, private_offer_document: private_offer_document }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_private_offer_document parent: parent, private_offer_document: private_offer_document do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_private_offer_document ::Google::Cloud::CommerceProducer::V1beta::CreatePrivateOfferDocumentRequest.new(parent: parent, private_offer_document: private_offer_document) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_private_offer_document({ parent: parent, private_offer_document: private_offer_document }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_private_offer_document(::Google::Cloud::CommerceProducer::V1beta::CreatePrivateOfferDocumentRequest.new(parent: parent, private_offer_document: private_offer_document), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_private_offer_document_client_stub.call_rpc_count + end + end + + def test_update_private_offer_document + # Create GRPC objects. + grpc_response = ::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + private_offer_document = {} + update_mask = {} + + update_private_offer_document_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_private_offer_document, name + assert_kind_of ::Google::Cloud::CommerceProducer::V1beta::UpdatePrivateOfferDocumentRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument), request["private_offer_document"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_private_offer_document_client_stub do + # Create client + c = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_private_offer_document({ private_offer_document: private_offer_document, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_private_offer_document private_offer_document: private_offer_document, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_private_offer_document ::Google::Cloud::CommerceProducer::V1beta::UpdatePrivateOfferDocumentRequest.new(private_offer_document: private_offer_document, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_private_offer_document({ private_offer_document: private_offer_document, update_mask: update_mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_private_offer_document(::Google::Cloud::CommerceProducer::V1beta::UpdatePrivateOfferDocumentRequest.new(private_offer_document: private_offer_document, update_mask: update_mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_private_offer_document_client_stub.call_rpc_count + end + end + + def test_delete_private_offer_document + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_private_offer_document_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_private_offer_document, name + assert_kind_of ::Google::Cloud::CommerceProducer::V1beta::DeletePrivateOfferDocumentRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_private_offer_document_client_stub do + # Create client + c = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_private_offer_document({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_private_offer_document name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_private_offer_document ::Google::Cloud::CommerceProducer::V1beta::DeletePrivateOfferDocumentRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_private_offer_document({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_private_offer_document(::Google::Cloud::CommerceProducer::V1beta::DeletePrivateOfferDocumentRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_private_offer_document_client_stub.call_rpc_count + end + end + + def test_list_standard_offers + # Create GRPC objects. + grpc_response = ::Google::Cloud::CommerceProducer::V1beta::ListStandardOffersResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_standard_offers_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_standard_offers, name + assert_kind_of ::Google::Cloud::CommerceProducer::V1beta::ListStandardOffersRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_standard_offers_client_stub do + # Create client + c = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_standard_offers({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_standard_offers parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_standard_offers ::Google::Cloud::CommerceProducer::V1beta::ListStandardOffersRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_standard_offers({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_standard_offers(::Google::Cloud::CommerceProducer::V1beta::ListStandardOffersRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_standard_offers_client_stub.call_rpc_count + end + end + + def test_get_standard_offer + # Create GRPC objects. + grpc_response = ::Google::Cloud::CommerceProducer::V1beta::StandardOffer.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + view = :STANDARD_OFFER_VIEW_UNSPECIFIED + + get_standard_offer_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_standard_offer, name + assert_kind_of ::Google::Cloud::CommerceProducer::V1beta::GetStandardOfferRequest, request + assert_equal "hello world", request["name"] + assert_equal :STANDARD_OFFER_VIEW_UNSPECIFIED, request["view"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_standard_offer_client_stub do + # Create client + c = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_standard_offer({ name: name, view: view }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_standard_offer name: name, view: view do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_standard_offer ::Google::Cloud::CommerceProducer::V1beta::GetStandardOfferRequest.new(name: name, view: view) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_standard_offer({ name: name, view: view }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_standard_offer(::Google::Cloud::CommerceProducer::V1beta::GetStandardOfferRequest.new(name: name, view: view), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_standard_offer_client_stub.call_rpc_count + end + end + + def test_get_sku + # Create GRPC objects. + grpc_response = ::Google::Cloud::CommerceProducer::V1beta::Sku.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_sku_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_sku, name + assert_kind_of ::Google::Cloud::CommerceProducer::V1beta::GetSkuRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_sku_client_stub do + # Create client + c = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_sku({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_sku name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_sku ::Google::Cloud::CommerceProducer::V1beta::GetSkuRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_sku({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_sku(::Google::Cloud::CommerceProducer::V1beta::GetSkuRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_sku_client_stub.call_rpc_count + end + end + + def test_list_skus + # Create GRPC objects. + grpc_response = ::Google::Cloud::CommerceProducer::V1beta::ListSkusResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_skus_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_skus, name + assert_kind_of ::Google::Cloud::CommerceProducer::V1beta::ListSkusRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_skus_client_stub do + # Create client + c = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_skus({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_skus parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_skus ::Google::Cloud::CommerceProducer::V1beta::ListSkusRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_skus({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_skus(::Google::Cloud::CommerceProducer::V1beta::ListSkusRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_skus_client_stub.call_rpc_count + end + end + + def test_get_sku_group + # Create GRPC objects. + grpc_response = ::Google::Cloud::CommerceProducer::V1beta::SkuGroup.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_sku_group_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_sku_group, name + assert_kind_of ::Google::Cloud::CommerceProducer::V1beta::GetSkuGroupRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_sku_group_client_stub do + # Create client + c = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_sku_group({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_sku_group name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_sku_group ::Google::Cloud::CommerceProducer::V1beta::GetSkuGroupRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_sku_group({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.get_sku_group(::Google::Cloud::CommerceProducer::V1beta::GetSkuGroupRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_sku_group_client_stub.call_rpc_count + end + end + + def test_list_sku_groups + # Create GRPC objects. + grpc_response = ::Google::Cloud::CommerceProducer::V1beta::ListSkuGroupsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + + list_sku_groups_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_sku_groups, name + assert_kind_of ::Google::Cloud::CommerceProducer::V1beta::ListSkuGroupsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_sku_groups_client_stub do + # Create client + c = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_sku_groups({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.list_sku_groups parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.list_sku_groups ::Google::Cloud::CommerceProducer::V1beta::ListSkuGroupsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.list_sku_groups({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.list_sku_groups(::Google::Cloud::CommerceProducer::V1beta::ListSkuGroupsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_sku_groups_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new do |config| + config.credentials = grpc_channel + end + end + + config = client.configure do |c| + block_config = c + end + + assert_same block_config, config + assert_kind_of ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client::Configuration, config + end + + def test_credentials + key = OpenSSL::PKey::RSA.new 2048 + cred_json = { + "private_key" => key.to_pem, + "client_email" => "app@developer.gserviceaccount.com", + "type" => "service_account" + } + key_file = StringIO.new cred_json.to_json + creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) + + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/test/helper.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/test/helper.rb new file mode 100644 index 000000000000..4fb6756ac7e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-commerce_producer-v1beta/test/helper.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Load JUnit XML formatter from googleapis/ruby-common-tools to write +# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. +if ENV["CI"] || ENV["KOKORO_JOB_NAME"] + begin + require "gapic/minitest_junit_preloader" + rescue LoadError + end +end + +require "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" From 6a39fa6c7fe96d8173dc602e96638fec5674c6e7 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Mon, 3 Aug 2026 20:58:44 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20po?= =?UTF-8?q?st-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- .../.owlbot-manifest.json | 3 +- .../v1beta/commerce_transaction_pb.rb | 2 +- .../v1beta/private_offer_pb.rb | 3 +- .../commerceproducer/v1beta/service_pb.rb | 2 +- .../commerceproducer/v1beta/sku_group_pb.rb | 2 +- .../cloud/commerceproducer/v1beta/sku_pb.rb | 2 +- .../v1beta/standard_offer_pb.rb | 2 +- .../commerceproducer/v1beta/private_offer.rb | 53 + .../.gitignore | 20 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../Gemfile | 15 - .../LICENSE.md | 201 -- .../README.md | 154 - .../Rakefile | 169 -- .../gapic_metadata.json | 123 - ...gle-cloud-commerce_producer-v1beta.gemspec | 29 - .../google-cloud-commerce_producer-v1beta.rb | 21 - .../google/cloud/commerce_producer/v1beta.rb | 45 - .../v1beta/bindings_override.rb | 75 - .../v1beta/commerce_transaction.rb | 55 - .../v1beta/commerce_transaction/client.rb | 2574 ----------------- .../commerce_transaction/credentials.rb | 47 - .../v1beta/commerce_transaction/paths.rb | 184 -- .../v1beta/commerce_transaction/rest.rb | 53 - .../commerce_transaction/rest/client.rb | 2392 --------------- .../commerce_transaction/rest/service_stub.rb | 1368 --------- .../cloud/commerce_producer/v1beta/rest.rb | 38 - .../cloud/commerce_producer/v1beta/version.rb | 28 - .../v1beta/commerce_transaction_pb.rb | 64 - .../commerce_transaction_services_pb.rb | 87 - .../v1beta/private_offer_pb.rb | 53 - .../commerceproducer/v1beta/service_pb.rb | 24 - .../commerceproducer/v1beta/sku_group_pb.rb | 24 - .../cloud/commerceproducer/v1beta/sku_pb.rb | 56 - .../v1beta/standard_offer_pb.rb | 30 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 593 ---- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 -- .../v1beta/commerce_transaction.rb | 533 ---- .../commerceproducer/v1beta/private_offer.rb | 1189 -------- .../cloud/commerceproducer/v1beta/service.rb | 40 - .../cloud/commerceproducer/v1beta/sku.rb | 794 ----- .../commerceproducer/v1beta/sku_group.rb | 50 - .../commerceproducer/v1beta/standard_offer.rb | 133 - .../proto_docs/google/protobuf/any.rb | 145 - .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/field_mask.rb | 229 -- .../proto_docs/google/protobuf/timestamp.rb | 127 - .../proto_docs/google/type/datetime.rb | 104 - .../proto_docs/google/type/decimal.rb | 95 - .../proto_docs/google/type/money.rb | 43 - .../snippets/Gemfile | 32 - .../cancel_private_offer.rb | 47 - .../create_private_offer.rb | 47 - .../create_private_offer_document.rb | 47 - .../delete_private_offer.rb | 47 - .../delete_private_offer_document.rb | 47 - .../commerce_transaction/get_private_offer.rb | 47 - .../get_private_offer_document.rb | 47 - .../commerce_transaction/get_service.rb | 47 - .../snippets/commerce_transaction/get_sku.rb | 47 - .../commerce_transaction/get_sku_group.rb | 47 - .../get_standard_offer.rb | 47 - .../list_private_offer_documents.rb | 51 - .../list_private_offers.rb | 51 - .../commerce_transaction/list_services.rb | 51 - .../commerce_transaction/list_sku_groups.rb | 51 - .../commerce_transaction/list_skus.rb | 51 - .../list_standard_offers.rb | 51 - .../publish_private_offer.rb | 47 - .../resolve_amendment_target.rb | 47 - .../update_private_offer.rb | 47 - .../update_private_offer_document.rb | 47 - ..._google.cloud.commerceproducer.v1beta.json | 855 ------ .../v1beta/commerce_transaction_paths_test.rb | 139 - .../v1beta/commerce_transaction_rest_test.rb | 1261 -------- .../v1beta/commerce_transaction_test.rb | 1408 --------- .../test/helper.rb | 35 - 86 files changed, 62 insertions(+), 17485 deletions(-) delete mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/.gitignore delete mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/.yardopts delete mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/Gemfile delete mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/README.md delete mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/Rakefile delete mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/google-cloud-commerce_producer-v1beta.gemspec delete mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google-cloud-commerce_producer-v1beta.rb delete mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerce_producer/v1beta.rb delete mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerce_producer/v1beta/bindings_override.rb delete mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerce_producer/v1beta/commerce_transaction.rb delete mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerce_producer/v1beta/commerce_transaction/client.rb delete mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerce_producer/v1beta/commerce_transaction/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerce_producer/v1beta/commerce_transaction/paths.rb delete mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerce_producer/v1beta/commerce_transaction/rest.rb delete mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerce_producer/v1beta/commerce_transaction/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerce_producer/v1beta/commerce_transaction/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerce_producer/v1beta/rest.rb delete mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerce_producer/v1beta/version.rb delete mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerceproducer/v1beta/commerce_transaction_pb.rb delete mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerceproducer/v1beta/commerce_transaction_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerceproducer/v1beta/private_offer_pb.rb delete mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerceproducer/v1beta/service_pb.rb delete mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerceproducer/v1beta/sku_group_pb.rb delete mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerceproducer/v1beta/sku_pb.rb delete mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerceproducer/v1beta/standard_offer_pb.rb delete mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/cloud/commerceproducer/v1beta/commerce_transaction.rb delete mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/cloud/commerceproducer/v1beta/private_offer.rb delete mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/cloud/commerceproducer/v1beta/service.rb delete mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/cloud/commerceproducer/v1beta/sku.rb delete mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/cloud/commerceproducer/v1beta/sku_group.rb delete mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/cloud/commerceproducer/v1beta/standard_offer.rb delete mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/type/datetime.rb delete mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/type/decimal.rb delete mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/type/money.rb delete mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/cancel_private_offer.rb delete mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/create_private_offer.rb delete mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/create_private_offer_document.rb delete mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/delete_private_offer.rb delete mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/delete_private_offer_document.rb delete mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/get_private_offer.rb delete mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/get_private_offer_document.rb delete mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/get_service.rb delete mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/get_sku.rb delete mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/get_sku_group.rb delete mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/get_standard_offer.rb delete mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/list_private_offer_documents.rb delete mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/list_private_offers.rb delete mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/list_services.rb delete mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/list_sku_groups.rb delete mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/list_skus.rb delete mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/list_standard_offers.rb delete mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/publish_private_offer.rb delete mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/resolve_amendment_target.rb delete mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/update_private_offer.rb delete mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/update_private_offer_document.rb delete mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/snippet_metadata_google.cloud.commerceproducer.v1beta.json delete mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/test/google/cloud/commerce_producer/v1beta/commerce_transaction_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/test/google/cloud/commerce_producer/v1beta/commerce_transaction_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/test/google/cloud/commerce_producer/v1beta/commerce_transaction_test.rb delete mode 100644 owl-bot-staging/google-cloud-commerce_producer-v1beta/test/helper.rb diff --git a/google-cloud-commerce_producer-v1beta/.owlbot-manifest.json b/google-cloud-commerce_producer-v1beta/.owlbot-manifest.json index 76b3c383db2a..03a33de407cd 100644 --- a/google-cloud-commerce_producer-v1beta/.owlbot-manifest.json +++ b/google-cloud-commerce_producer-v1beta/.owlbot-manifest.json @@ -80,6 +80,7 @@ "test/helper.rb" ], "static": [ - ".OwlBot.yaml" + ".OwlBot.yaml", + "Gemfile.lock" ] } diff --git a/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerceproducer/v1beta/commerce_transaction_pb.rb b/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerceproducer/v1beta/commerce_transaction_pb.rb index b2f5e51d3308..b136e06e7a33 100644 --- a/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerceproducer/v1beta/commerce_transaction_pb.rb +++ b/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerceproducer/v1beta/commerce_transaction_pb.rb @@ -17,7 +17,7 @@ require 'google/protobuf/field_mask_pb' -descriptor_data = "\n?google/cloud/commerceproducer/v1beta/commerce_transaction.proto\x12$google.cloud.commerceproducer.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x38google/cloud/commerceproducer/v1beta/private_offer.proto\x1a\x32google/cloud/commerceproducer/v1beta/service.proto\x1a.google/cloud/commerceproducer/v1beta/sku.proto\x1a\x34google/cloud/commerceproducer/v1beta/sku_group.proto\x1a\x39google/cloud/commerceproducer/v1beta/standard_offer.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"\xbd\x01\n\x18ListPrivateOffersRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\x12,commerceproducer.googleapis.com/PrivateOffer\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x80\x01\n\x19ListPrivateOffersResponse\x12J\n\x0eprivate_offers\x18\x01 \x03(\x0b\x32\x32.google.cloud.commerceproducer.v1beta.PrivateOffer\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xa7\x01\n\x16GetPrivateOfferRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,commerceproducer.googleapis.com/PrivateOffer\x12I\n\x04view\x18\x02 \x01(\x0e\x32\x36.google.cloud.commerceproducer.v1beta.PrivateOfferViewB\x03\xe0\x41\x01\"\x8d\x02\n\x1dResolveAmendmentTargetRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\x12,commerceproducer.googleapis.com/PrivateOffer\x12R\n\x16target_billing_account\x18\x02 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*cloudbilling.googleapis.com/BillingAccount\x12R\n\x13\x62\x61se_standard_offer\x18\x03 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-commerceproducer.googleapis.com/StandardOffer\"\xb2\x03\n\x1eResolveAmendmentTargetResponse\x12S\n\x16required_private_offer\x18\x01 \x01(\tB1\xfa\x41.\n,commerceproducer.googleapis.com/PrivateOfferH\x00\x12U\n\x17required_standard_offer\x18\x02 \x01(\tB2\xfa\x41/\n-commerceproducer.googleapis.com/StandardOfferH\x00\x12n\n\x0foptional_offers\x18\x03 \x01(\x0b\x32S.google.cloud.commerceproducer.v1beta.ResolveAmendmentTargetResponse.OptionalOffersH\x00\x1a[\n\x0eOptionalOffers\x12I\n\x0eprivate_offers\x18\x01 \x03(\tB1\xfa\x41.\n,commerceproducer.googleapis.com/PrivateOfferB\x17\n\x15\x61mendment_requirement\"\xb1\x01\n\x19\x43reatePrivateOfferRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\x12,commerceproducer.googleapis.com/PrivateOffer\x12N\n\rprivate_offer\x18\x03 \x01(\x0b\x32\x32.google.cloud.commerceproducer.v1beta.PrivateOfferB\x03\xe0\x41\x02\"\xa1\x01\n\x19UpdatePrivateOfferRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12N\n\rprivate_offer\x18\x02 \x01(\x0b\x32\x32.google.cloud.commerceproducer.v1beta.PrivateOfferB\x03\xe0\x41\x02\"|\n\x1aPublishPrivateOfferRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,commerceproducer.googleapis.com/PrivateOffer\x12\x1a\n\rvalidate_only\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"\x7f\n\x19\x43\x61ncelPrivateOfferRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,commerceproducer.googleapis.com/PrivateOffer\x12\x1e\n\x11\x63\x61ncellation_note\x18\x02 \x01(\tB\x03\xe0\x41\x01\"s\n\x19\x44\x65letePrivateOfferRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,commerceproducer.googleapis.com/PrivateOffer\x12\x12\n\x05\x66orce\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"\xa1\x01\n ListPrivateOfferDocumentsRequest\x12L\n\x06parent\x18\x01 \x01(\tB<\xe0\x41\x02\xfa\x41\x36\x12\x34\x63ommerceproducer.googleapis.com/PrivateOfferDocument\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x99\x01\n!ListPrivateOfferDocumentsResponse\x12[\n\x17private_offer_documents\x18\x01 \x03(\x0b\x32:.google.cloud.commerceproducer.v1beta.PrivateOfferDocument\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"l\n\x1eGetPrivateOfferDocumentRequest\x12J\n\x04name\x18\x01 \x01(\tB<\xe0\x41\x02\xfa\x41\x36\n4commerceproducer.googleapis.com/PrivateOfferDocument\"\xd2\x01\n!CreatePrivateOfferDocumentRequest\x12L\n\x06parent\x18\x01 \x01(\tB<\xe0\x41\x02\xfa\x41\x36\x12\x34\x63ommerceproducer.googleapis.com/PrivateOfferDocument\x12_\n\x16private_offer_document\x18\x03 \x01(\x0b\x32:.google.cloud.commerceproducer.v1beta.PrivateOfferDocumentB\x03\xe0\x41\x02\"\xba\x01\n!UpdatePrivateOfferDocumentRequest\x12_\n\x16private_offer_document\x18\x01 \x01(\x0b\x32:.google.cloud.commerceproducer.v1beta.PrivateOfferDocumentB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"o\n!DeletePrivateOfferDocumentRequest\x12J\n\x04name\x18\x01 \x01(\tB<\xe0\x41\x02\xfa\x41\x36\n4commerceproducer.googleapis.com/PrivateOfferDocument\"\x87\x01\n\x13ListServicesRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'commerceproducer.googleapis.com/Service\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"p\n\x14ListServicesResponse\x12?\n\x08services\x18\x01 \x03(\x0b\x32-.google.cloud.commerceproducer.v1beta.Service\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x98\x01\n\x11GetServiceRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'commerceproducer.googleapis.com/Service\x12\x44\n\x04view\x18\x02 \x01(\x0e\x32\x31.google.cloud.commerceproducer.v1beta.ServiceViewB\x03\xe0\x41\x01\"\xbf\x01\n\x19ListStandardOffersRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-commerceproducer.googleapis.com/StandardOffer\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x83\x01\n\x1aListStandardOffersResponse\x12L\n\x0fstandard_offers\x18\x01 \x03(\x0b\x32\x33.google.cloud.commerceproducer.v1beta.StandardOffer\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xaa\x01\n\x17GetStandardOfferRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-commerceproducer.googleapis.com/StandardOffer\x12J\n\x04view\x18\x02 \x01(\x0e\x32\x37.google.cloud.commerceproducer.v1beta.StandardOfferViewB\x03\xe0\x41\x01\"\x7f\n\x0fListSkusRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#commerceproducer.googleapis.com/Sku\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"d\n\x10ListSkusResponse\x12\x37\n\x04skus\x18\x01 \x03(\x0b\x32).google.cloud.commerceproducer.v1beta.Sku\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"J\n\rGetSkuRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#commerceproducer.googleapis.com/Sku\"T\n\x12GetSkuGroupRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(commerceproducer.googleapis.com/SkuGroup\"\x89\x01\n\x14ListSkuGroupsRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(commerceproducer.googleapis.com/SkuGroup\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"t\n\x15ListSkuGroupsResponse\x12\x42\n\nsku_groups\x18\x01 \x03(\x0b\x32..google.cloud.commerceproducer.v1beta.SkuGroup\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t*q\n\x10PrivateOfferView\x12\"\n\x1ePRIVATE_OFFER_VIEW_UNSPECIFIED\x10\x00\x12\x1c\n\x18PRIVATE_OFFER_VIEW_BASIC\x10\x01\x12\x1b\n\x17PRIVATE_OFFER_VIEW_FULL\x10\x02*u\n\x11StandardOfferView\x12#\n\x1fSTANDARD_OFFER_VIEW_UNSPECIFIED\x10\x00\x12\x1d\n\x19STANDARD_OFFER_VIEW_BASIC\x10\x01\x12\x1c\n\x18STANDARD_OFFER_VIEW_FULL\x10\x02*Z\n\x0bServiceView\x12\x1c\n\x18SERVICE_VIEW_UNSPECIFIED\x10\x00\x12\x16\n\x12SERVICE_VIEW_BASIC\x10\x01\x12\x15\n\x11SERVICE_VIEW_FULL\x10\x02\x32\xf5%\n\x13\x43ommerceTransaction\x12\xc8\x01\n\x0cListServices\x12\x39.google.cloud.commerceproducer.v1beta.ListServicesRequest\x1a:.google.cloud.commerceproducer.v1beta.ListServicesResponse\"A\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x32\x12\x30/v1beta/{parent=projects/*/locations/*}/services\x12\xb5\x01\n\nGetService\x12\x37.google.cloud.commerceproducer.v1beta.GetServiceRequest\x1a-.google.cloud.commerceproducer.v1beta.Service\"?\xda\x41\x04name\x82\xd3\xe4\x93\x02\x32\x12\x30/v1beta/{name=projects/*/locations/*/services/*}\x12\xdc\x01\n\x11ListPrivateOffers\x12>.google.cloud.commerceproducer.v1beta.ListPrivateOffersRequest\x1a?.google.cloud.commerceproducer.v1beta.ListPrivateOffersResponse\"F\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x37\x12\x35/v1beta/{parent=projects/*/locations/*}/privateOffers\x12\xc9\x01\n\x0fGetPrivateOffer\x12<.google.cloud.commerceproducer.v1beta.GetPrivateOfferRequest\x1a\x32.google.cloud.commerceproducer.v1beta.PrivateOffer\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/v1beta/{name=projects/*/locations/*/privateOffers/*}\x12\xae\x02\n\x16ResolveAmendmentTarget\x12\x43.google.cloud.commerceproducer.v1beta.ResolveAmendmentTargetRequest\x1a\x44.google.cloud.commerceproducer.v1beta.ResolveAmendmentTargetResponse\"\x88\x01\xda\x41\x31parent,target_billing_account,base_standard_offer\x82\xd3\xe4\x93\x02N\x12L/v1beta/{parent=projects/*/locations/*}/privateOffers:resolveAmendmentTarget\x12\xd7\x01\n\x12\x43reatePrivateOffer\x12?.google.cloud.commerceproducer.v1beta.CreatePrivateOfferRequest\x1a\x32.google.cloud.commerceproducer.v1beta.PrivateOffer\"L\x82\xd3\xe4\x93\x02\x46\"5/v1beta/{parent=projects/*/locations/*}/privateOffers:\rprivate_offer\x12\x81\x02\n\x12UpdatePrivateOffer\x12?.google.cloud.commerceproducer.v1beta.UpdatePrivateOfferRequest\x1a\x32.google.cloud.commerceproducer.v1beta.PrivateOffer\"v\xda\x41\x19private_offer,update_mask\x82\xd3\xe4\x93\x02T2C/v1beta/{private_offer.name=projects/*/locations/*/privateOffers/*}:\rprivate_offer\x12\xdc\x01\n\x13PublishPrivateOffer\x12@.google.cloud.commerceproducer.v1beta.PublishPrivateOfferRequest\x1a\x32.google.cloud.commerceproducer.v1beta.PrivateOffer\"O\xda\x41\x04name\x82\xd3\xe4\x93\x02\x42\"=/v1beta/{name=projects/*/locations/*/privateOffers/*}:publish:\x01*\x12\xd9\x01\n\x12\x43\x61ncelPrivateOffer\x12?.google.cloud.commerceproducer.v1beta.CancelPrivateOfferRequest\x1a\x32.google.cloud.commerceproducer.v1beta.PrivateOffer\"N\xda\x41\x04name\x82\xd3\xe4\x93\x02\x41\"\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(commerceproducer.googleapis.com/SkuGroup\"\x89\x01\n\x14ListSkuGroupsRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(commerceproducer.googleapis.com/SkuGroup\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"t\n\x15ListSkuGroupsResponse\x12\x42\n\nsku_groups\x18\x01 \x03(\x0b\x32..google.cloud.commerceproducer.v1beta.SkuGroup\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t*q\n\x10PrivateOfferView\x12\"\n\x1ePRIVATE_OFFER_VIEW_UNSPECIFIED\x10\x00\x12\x1c\n\x18PRIVATE_OFFER_VIEW_BASIC\x10\x01\x12\x1b\n\x17PRIVATE_OFFER_VIEW_FULL\x10\x02*u\n\x11StandardOfferView\x12#\n\x1fSTANDARD_OFFER_VIEW_UNSPECIFIED\x10\x00\x12\x1d\n\x19STANDARD_OFFER_VIEW_BASIC\x10\x01\x12\x1c\n\x18STANDARD_OFFER_VIEW_FULL\x10\x02*Z\n\x0bServiceView\x12\x1c\n\x18SERVICE_VIEW_UNSPECIFIED\x10\x00\x12\x16\n\x12SERVICE_VIEW_BASIC\x10\x01\x12\x15\n\x11SERVICE_VIEW_FULL\x10\x02\x32\xf5%\n\x13\x43ommerceTransaction\x12\xc8\x01\n\x0cListServices\x12\x39.google.cloud.commerceproducer.v1beta.ListServicesRequest\x1a:.google.cloud.commerceproducer.v1beta.ListServicesResponse\"A\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x32\x12\x30/v1beta/{parent=projects/*/locations/*}/services\x12\xb5\x01\n\nGetService\x12\x37.google.cloud.commerceproducer.v1beta.GetServiceRequest\x1a-.google.cloud.commerceproducer.v1beta.Service\"?\xda\x41\x04name\x82\xd3\xe4\x93\x02\x32\x12\x30/v1beta/{name=projects/*/locations/*/services/*}\x12\xdc\x01\n\x11ListPrivateOffers\x12>.google.cloud.commerceproducer.v1beta.ListPrivateOffersRequest\x1a?.google.cloud.commerceproducer.v1beta.ListPrivateOffersResponse\"F\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x37\x12\x35/v1beta/{parent=projects/*/locations/*}/privateOffers\x12\xc9\x01\n\x0fGetPrivateOffer\x12<.google.cloud.commerceproducer.v1beta.GetPrivateOfferRequest\x1a\x32.google.cloud.commerceproducer.v1beta.PrivateOffer\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/v1beta/{name=projects/*/locations/*/privateOffers/*}\x12\xae\x02\n\x16ResolveAmendmentTarget\x12\x43.google.cloud.commerceproducer.v1beta.ResolveAmendmentTargetRequest\x1a\x44.google.cloud.commerceproducer.v1beta.ResolveAmendmentTargetResponse\"\x88\x01\xda\x41\x31parent,target_billing_account,base_standard_offer\x82\xd3\xe4\x93\x02N\x12L/v1beta/{parent=projects/*/locations/*}/privateOffers:resolveAmendmentTarget\x12\xd7\x01\n\x12\x43reatePrivateOffer\x12?.google.cloud.commerceproducer.v1beta.CreatePrivateOfferRequest\x1a\x32.google.cloud.commerceproducer.v1beta.PrivateOffer\"L\x82\xd3\xe4\x93\x02\x46\"5/v1beta/{parent=projects/*/locations/*}/privateOffers:\rprivate_offer\x12\x81\x02\n\x12UpdatePrivateOffer\x12?.google.cloud.commerceproducer.v1beta.UpdatePrivateOfferRequest\x1a\x32.google.cloud.commerceproducer.v1beta.PrivateOffer\"v\xda\x41\x19private_offer,update_mask\x82\xd3\xe4\x93\x02T2C/v1beta/{private_offer.name=projects/*/locations/*/privateOffers/*}:\rprivate_offer\x12\xdc\x01\n\x13PublishPrivateOffer\x12@.google.cloud.commerceproducer.v1beta.PublishPrivateOfferRequest\x1a\x32.google.cloud.commerceproducer.v1beta.PrivateOffer\"O\xda\x41\x04name\x82\xd3\xe4\x93\x02\x42\"=/v1beta/{name=projects/*/locations/*/privateOffers/*}:publish:\x01*\x12\xd9\x01\n\x12\x43\x61ncelPrivateOffer\x12?.google.cloud.commerceproducer.v1beta.CancelPrivateOfferRequest\x1a\x32.google.cloud.commerceproducer.v1beta.PrivateOffer\"N\xda\x41\x04name\x82\xd3\xe4\x93\x02\x41\".google.cloud.commerceproducer.v1beta.Sku.SkuPrice.TieredPriceB\x03\xe0\x41\x03H\x00\x12\x1d\n\x10\x63\x61nonical_metric\x18\x01 \x01(\tB\x03\xe0\x41\x03\x42\x11\n\x0fprice_structure\x1a\xd9\x06\n\x1c\x43omputeEngineLicenseUsageFee\x12,\n\x0eprice_per_unit\x18\x06 \x01(\x0b\x32\x12.google.type.MoneyH\x00\x12\x19\n\x0clicense_code\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12~\n\x10machine_resource\x18\x02 \x01(\x0e\x32_.google.cloud.commerceproducer.v1beta.Sku.SkuPrice.ComputeEngineLicenseUsageFee.MachineResourceB\x03\xe0\x41\x03\x12\x89\x01\n\x16machine_resource_range\x18\x03 \x01(\x0b\x32\x64.google.cloud.commerceproducer.v1beta.Sku.SkuPrice.ComputeEngineLicenseUsageFee.MachineResourceRangeB\x03\xe0\x41\x03\x12\x80\x01\n\x11usage_calculation\x18\x04 \x01(\x0e\x32`.google.cloud.commerceproducer.v1beta.Sku.SkuPrice.ComputeEngineLicenseUsageFee.UsageCalculationB\x03\xe0\x41\x03\x12\x11\n\x04unit\x18\x05 \x01(\tB\x03\xe0\x41\x03\x1a[\n\x14MachineResourceRange\x12\x18\n\x0bstart_value\x18\x01 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1b\n\tend_value\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x42\x0c\n\n_end_value\"d\n\x0fMachineResource\x12 \n\x1cMACHINE_RESOURCE_UNSPECIFIED\x10\x00\x12\x0e\n\nVCPU_COUNT\x10\x01\x12\x10\n\x0cMEMORY_BYTES\x10\x02\x12\r\n\tGPU_COUNT\x10\x03\"x\n\x10UsageCalculation\x12!\n\x1dUSAGE_CALCULATION_UNSPECIFIED\x10\x00\x12\x14\n\x10INSTANCE_RUNTIME\x10\x01\x12+\n\'LINEAR_RESOURCE_SCALED_INSTANCE_RUNTIME\x10\x02\x42\x11\n\x0fprice_structure\x1a\xa2\x06\n\x1bKubernetesEnginePodUsageFee\x12,\n\x0eprice_per_unit\x18\x06 \x01(\x0b\x32\x12.google.type.MoneyH\x00\x12u\n\x0cpod_resource\x18\x02 \x01(\x0e\x32Z.google.cloud.commerceproducer.v1beta.Sku.SkuPrice.KubernetesEnginePodUsageFee.PodResourceB\x03\xe0\x41\x03\x12\x80\x01\n\x12pod_resource_range\x18\x03 \x01(\x0b\x32_.google.cloud.commerceproducer.v1beta.Sku.SkuPrice.KubernetesEnginePodUsageFee.PodResourceRangeB\x03\xe0\x41\x03\x12\x7f\n\x11usage_calculation\x18\x04 \x01(\x0e\x32_.google.cloud.commerceproducer.v1beta.Sku.SkuPrice.KubernetesEnginePodUsageFee.UsageCalculationB\x03\xe0\x41\x03\x12\x11\n\x04unit\x18\x05 \x01(\tB\x03\xe0\x41\x03\x1aW\n\x10PodResourceRange\x12\x18\n\x0bstart_value\x18\x01 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1b\n\tend_value\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x42\x0c\n\n_end_value\"k\n\x0bPodResource\x12\x1c\n\x18POD_RESOURCE_UNSPECIFIED\x10\x00\x12\x0e\n\nVCPU_COUNT\x10\x01\x12\x10\n\x0cMEMORY_BYTES\x10\x02\x12\r\n\tGPU_COUNT\x10\x03\x12\r\n\tTPU_COUNT\x10\x04\"n\n\x10UsageCalculation\x12!\n\x1dUSAGE_CALCULATION_UNSPECIFIED\x10\x00\x12\x0f\n\x0bPOD_RUNTIME\x10\x01\x12&\n\"LINEAR_RESOURCE_SCALED_POD_RUNTIME\x10\x02\x42\x11\n\x0fprice_structure\x1a\xfb\x11\n\x1e\x41iPlatformManagedModelUsageFee\x12[\n\x0ctiered_price\x18\x07 \x01(\x0b\x32>.google.cloud.commerceproducer.v1beta.Sku.SkuPrice.TieredPriceB\x03\xe0\x41\x03H\x00\x12\x8e\x01\n\x0cusage_metric\x18\x01 \x01(\x0b\x32s.google.cloud.commerceproducer.v1beta.Sku.SkuPrice.AiPlatformManagedModelUsageFee.AiPlatformManagedModelUsageMetricB\x03\xe0\x41\x03\x12p\n\x08location\x18\x03 \x01(\x0b\x32Y.google.cloud.commerceproducer.v1beta.Sku.SkuPrice.AiPlatformManagedModelEndpointLocationB\x03\xe0\x41\x03\x12~\n\x0fprediction_mode\x18\x04 \x01(\x0e\x32`.google.cloud.commerceproducer.v1beta.Sku.SkuPrice.AiPlatformManagedModelUsageFee.PredictionModeB\x03\xe0\x41\x03\x12\xa3\x01\n#combined_request_input_tokens_range\x18\x05 \x01(\x0b\x32q.google.cloud.commerceproducer.v1beta.Sku.SkuPrice.AiPlatformManagedModelUsageFee.CombinedRequestInputTokensRangeB\x03\xe0\x41\x03\x12\x9b\x01\n\x1eprovisioned_throughput_overage\x18\x06 \x01(\x0b\x32n.google.cloud.commerceproducer.v1beta.Sku.SkuPrice.AiPlatformManagedModelUsageFee.ProvisionedThroughputOverageB\x03\xe0\x41\x03\x1a\xf7\x08\n!AiPlatformManagedModelUsageMetric\x12\xaa\x01\n\x13input_tokens_metric\x18\x01 \x01(\x0b\x32\x85\x01.google.cloud.commerceproducer.v1beta.Sku.SkuPrice.AiPlatformManagedModelUsageFee.AiPlatformManagedModelUsageMetric.InputTokensMetricB\x03\xe0\x41\x03H\x00\x12\xbe\x01\n\x1e\x63\x61\x63he_read_input_tokens_metric\x18\x02 \x01(\x0b\x32\x8e\x01.google.cloud.commerceproducer.v1beta.Sku.SkuPrice.AiPlatformManagedModelUsageFee.AiPlatformManagedModelUsageMetric.CacheReadInputTokensMetricB\x03\xe0\x41\x03H\x00\x12\xc0\x01\n\x1f\x63\x61\x63he_write_input_tokens_metric\x18\x03 \x01(\x0b\x32\x8f\x01.google.cloud.commerceproducer.v1beta.Sku.SkuPrice.AiPlatformManagedModelUsageFee.AiPlatformManagedModelUsageMetric.CacheWriteInputTokensMetricB\x03\xe0\x41\x03H\x00\x12\xac\x01\n\x14output_tokens_metric\x18\x04 \x01(\x0b\x32\x86\x01.google.cloud.commerceproducer.v1beta.Sku.SkuPrice.AiPlatformManagedModelUsageFee.AiPlatformManagedModelUsageMetric.OutputTokensMetricB\x03\xe0\x41\x03H\x00\x12\xb7\x01\n\x1aweb_search_requests_metric\x18\x05 \x01(\x0b\x32\x8b\x01.google.cloud.commerceproducer.v1beta.Sku.SkuPrice.AiPlatformManagedModelUsageFee.AiPlatformManagedModelUsageMetric.WebSearchRequestsMetricB\x03\xe0\x41\x03H\x00\x1a\x13\n\x11InputTokensMetric\x1a\x1c\n\x1a\x43\x61\x63heReadInputTokensMetric\x1aJ\n\x1b\x43\x61\x63heWriteInputTokensMetric\x12+\n\x03ttl\x18\x01 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x03\x1a\x14\n\x12OutputTokensMetric\x1a\x19\n\x17WebSearchRequestsMetricB\x08\n\x06metric\x1a\x66\n\x1f\x43ombinedRequestInputTokensRange\x12\x18\n\x0bstart_value\x18\x01 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1b\n\tend_value\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x42\x0c\n\n_end_value\x1a`\n\x1cProvisionedThroughputOverage\x12@\n\x07service\x18\x01 \x01(\tB/\xe0\x41\x03\xfa\x41)\x12\'commerceproducer.googleapis.com/Service\"^\n\x0ePredictionMode\x12\x1f\n\x1bPREDICTION_MODE_UNSPECIFIED\x10\x00\x12\x15\n\x11ONLINE_PREDICTION\x10\x01\x12\x14\n\x10\x42\x41TCH_PREDICTION\x10\x02\x42\x11\n\x0fprice_structure\x1a\x9b\x02\n\"AiPlatformProvisionedThroughputFee\x12#\n\x14term_duration_months\x18\x02 \x01(\x05\x42\x03\xe0\x41\x03H\x00\x12\x30\n\x12gsu_price_per_unit\x18\x04 \x01(\x0b\x32\x12.google.type.MoneyH\x01\x12p\n\x08location\x18\x01 \x01(\x0b\x32Y.google.cloud.commerceproducer.v1beta.Sku.SkuPrice.AiPlatformManagedModelEndpointLocationB\x03\xe0\x41\x03\x12\x11\n\x04unit\x18\x03 \x01(\tB\x03\xe0\x41\x03\x42\x06\n\x04termB\x11\n\x0fprice_structure\x1a\x9c\x03\n\x1f\x41iPlatformDeployedModelUsageFee\x12\x1f\n\x10\x61\x63\x63\x65lerator_type\x18\x02 \x01(\tB\x03\xe0\x41\x03H\x00\x12\x31\n\x0eprice_per_unit\x18\x05 \x01(\x0b\x32\x12.google.type.MoneyB\x03\xe0\x41\x03H\x01\x12\x11\n\x04unit\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x83\x01\n\x11usage_calculation\x18\x04 \x01(\x0e\x32\x63.google.cloud.commerceproducer.v1beta.Sku.SkuPrice.AiPlatformDeployedModelUsageFee.UsageCalculationB\x03\xe0\x41\x03\"d\n\x10UsageCalculation\x12!\n\x1dUSAGE_CALCULATION_UNSPECIFIED\x10\x00\x12-\n)LINEAR_RESOURCE_SCALED_DEPLOYMENT_RUNTIME\x10\x02\x42\x13\n\x11hardware_resourceB\x11\n\x0fprice_structure\x1an\n\x13\x46latSubscriptionFee\x12\x31\n\x0eprice_per_unit\x18\x03 \x01(\x0b\x32\x12.google.type.MoneyB\x03\xe0\x41\x03H\x00\x12\x11\n\x04unit\x18\x02 \x01(\tB\x03\xe0\x41\x03\x42\x11\n\x0fprice_structure\x1a\xbe\x02\n\x0bTieredPrice\x12\x11\n\x04unit\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x1d\n\x10unit_description\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x33\n\x10price_unit_count\x18\x03 \x01(\x0b\x32\x14.google.type.DecimalB\x03\xe0\x41\x03\x12\x62\n\x0bprice_tiers\x18\x04 \x03(\x0b\x32H.google.cloud.commerceproducer.v1beta.Sku.SkuPrice.TieredPrice.PriceTierB\x03\xe0\x41\x03\x1a\x64\n\tPriceTier\x12/\n\x0cstart_amount\x18\x01 \x01(\x0b\x32\x14.google.type.DecimalB\x03\xe0\x41\x03\x12&\n\x05price\x18\x02 \x01(\x0b\x32\x12.google.type.MoneyB\x03\xe0\x41\x03\x1a\x8e\x01\n&AiPlatformManagedModelEndpointLocation\x12\x18\n\tregion_id\x18\x01 \x01(\tB\x03\xe0\x41\x03H\x00\x12\x1e\n\x0fglobal_endpoint\x18\x02 \x01(\x08\x42\x03\xe0\x41\x03H\x00\x12\x1e\n\x0fmulti_region_id\x18\x03 \x01(\tB\x03\xe0\x41\x03H\x00\x42\n\n\x08locationB\n\n\x08sku_type:z\xea\x41w\n#commerceproducer.googleapis.com/Sku\x12\x45projects/{project}/locations/{location}/services/{service}/skus/{sku}*\x04skus2\x03skuB\xdd\x01\n(com.google.cloud.commerceproducer.v1betaB\x08SkuProtoP\x01ZTcloud.google.com/go/commerceproducer/apiv1beta/commerceproducerpb;commerceproducerpb\xaa\x02$Google.Cloud.CommerceProducer.V1Beta\xea\x02\'Google::Cloud::CommerceProducer::V1betab\x06proto3" +descriptor_data = "\n.google/cloud/commerceproducer/v1beta/sku.proto\x12$google.cloud.commerceproducer.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x19google/type/decimal.proto\x1a\x17google/type/money.proto\"\xf3\x34\n\x03Sku\x12\x14\n\x04name\x18\x01 \x01(\tB\x06\xe0\x41\x08\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12S\n\x12sku_price_timeline\x18\x03 \x03(\x0b\x32\x32.google.cloud.commerceproducer.v1beta.Sku.SkuPriceB\x03\xe0\x41\x03\x1a\xea\x32\n\x08SkuPrice\x12\\\n\x08inactive\x18\x02 \x01(\x0b\x32\x43.google.cloud.commerceproducer.v1beta.Sku.SkuPrice.InactiveSkuPriceB\x03\xe0\x41\x03H\x00\x12\x80\x01\n managed_service_metric_usage_fee\x18\x03 \x01(\x0b\x32O.google.cloud.commerceproducer.v1beta.Sku.SkuPrice.ManagedServiceMetricUsageFeeB\x03\xe0\x41\x03H\x00\x12u\n\x15gce_license_usage_fee\x18\x04 \x01(\x0b\x32O.google.cloud.commerceproducer.v1beta.Sku.SkuPrice.ComputeEngineLicenseUsageFeeB\x03\xe0\x41\x03H\x00\x12p\n\x11gke_pod_usage_fee\x18\x05 \x01(\x0b\x32N.google.cloud.commerceproducer.v1beta.Sku.SkuPrice.KubernetesEnginePodUsageFeeB\x03\xe0\x41\x03H\x00\x12\x85\x01\n#ai_platform_managed_model_usage_fee\x18\x06 \x01(\x0b\x32Q.google.cloud.commerceproducer.v1beta.Sku.SkuPrice.AiPlatformManagedModelUsageFeeB\x03\xe0\x41\x03H\x00\x12\x8c\x01\n&ai_platform_provisioned_throughput_fee\x18\x07 \x01(\x0b\x32U.google.cloud.commerceproducer.v1beta.Sku.SkuPrice.AiPlatformProvisionedThroughputFeeB\x03\xe0\x41\x03H\x00\x12\x87\x01\n$ai_platform_deployed_model_usage_fee\x18\x08 \x01(\x0b\x32R.google.cloud.commerceproducer.v1beta.Sku.SkuPrice.AiPlatformDeployedModelUsageFeeB\x03\xe0\x41\x03H\x00\x12l\n\x15\x66lat_subscription_fee\x18\t \x01(\x0b\x32\x46.google.cloud.commerceproducer.v1beta.Sku.SkuPrice.FlatSubscriptionFeeB\x03\xe0\x41\x03H\x00\x12\x37\n\x0e\x65\x66\x66\x65\x63tive_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x1a\x12\n\x10InactiveSkuPrice\x1a\xad\x01\n\x1cManagedServiceMetricUsageFee\x12[\n\x0ctiered_price\x18\x02 \x01(\x0b\x32>.google.cloud.commerceproducer.v1beta.Sku.SkuPrice.TieredPriceB\x03\xe0\x41\x03H\x00\x12\x1d\n\x10\x63\x61nonical_metric\x18\x01 \x01(\tB\x03\xe0\x41\x03\x42\x11\n\x0fprice_structure\x1a\xd9\x06\n\x1c\x43omputeEngineLicenseUsageFee\x12,\n\x0eprice_per_unit\x18\x06 \x01(\x0b\x32\x12.google.type.MoneyH\x00\x12\x19\n\x0clicense_code\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12~\n\x10machine_resource\x18\x02 \x01(\x0e\x32_.google.cloud.commerceproducer.v1beta.Sku.SkuPrice.ComputeEngineLicenseUsageFee.MachineResourceB\x03\xe0\x41\x03\x12\x89\x01\n\x16machine_resource_range\x18\x03 \x01(\x0b\x32\x64.google.cloud.commerceproducer.v1beta.Sku.SkuPrice.ComputeEngineLicenseUsageFee.MachineResourceRangeB\x03\xe0\x41\x03\x12\x80\x01\n\x11usage_calculation\x18\x04 \x01(\x0e\x32`.google.cloud.commerceproducer.v1beta.Sku.SkuPrice.ComputeEngineLicenseUsageFee.UsageCalculationB\x03\xe0\x41\x03\x12\x11\n\x04unit\x18\x05 \x01(\tB\x03\xe0\x41\x03\x1a[\n\x14MachineResourceRange\x12\x18\n\x0bstart_value\x18\x01 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1b\n\tend_value\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x42\x0c\n\n_end_value\"d\n\x0fMachineResource\x12 \n\x1cMACHINE_RESOURCE_UNSPECIFIED\x10\x00\x12\x0e\n\nVCPU_COUNT\x10\x01\x12\x10\n\x0cMEMORY_BYTES\x10\x02\x12\r\n\tGPU_COUNT\x10\x03\"x\n\x10UsageCalculation\x12!\n\x1dUSAGE_CALCULATION_UNSPECIFIED\x10\x00\x12\x14\n\x10INSTANCE_RUNTIME\x10\x01\x12+\n\'LINEAR_RESOURCE_SCALED_INSTANCE_RUNTIME\x10\x02\x42\x11\n\x0fprice_structure\x1a\xa2\x06\n\x1bKubernetesEnginePodUsageFee\x12,\n\x0eprice_per_unit\x18\x06 \x01(\x0b\x32\x12.google.type.MoneyH\x00\x12u\n\x0cpod_resource\x18\x02 \x01(\x0e\x32Z.google.cloud.commerceproducer.v1beta.Sku.SkuPrice.KubernetesEnginePodUsageFee.PodResourceB\x03\xe0\x41\x03\x12\x80\x01\n\x12pod_resource_range\x18\x03 \x01(\x0b\x32_.google.cloud.commerceproducer.v1beta.Sku.SkuPrice.KubernetesEnginePodUsageFee.PodResourceRangeB\x03\xe0\x41\x03\x12\x7f\n\x11usage_calculation\x18\x04 \x01(\x0e\x32_.google.cloud.commerceproducer.v1beta.Sku.SkuPrice.KubernetesEnginePodUsageFee.UsageCalculationB\x03\xe0\x41\x03\x12\x11\n\x04unit\x18\x05 \x01(\tB\x03\xe0\x41\x03\x1aW\n\x10PodResourceRange\x12\x18\n\x0bstart_value\x18\x01 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1b\n\tend_value\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x42\x0c\n\n_end_value\"k\n\x0bPodResource\x12\x1c\n\x18POD_RESOURCE_UNSPECIFIED\x10\x00\x12\x0e\n\nVCPU_COUNT\x10\x01\x12\x10\n\x0cMEMORY_BYTES\x10\x02\x12\r\n\tGPU_COUNT\x10\x03\x12\r\n\tTPU_COUNT\x10\x04\"n\n\x10UsageCalculation\x12!\n\x1dUSAGE_CALCULATION_UNSPECIFIED\x10\x00\x12\x0f\n\x0bPOD_RUNTIME\x10\x01\x12&\n\"LINEAR_RESOURCE_SCALED_POD_RUNTIME\x10\x02\x42\x11\n\x0fprice_structure\x1a\xfb\x11\n\x1e\x41iPlatformManagedModelUsageFee\x12[\n\x0ctiered_price\x18\x07 \x01(\x0b\x32>.google.cloud.commerceproducer.v1beta.Sku.SkuPrice.TieredPriceB\x03\xe0\x41\x03H\x00\x12\x8e\x01\n\x0cusage_metric\x18\x01 \x01(\x0b\x32s.google.cloud.commerceproducer.v1beta.Sku.SkuPrice.AiPlatformManagedModelUsageFee.AiPlatformManagedModelUsageMetricB\x03\xe0\x41\x03\x12p\n\x08location\x18\x03 \x01(\x0b\x32Y.google.cloud.commerceproducer.v1beta.Sku.SkuPrice.AiPlatformManagedModelEndpointLocationB\x03\xe0\x41\x03\x12~\n\x0fprediction_mode\x18\x04 \x01(\x0e\x32`.google.cloud.commerceproducer.v1beta.Sku.SkuPrice.AiPlatformManagedModelUsageFee.PredictionModeB\x03\xe0\x41\x03\x12\xa3\x01\n#combined_request_input_tokens_range\x18\x05 \x01(\x0b\x32q.google.cloud.commerceproducer.v1beta.Sku.SkuPrice.AiPlatformManagedModelUsageFee.CombinedRequestInputTokensRangeB\x03\xe0\x41\x03\x12\x9b\x01\n\x1eprovisioned_throughput_overage\x18\x06 \x01(\x0b\x32n.google.cloud.commerceproducer.v1beta.Sku.SkuPrice.AiPlatformManagedModelUsageFee.ProvisionedThroughputOverageB\x03\xe0\x41\x03\x1a\xf7\x08\n!AiPlatformManagedModelUsageMetric\x12\xaa\x01\n\x13input_tokens_metric\x18\x01 \x01(\x0b\x32\x85\x01.google.cloud.commerceproducer.v1beta.Sku.SkuPrice.AiPlatformManagedModelUsageFee.AiPlatformManagedModelUsageMetric.InputTokensMetricB\x03\xe0\x41\x03H\x00\x12\xbe\x01\n\x1e\x63\x61\x63he_read_input_tokens_metric\x18\x02 \x01(\x0b\x32\x8e\x01.google.cloud.commerceproducer.v1beta.Sku.SkuPrice.AiPlatformManagedModelUsageFee.AiPlatformManagedModelUsageMetric.CacheReadInputTokensMetricB\x03\xe0\x41\x03H\x00\x12\xc0\x01\n\x1f\x63\x61\x63he_write_input_tokens_metric\x18\x03 \x01(\x0b\x32\x8f\x01.google.cloud.commerceproducer.v1beta.Sku.SkuPrice.AiPlatformManagedModelUsageFee.AiPlatformManagedModelUsageMetric.CacheWriteInputTokensMetricB\x03\xe0\x41\x03H\x00\x12\xac\x01\n\x14output_tokens_metric\x18\x04 \x01(\x0b\x32\x86\x01.google.cloud.commerceproducer.v1beta.Sku.SkuPrice.AiPlatformManagedModelUsageFee.AiPlatformManagedModelUsageMetric.OutputTokensMetricB\x03\xe0\x41\x03H\x00\x12\xb7\x01\n\x1aweb_search_requests_metric\x18\x05 \x01(\x0b\x32\x8b\x01.google.cloud.commerceproducer.v1beta.Sku.SkuPrice.AiPlatformManagedModelUsageFee.AiPlatformManagedModelUsageMetric.WebSearchRequestsMetricB\x03\xe0\x41\x03H\x00\x1a\x13\n\x11InputTokensMetric\x1a\x1c\n\x1a\x43\x61\x63heReadInputTokensMetric\x1aJ\n\x1b\x43\x61\x63heWriteInputTokensMetric\x12+\n\x03ttl\x18\x01 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x03\x1a\x14\n\x12OutputTokensMetric\x1a\x19\n\x17WebSearchRequestsMetricB\x08\n\x06metric\x1a\x66\n\x1f\x43ombinedRequestInputTokensRange\x12\x18\n\x0bstart_value\x18\x01 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1b\n\tend_value\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x42\x0c\n\n_end_value\x1a`\n\x1cProvisionedThroughputOverage\x12@\n\x07service\x18\x01 \x01(\tB/\xe0\x41\x03\xfa\x41)\x12\'commerceproducer.googleapis.com/Service\"^\n\x0ePredictionMode\x12\x1f\n\x1bPREDICTION_MODE_UNSPECIFIED\x10\x00\x12\x15\n\x11ONLINE_PREDICTION\x10\x01\x12\x14\n\x10\x42\x41TCH_PREDICTION\x10\x02\x42\x11\n\x0fprice_structure\x1a\x9b\x02\n\"AiPlatformProvisionedThroughputFee\x12#\n\x14term_duration_months\x18\x02 \x01(\x05\x42\x03\xe0\x41\x03H\x00\x12\x30\n\x12gsu_price_per_unit\x18\x04 \x01(\x0b\x32\x12.google.type.MoneyH\x01\x12p\n\x08location\x18\x01 \x01(\x0b\x32Y.google.cloud.commerceproducer.v1beta.Sku.SkuPrice.AiPlatformManagedModelEndpointLocationB\x03\xe0\x41\x03\x12\x11\n\x04unit\x18\x03 \x01(\tB\x03\xe0\x41\x03\x42\x06\n\x04termB\x11\n\x0fprice_structure\x1a\x9c\x03\n\x1f\x41iPlatformDeployedModelUsageFee\x12\x1f\n\x10\x61\x63\x63\x65lerator_type\x18\x02 \x01(\tB\x03\xe0\x41\x03H\x00\x12\x31\n\x0eprice_per_unit\x18\x05 \x01(\x0b\x32\x12.google.type.MoneyB\x03\xe0\x41\x03H\x01\x12\x11\n\x04unit\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x83\x01\n\x11usage_calculation\x18\x04 \x01(\x0e\x32\x63.google.cloud.commerceproducer.v1beta.Sku.SkuPrice.AiPlatformDeployedModelUsageFee.UsageCalculationB\x03\xe0\x41\x03\"d\n\x10UsageCalculation\x12!\n\x1dUSAGE_CALCULATION_UNSPECIFIED\x10\x00\x12-\n)LINEAR_RESOURCE_SCALED_DEPLOYMENT_RUNTIME\x10\x02\x42\x13\n\x11hardware_resourceB\x11\n\x0fprice_structure\x1an\n\x13\x46latSubscriptionFee\x12\x31\n\x0eprice_per_unit\x18\x03 \x01(\x0b\x32\x12.google.type.MoneyB\x03\xe0\x41\x03H\x00\x12\x11\n\x04unit\x18\x02 \x01(\tB\x03\xe0\x41\x03\x42\x11\n\x0fprice_structure\x1a\xbe\x02\n\x0bTieredPrice\x12\x11\n\x04unit\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x1d\n\x10unit_description\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x33\n\x10price_unit_count\x18\x03 \x01(\x0b\x32\x14.google.type.DecimalB\x03\xe0\x41\x03\x12\x62\n\x0bprice_tiers\x18\x04 \x03(\x0b\x32H.google.cloud.commerceproducer.v1beta.Sku.SkuPrice.TieredPrice.PriceTierB\x03\xe0\x41\x03\x1a\x64\n\tPriceTier\x12/\n\x0cstart_amount\x18\x01 \x01(\x0b\x32\x14.google.type.DecimalB\x03\xe0\x41\x03\x12&\n\x05price\x18\x02 \x01(\x0b\x32\x12.google.type.MoneyB\x03\xe0\x41\x03\x1a\x8e\x01\n&AiPlatformManagedModelEndpointLocation\x12\x18\n\tregion_id\x18\x01 \x01(\tB\x03\xe0\x41\x03H\x00\x12\x1e\n\x0fglobal_endpoint\x18\x02 \x01(\x08\x42\x03\xe0\x41\x03H\x00\x12\x1e\n\x0fmulti_region_id\x18\x03 \x01(\tB\x03\xe0\x41\x03H\x00\x42\n\n\x08locationB\n\n\x08sku_type:z\xea\x41w\n#commerceproducer.googleapis.com/Sku\x12\x45projects/{project}/locations/{location}/services/{service}/skus/{sku}*\x04skus2\x03skuB\x84\x02\n(com.google.cloud.commerceproducer.v1betaB\x08SkuProtoP\x01ZTcloud.google.com/go/commerceproducer/apiv1beta/commerceproducerpb;commerceproducerpb\xaa\x02$Google.Cloud.CommerceProducer.V1Beta\xca\x02$Google\\Cloud\\CommerceProducer\\V1beta\xea\x02\'Google::Cloud::CommerceProducer::V1betab\x06proto3" pool = ::Google::Protobuf::DescriptorPool.generated_pool pool.add_serialized_file(descriptor_data) diff --git a/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerceproducer/v1beta/standard_offer_pb.rb b/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerceproducer/v1beta/standard_offer_pb.rb index a00eec609c23..63fdc3836bec 100644 --- a/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerceproducer/v1beta/standard_offer_pb.rb +++ b/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerceproducer/v1beta/standard_offer_pb.rb @@ -9,7 +9,7 @@ require 'google/protobuf/timestamp_pb' -descriptor_data = "\n9google/cloud/commerceproducer/v1beta/standard_offer.proto\x12$google.cloud.commerceproducer.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xa5\n\n\rStandardOffer\x12#\n\x14term_duration_months\x18\x07 \x01(\x05\x42\x03\xe0\x41\x03H\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x37\n\x0e\x65\x66\x66\x65\x63tive_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x65xpire_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1a\n\rservice_level\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12 \n\x13service_level_title\x18\t \x01(\tB\x03\xe0\x41\x03\x12X\n\x0bprice_model\x18\x08 \x01(\x0b\x32>.google.cloud.commerceproducer.v1beta.StandardOffer.PriceModelB\x03\xe0\x41\x03\x1a\xaf\x05\n\nPriceModel\x12k\n\x08\x66lat_fee\x18\x02 \x01(\x0b\x32R.google.cloud.commerceproducer.v1beta.StandardOffer.PriceModel.FlatFeeSubscriptionB\x03\xe0\x41\x03H\x00\x12X\n\x05usage\x18\x01 \x01(\x0b\x32\x44.google.cloud.commerceproducer.v1beta.StandardOffer.PriceModel.UsageB\x03\xe0\x41\x03\x1a\x44\n\x07SkuList\x12\x39\n\x04skus\x18\x01 \x03(\tB+\xe0\x41\x03\xfa\x41%\n#commerceproducer.googleapis.com/Sku\x1aT\n\x0cSkuGroupList\x12\x44\n\nsku_groups\x18\x01 \x03(\tB0\xe0\x41\x03\xfa\x41*\n(commerceproducer.googleapis.com/SkuGroup\x1a\xdc\x01\n\x05Usage\x12_\n\x08sku_list\x18\x01 \x01(\x0b\x32\x46.google.cloud.commerceproducer.v1beta.StandardOffer.PriceModel.SkuListB\x03\xe0\x41\x03H\x00\x12j\n\x0esku_group_list\x18\x02 \x01(\x0b\x32K.google.cloud.commerceproducer.v1beta.StandardOffer.PriceModel.SkuGroupListB\x03\xe0\x41\x03H\x00\x42\x06\n\x04skus\x1aO\n\x13\x46latFeeSubscription\x12\x38\n\x03sku\x18\x01 \x01(\tB+\xe0\x41\x03\xfa\x41%\n#commerceproducer.googleapis.com/SkuB\x0e\n\x0csubscription:\xae\x01\xea\x41\xaa\x01\n-commerceproducer.googleapis.com/StandardOffer\x12Zprojects/{project}/locations/{location}/services/{service}/standardOffers/{standard_offer}*\x0estandardOffers2\rstandardOfferB\x06\n\x04termB\xe7\x01\n(com.google.cloud.commerceproducer.v1betaB\x12StandardOfferProtoP\x01ZTcloud.google.com/go/commerceproducer/apiv1beta/commerceproducerpb;commerceproducerpb\xaa\x02$Google.Cloud.CommerceProducer.V1Beta\xea\x02\'Google::Cloud::CommerceProducer::V1betab\x06proto3" +descriptor_data = "\n9google/cloud/commerceproducer/v1beta/standard_offer.proto\x12$google.cloud.commerceproducer.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xa5\n\n\rStandardOffer\x12#\n\x14term_duration_months\x18\x07 \x01(\x05\x42\x03\xe0\x41\x03H\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x37\n\x0e\x65\x66\x66\x65\x63tive_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x65xpire_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1a\n\rservice_level\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12 \n\x13service_level_title\x18\t \x01(\tB\x03\xe0\x41\x03\x12X\n\x0bprice_model\x18\x08 \x01(\x0b\x32>.google.cloud.commerceproducer.v1beta.StandardOffer.PriceModelB\x03\xe0\x41\x03\x1a\xaf\x05\n\nPriceModel\x12k\n\x08\x66lat_fee\x18\x02 \x01(\x0b\x32R.google.cloud.commerceproducer.v1beta.StandardOffer.PriceModel.FlatFeeSubscriptionB\x03\xe0\x41\x03H\x00\x12X\n\x05usage\x18\x01 \x01(\x0b\x32\x44.google.cloud.commerceproducer.v1beta.StandardOffer.PriceModel.UsageB\x03\xe0\x41\x03\x1a\x44\n\x07SkuList\x12\x39\n\x04skus\x18\x01 \x03(\tB+\xe0\x41\x03\xfa\x41%\n#commerceproducer.googleapis.com/Sku\x1aT\n\x0cSkuGroupList\x12\x44\n\nsku_groups\x18\x01 \x03(\tB0\xe0\x41\x03\xfa\x41*\n(commerceproducer.googleapis.com/SkuGroup\x1a\xdc\x01\n\x05Usage\x12_\n\x08sku_list\x18\x01 \x01(\x0b\x32\x46.google.cloud.commerceproducer.v1beta.StandardOffer.PriceModel.SkuListB\x03\xe0\x41\x03H\x00\x12j\n\x0esku_group_list\x18\x02 \x01(\x0b\x32K.google.cloud.commerceproducer.v1beta.StandardOffer.PriceModel.SkuGroupListB\x03\xe0\x41\x03H\x00\x42\x06\n\x04skus\x1aO\n\x13\x46latFeeSubscription\x12\x38\n\x03sku\x18\x01 \x01(\tB+\xe0\x41\x03\xfa\x41%\n#commerceproducer.googleapis.com/SkuB\x0e\n\x0csubscription:\xae\x01\xea\x41\xaa\x01\n-commerceproducer.googleapis.com/StandardOffer\x12Zprojects/{project}/locations/{location}/services/{service}/standardOffers/{standard_offer}*\x0estandardOffers2\rstandardOfferB\x06\n\x04termB\x8e\x02\n(com.google.cloud.commerceproducer.v1betaB\x12StandardOfferProtoP\x01ZTcloud.google.com/go/commerceproducer/apiv1beta/commerceproducerpb;commerceproducerpb\xaa\x02$Google.Cloud.CommerceProducer.V1Beta\xca\x02$Google\\Cloud\\CommerceProducer\\V1beta\xea\x02\'Google::Cloud::CommerceProducer::V1betab\x06proto3" pool = ::Google::Protobuf::DescriptorPool.generated_pool pool.add_serialized_file(descriptor_data) diff --git a/google-cloud-commerce_producer-v1beta/proto_docs/google/cloud/commerceproducer/v1beta/private_offer.rb b/google-cloud-commerce_producer-v1beta/proto_docs/google/cloud/commerceproducer/v1beta/private_offer.rb index c1c3f1f66120..87b0eb5b580b 100644 --- a/google-cloud-commerce_producer-v1beta/proto_docs/google/cloud/commerceproducer/v1beta/private_offer.rb +++ b/google-cloud-commerce_producer-v1beta/proto_docs/google/cloud/commerceproducer/v1beta/private_offer.rb @@ -551,6 +551,10 @@ module EndPolicy # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer::SingleProductOffer::RevenueShare] # Output only. Revenue share information for this Private Offer. # Not included for `PRIVATE_OFFER_VIEW_BASIC`. + # @!attribute [rw] additional_contract_value + # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer::SingleProductOffer::AdditionalContractValue] + # Optional. Additional contract value that the customer is legally + # obligated to spend on the product over the duration of the offer. class SingleProductOffer include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -984,6 +988,55 @@ class RevenueShare include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end + + # Additional contract value that represents a spend obligation or target + # contract value tracked out-of-band by the partner. + # @!attribute [rw] contract_value + # @return [::Google::Type::Money] + # Optional. The absolute, cumulative contract value of the customer's + # spend obligation that is added on top of the automatically billed fees + # from Google. This amount is not automatically billed or invoiced by + # Google; instead, it is tracked as a legal spend guarantee to be met via + # usage reporting and manually trued-up by partners. + # + # The overall total contract value of the offer is calculated as the + # sum of Google-billed fees (from installments), plus this additional + # contract value. + # + # For amendments, this field must be set to the new cumulative + # additional total. + # + # For example: + # + # * Initial Offer: 3 installments of $15 (total $45 billed by Google) + # plus an `additional_contract_value` of $100 (billed by Partner, with + # true-ups happening at the end of the offer's term). + # The overall total contract value of the offer is $145 ($45 + $100). + # * Amended Offer: 6 installments of $15 (total $90 billed by Google) + # plus an `additional_contract_value` of $70 (billed by Partner, with + # true-ups happening at the end of the offer's term). + # The overall total contract value of the amended offer is $160 + # ($90 + $70). + # + # Must be non-negative. The maximum allowed value is 1,000,000,000 USD. + # @!attribute [rw] eligible_skus + # @return [::Array<::String>] + # Optional. The resource names of the SKUs whose tracked usage is + # eligible to contribute toward satisfying this additional contract value + # obligation. + # + # This list explicitly separates core spend obligations from exclusions + # like overage fees, which do not count toward meeting the customer's + # legal spend commitment. + # + # Must be non-empty for the offer to be published. + # + # Format: + # projects/\\{project}/locations/\\{location}/services/\\{service}/skus/\\{sku} + class AdditionalContractValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end end # State of an offer. diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/.gitignore b/owl-bot-staging/google-cloud-commerce_producer-v1beta/.gitignore deleted file mode 100644 index a2e97ac84259..000000000000 --- a/owl-bot-staging/google-cloud-commerce_producer-v1beta/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/.repo-metadata.json b/owl-bot-staging/google-cloud-commerce_producer-v1beta/.repo-metadata.json deleted file mode 100644 index f51762451d9c..000000000000 --- a/owl-bot-staging/google-cloud-commerce_producer-v1beta/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "commerceproducer.googleapis.com", - "api_shortname": "commerceproducer", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-commerce_producer-v1beta/latest", - "distribution_name": "google-cloud-commerce_producer-v1beta", - "is_cloud": true, - "language": "ruby", - "name": "commerceproducer", - "name_pretty": "Cloud Commerce Producer V1BETA API", - "product_documentation": "https://docs.cloud.google.com/marketplace/docs/partners/commerce-producer-api/reference", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Using this API, partners can: * Manage private offers extended to specific customer billing accounts. * Attach documents to private offers, such as custom EULAs or Statements of Work. * Publish private offers to make them available to customers. # Data Model The following resources are exposed by this API: * **Service**: Represents a service offered by a partner on Google Cloud Marketplace. * **StandardOffer**: Represents a standard offer for a product, which can be used as a base for private offers. * **PrivateOffer**: Represents a customized offer extended to a specific customer billing account. * **PrivateOfferDocument**: Represents a document attached to a private offer. * **SkuGroup**: Represents a group of SKUs (Stock Keeping Units) used for pricing or commitment. * **Sku**: Represents a SKU (Stock Keeping Unit) used for pricing or commitment. Note that google-cloud-commerce_producer-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-commerce_producer instead. See the readme for more details.", - "ruby-cloud-product-url": "https://docs.cloud.google.com/marketplace/docs/partners/commerce-producer-api/reference", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/.rubocop.yml b/owl-bot-staging/google-cloud-commerce_producer-v1beta/.rubocop.yml deleted file mode 100644 index 820e178abcb5..000000000000 --- a/owl-bot-staging/google-cloud-commerce_producer-v1beta/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-commerce_producer-v1beta.gemspec" - - "lib/**/*_pb.rb" - - "proto_docs/**/*" - - "test/**/*" - - "acceptance/**/*" - - "samples/acceptance/**/*" - - "Rakefile" - -Layout/LineLength: - Enabled: false -Metrics/AbcSize: - Enabled: false -Metrics/ClassLength: - Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false -Metrics/MethodLength: - Enabled: false -Metrics/ModuleLength: - Enabled: false -Metrics/PerceivedComplexity: - Enabled: false -Naming/AccessorMethodName: - Exclude: - - "snippets/**/*.rb" -Naming/FileName: - Exclude: - - "lib/google-cloud-commerce_producer-v1beta.rb" diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/.toys.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-commerce_producer-v1beta/.toys.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -toys_version! ">= 0.15.3" - -if ENV["RUBY_COMMON_TOOLS"] - common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] - load File.join(common_tools_dir, "toys", "gapic") -else - load_git remote: "https://github.com/googleapis/ruby-common-tools.git", - path: "toys/gapic", - update: true -end diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/.yardopts b/owl-bot-staging/google-cloud-commerce_producer-v1beta/.yardopts deleted file mode 100644 index 4ec4dc28b1aa..000000000000 --- a/owl-bot-staging/google-cloud-commerce_producer-v1beta/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Cloud Commerce Producer V1BETA API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -./proto_docs/**/*.rb -- -README.md -LICENSE.md -AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/AUTHENTICATION.md b/owl-bot-staging/google-cloud-commerce_producer-v1beta/AUTHENTICATION.md deleted file mode 100644 index 37fdc397ac7f..000000000000 --- a/owl-bot-staging/google-cloud-commerce_producer-v1beta/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-commerce_producer-v1beta library is to use -[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). -To review all of your authentication options, see [Credentials lookup](#credential-lookup). - -## Quickstart - -The following example shows how to set up authentication for a local development -environment with your user credentials. - -**NOTE:** This method is _not_ recommended for running in production. User credentials -should be used only during development. - -1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). -2. Set up a local ADC file with your user credentials: - -```sh -gcloud auth application-default login -``` - -3. Write code as if already authenticated. - -For more information about setting up authentication for a local development environment, see -[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). - -## Credential Lookup - -The google-cloud-commerce_producer-v1beta library provides several mechanisms to configure your system. -Generally, using Application Default Credentials to facilitate automatic -credentials discovery is the easist method. But if you need to explicitly specify -credentials, there are several methods available to you. - -Credentials are accepted in the following ways, in the following order or precedence: - -1. Credentials specified in method arguments -2. Credentials specified in configuration -3. Credentials pointed to or included in environment variables -4. Credentials found in local ADC file -5. Credentials returned by the metadata server for the attached service account (GCP) - -### Configuration - -You can configure a path to a JSON credentials file, either for an individual client object or -globally, for all client objects. The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -To configure a credentials file for an individual client initialization: - -```ruby -require "google/cloud/commerce_producer/v1beta" - -client = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/commerce_producer/v1beta" - -::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new -``` - -### Environment Variables - -You can also use an environment variable to provide a JSON credentials file. -The environment variable can contain a path to the credentials file or, for -environments such as Docker containers where writing files is not encouraged, -you can include the credentials file itself. - -The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -The environment variables that google-cloud-commerce_producer-v1beta -checks for credentials are: - -* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents -* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file - -```ruby -require "google/cloud/commerce_producer/v1beta" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new -``` - -### Local ADC file - -You can set up a local ADC file with your user credentials for authentication during -development. If credentials are not provided in code or in environment variables, -then the local ADC credentials are discovered. - -Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. - -### Google Cloud Platform environments - -When running on Google Cloud Platform (GCP), including Google Compute Engine -(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud -Functions (GCF) and Cloud Run, credentials are retrieved from the attached -service account automatically. Code should be written as if already authenticated. - -For more information, see -[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/CHANGELOG.md b/owl-bot-staging/google-cloud-commerce_producer-v1beta/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-commerce_producer-v1beta/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/Gemfile b/owl-bot-staging/google-cloud-commerce_producer-v1beta/Gemfile deleted file mode 100644 index 823c136ec3c0..000000000000 --- a/owl-bot-staging/google-cloud-commerce_producer-v1beta/Gemfile +++ /dev/null @@ -1,15 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.32.0" -gem "irb", "~> 1.17" -gem "minitest", "~> 6.0.2" -gem "minitest-focus", "~> 1.4" -gem "minitest-mock", "~> 5.27" -gem "minitest-reporters", "~> 1.8.0", require: false -gem "minitest-rg", "~> 5.3" -gem "ostruct", "~> 0.5.5" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/LICENSE.md b/owl-bot-staging/google-cloud-commerce_producer-v1beta/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-commerce_producer-v1beta/LICENSE.md +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/README.md b/owl-bot-staging/google-cloud-commerce_producer-v1beta/README.md deleted file mode 100644 index ac19065fec26..000000000000 --- a/owl-bot-staging/google-cloud-commerce_producer-v1beta/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Cloud Commerce Producer V1BETA API - -Partner API for the Cloud Commerce Producer API Early Access. - -Using this API, partners can: * Manage private offers extended to specific customer billing accounts. * Attach documents to private offers, such as custom EULAs or Statements of Work. * Publish private offers to make them available to customers. # Data Model The following resources are exposed by this API: * **Service**: Represents a service offered by a partner on Google Cloud Marketplace. * **StandardOffer**: Represents a standard offer for a product, which can be used as a base for private offers. * **PrivateOffer**: Represents a customized offer extended to a specific customer billing account. * **PrivateOfferDocument**: Represents a document attached to a private offer. * **SkuGroup**: Represents a group of SKUs (Stock Keeping Units) used for pricing or commitment. * **Sku**: Represents a SKU (Stock Keeping Unit) used for pricing or commitment. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Cloud Commerce Producer V1BETA API. Most users should consider using -the main client gem, -[google-cloud-commerce_producer](https://rubygems.org/gems/google-cloud-commerce_producer). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-commerce_producer-v1beta -``` - -## Before You Begin - -In order to use this library, you first need to go through the following steps: - -1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) -1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) -1. [Enable the API.](https://console.cloud.google.com/apis/library/commerceproducer.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/commerce_producer/v1beta" - -client = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new -request = ::Google::Cloud::CommerceProducer::V1beta::ListServicesRequest.new # (request fields as keyword arguments...) -response = client.list_services request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-commerce_producer-v1beta/latest) -for class and method documentation. - -See also the [Product Documentation](https://docs.cloud.google.com/marketplace/docs/partners/commerce-producer-api/reference) -for general usage information. - -## Debug Logging - -This library comes with opt-in Debug Logging that can help you troubleshoot -your application's integration with the API. When logging is activated, key -events such as requests and responses, along with data payloads and metadata -such as headers and client configuration, are logged to the standard error -stream. - -**WARNING:** Client Library Debug Logging includes your data payloads in -plaintext, which could include sensitive data such as PII for yourself or your -customers, private keys, or other security data that could be compromising if -leaked. Always practice good data hygiene with your application logs, and follow -the principle of least access. Google also recommends that Client Library Debug -Logging be enabled only temporarily during active debugging, and not used -permanently in production. - -To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` -to the value `all`. Alternatively, you can set the value to a comma-delimited -list of client library gem names. This will select the default logging behavior, -which writes logs to the standard error stream. On a local workstation, this may -result in logs appearing on the console. When running on a Google Cloud hosting -service such as [Google Cloud Run](https://cloud.google.com/run), this generally -results in logs appearing alongside your application logs in the -[Google Cloud Logging](https://cloud.google.com/logging/) service. - -You can customize logging by modifying the `logger` configuration when -constructing a client object. For example: - -```ruby -require "google/cloud/commerce_producer/v1beta" -require "logger" - -client = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.2+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-commerce_producer`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-commerce_producer-v1beta`. -_In most cases, you should install the main client._ - -### What's the difference between the main client and a versioned client? - -A _versioned client_ provides a basic set of data types and client classes for -a _single version_ of a specific service. (That is, for a service with multiple -versions, there might be a separate versioned client for each service version.) -Most versioned clients are written and maintained by a code generator. - -The _main client_ is designed to provide you with the _recommended_ client -interfaces for the service. There will be only one main client for any given -service, even a service with multiple versions. The main client includes -factory methods for constructing the client objects we recommend for most -users. In some cases, those will be classes provided by an underlying versioned -client; in other cases, they will be handwritten higher-level client objects -with additional capabilities, convenience methods, or best practices built in. -Generally, the main client will default to a recommended service version, -although in some cases you can override this if you need to talk to a specific -service version. - -### Why would I want to use the main client? - -We recommend that most users install the main client gem for a service. You can -identify this gem as the one _without_ a version in its name, e.g. -`google-cloud-commerce_producer`. -The main client is recommended because it will embody the best practices for -accessing the service, and may also provide more convenient interfaces or -tighter integration into frameworks and third-party libraries. In addition, the -documentation and samples published by Google will generally demonstrate use of -the main client. - -### Why would I want to use a versioned client? - -You can use a versioned client if you are content with a possibly lower-level -class interface, you explicitly want to avoid features provided by the main -client, or you want to access a specific service version not be covered by the -main client. You can identify versioned client gems because the service version -is part of the name, e.g. `google-cloud-commerce_producer-v1beta`. - -### What about the google-apis- clients? - -Client library gems with names that begin with `google-apis-` are based on an -older code generation technology. They talk to a REST/JSON backend (whereas -most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may -not offer the same performance, features, and ease of use provided by more -modern clients. - -The `google-apis-` clients have wide coverage across Google services, so you -might need to use one if there is no modern client available for the service. -However, if a modern client is available, we generally recommend it over the -older `google-apis-` clients. diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/Rakefile b/owl-bot-staging/google-cloud-commerce_producer-v1beta/Rakefile deleted file mode 100644 index 8a3fae448587..000000000000 --- a/owl-bot-staging/google-cloud-commerce_producer-v1beta/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "bundler/setup" -require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = false -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -# Acceptance tests -desc "Run the google-cloud-commerce_producer-v1beta acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["GOOGLE_CLOUD_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["GOOGLE_CLOUD_TEST_KEYFILE_JSON"] || - ENV["GCLOUD_TEST_KEYFILE_JSON"] - end - if project.nil? || keyfile.nil? - fail "You must provide a project and keyfile. e.g. rake acceptance[test123, /path/to/keyfile.json] or GOOGLE_CLOUD_TEST_PROJECT=test123 GOOGLE_CLOUD_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/commerce_producer/v1beta/commerce_transaction/credentials" - ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["GOOGLE_CLOUD_PROJECT"] = project - ENV["GOOGLE_CLOUD_TEST_PROJECT"] = project - ENV["GOOGLE_CLOUD_KEYFILE_JSON"] = keyfile - - Rake::Task["acceptance:run"].invoke -end - -namespace :acceptance do - task :run do - if File.directory? "acceptance" - Rake::Task[:smoke_test].invoke - else - puts "The google-cloud-commerce_producer-v1beta gem has no acceptance tests." - end - end - - desc "Run acceptance cleanup." - task :cleanup do - end -end - -task :samples do - Rake::Task["samples:latest"].invoke -end - -namespace :samples do - task :latest do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-commerce_producer-v1beta gem has no samples to test." - end - end - - task :master do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-commerce_producer-v1beta gem has no samples to test." - end - end -end - -require "yard" -require "yard/rake/yardoc_task" -YARD::Rake::YardocTask.new do |y| - y.options << "--fail-on-warning" -end - -desc "Run yard-doctest example tests." -task :doctest do - puts "The google-cloud-commerce_producer-v1beta gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-commerce_producer-v1beta" - header "google-cloud-commerce_producer-v1beta rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-commerce_producer-v1beta yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-commerce_producer-v1beta test", "*" - Rake::Task[:test].invoke -end - -namespace :ci do - desc "Run the CI build, with smoke tests." - task :smoke_test do - Rake::Task[:ci].invoke - header "google-cloud-commerce_producer-v1beta smoke_test", "*" - Rake::Task[:smoke_test].invoke - end - desc "Run the CI build, with acceptance tests." - task :acceptance do - Rake::Task[:ci].invoke - header "google-cloud-commerce_producer-v1beta acceptance", "*" - Rake::Task[:acceptance].invoke - end - task :a do - # This is a handy shortcut to save typing - Rake::Task["ci:acceptance"].invoke - end -end - -task default: :test - -def header str, token = "#" - line_length = str.length + 8 - puts "" - puts token * line_length - puts "#{token * 3} #{str} #{token * 3}" - puts token * line_length - puts "" -end diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/gapic_metadata.json b/owl-bot-staging/google-cloud-commerce_producer-v1beta/gapic_metadata.json deleted file mode 100644 index d35cba66e411..000000000000 --- a/owl-bot-staging/google-cloud-commerce_producer-v1beta/gapic_metadata.json +++ /dev/null @@ -1,123 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.commerceproducer.v1beta", - "libraryPackage": "::Google::Cloud::CommerceProducer::V1beta", - "services": { - "CommerceTransaction": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client", - "rpcs": { - "ListServices": { - "methods": [ - "list_services" - ] - }, - "GetService": { - "methods": [ - "get_service" - ] - }, - "ListPrivateOffers": { - "methods": [ - "list_private_offers" - ] - }, - "GetPrivateOffer": { - "methods": [ - "get_private_offer" - ] - }, - "ResolveAmendmentTarget": { - "methods": [ - "resolve_amendment_target" - ] - }, - "CreatePrivateOffer": { - "methods": [ - "create_private_offer" - ] - }, - "UpdatePrivateOffer": { - "methods": [ - "update_private_offer" - ] - }, - "PublishPrivateOffer": { - "methods": [ - "publish_private_offer" - ] - }, - "CancelPrivateOffer": { - "methods": [ - "cancel_private_offer" - ] - }, - "DeletePrivateOffer": { - "methods": [ - "delete_private_offer" - ] - }, - "ListPrivateOfferDocuments": { - "methods": [ - "list_private_offer_documents" - ] - }, - "GetPrivateOfferDocument": { - "methods": [ - "get_private_offer_document" - ] - }, - "CreatePrivateOfferDocument": { - "methods": [ - "create_private_offer_document" - ] - }, - "UpdatePrivateOfferDocument": { - "methods": [ - "update_private_offer_document" - ] - }, - "DeletePrivateOfferDocument": { - "methods": [ - "delete_private_offer_document" - ] - }, - "ListStandardOffers": { - "methods": [ - "list_standard_offers" - ] - }, - "GetStandardOffer": { - "methods": [ - "get_standard_offer" - ] - }, - "GetSku": { - "methods": [ - "get_sku" - ] - }, - "ListSkus": { - "methods": [ - "list_skus" - ] - }, - "GetSkuGroup": { - "methods": [ - "get_sku_group" - ] - }, - "ListSkuGroups": { - "methods": [ - "list_sku_groups" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/google-cloud-commerce_producer-v1beta.gemspec b/owl-bot-staging/google-cloud-commerce_producer-v1beta/google-cloud-commerce_producer-v1beta.gemspec deleted file mode 100644 index 7f96486a356c..000000000000 --- a/owl-bot-staging/google-cloud-commerce_producer-v1beta/google-cloud-commerce_producer-v1beta.gemspec +++ /dev/null @@ -1,29 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/commerce_producer/v1beta/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-commerce_producer-v1beta" - gem.version = Google::Cloud::CommerceProducer::V1beta::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Using this API, partners can: * Manage private offers extended to specific customer billing accounts. * Attach documents to private offers, such as custom EULAs or Statements of Work. * Publish private offers to make them available to customers. # Data Model The following resources are exposed by this API: * **Service**: Represents a service offered by a partner on Google Cloud Marketplace. * **StandardOffer**: Represents a standard offer for a product, which can be used as a base for private offers. * **PrivateOffer**: Represents a customized offer extended to a specific customer billing account. * **PrivateOfferDocument**: Represents a document attached to a private offer. * **SkuGroup**: Represents a group of SKUs (Stock Keeping Units) used for pricing or commitment. * **Sku**: Represents a SKU (Stock Keeping Unit) used for pricing or commitment. Note that google-cloud-commerce_producer-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-commerce_producer instead. See the readme for more details." - gem.summary = "Partner API for the Cloud Commerce Producer API Early Access." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.3" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "google-cloud-location", "~> 1.0" -end diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google-cloud-commerce_producer-v1beta.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google-cloud-commerce_producer-v1beta.rb deleted file mode 100644 index 057c0792ccac..000000000000 --- a/owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google-cloud-commerce_producer-v1beta.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# This gem does not autoload during Bundler.require. To load this gem, -# issue explicit require statements for the packages desired, e.g.: -# require "google/cloud/commerce_producer/v1beta" diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerce_producer/v1beta.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerce_producer/v1beta.rb deleted file mode 100644 index c3f88dd1c729..000000000000 --- a/owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerce_producer/v1beta.rb +++ /dev/null @@ -1,45 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/commerce_producer/v1beta/commerce_transaction" -require "google/cloud/commerce_producer/v1beta/version" - -module Google - module Cloud - module CommerceProducer - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/commerce_producer/v1beta" - # client = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/commerce_producer/v1beta" - # client = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new - # - module V1beta - end - end - end -end - -helper_path = ::File.join __dir__, "v1beta", "_helpers.rb" -require "google/cloud/commerce_producer/v1beta/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerce_producer/v1beta/bindings_override.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerce_producer/v1beta/bindings_override.rb deleted file mode 100644 index b07645bf3a23..000000000000 --- a/owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerce_producer/v1beta/bindings_override.rb +++ /dev/null @@ -1,75 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" - -module Google - module Cloud - module CommerceProducer - ## - # @example Loading just the REST part of this package, including all its services, and instantiating a REST client - # - # require "google/cloud/commerce_producer/v1beta/rest" - # client = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new - # - module V1beta - ## - # @private - # Initialize the mixin bindings configuration - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "CommerceProducer"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - - default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config - default_config.bindings_override["google.cloud.location.Locations.GetLocation"] = [ - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1beta/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ], - body: nil - ) - ] - default_config.bindings_override["google.cloud.location.Locations.ListLocations"] = [ - - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1beta/{name}/locations", - matches: [ - ["name", %r{^projects/[^/]+/?$}, false] - ], - body: nil - ) - ] - default_config - end - yield @configure if block_given? - @configure - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerce_producer/v1beta/commerce_transaction.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerce_producer/v1beta/commerce_transaction.rb deleted file mode 100644 index 361bca635816..000000000000 --- a/owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerce_producer/v1beta/commerce_transaction.rb +++ /dev/null @@ -1,55 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/commerce_producer/v1beta/version" - -require "google/cloud/commerce_producer/v1beta/commerce_transaction/credentials" -require "google/cloud/commerce_producer/v1beta/commerce_transaction/paths" -require "google/cloud/commerce_producer/v1beta/commerce_transaction/client" -require "google/cloud/commerce_producer/v1beta/commerce_transaction/rest" - -module Google - module Cloud - module CommerceProducer - module V1beta - ## - # APIs related to managing resources that model commercial transactions. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/commerce_producer/v1beta/commerce_transaction" - # client = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/commerce_producer/v1beta/commerce_transaction/rest" - # client = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new - # - module CommerceTransaction - end - end - end - end -end - -helper_path = ::File.join __dir__, "commerce_transaction", "helpers.rb" -require "google/cloud/commerce_producer/v1beta/commerce_transaction/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerce_producer/v1beta/commerce_transaction/client.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerce_producer/v1beta/commerce_transaction/client.rb deleted file mode 100644 index 402b4e9c2323..000000000000 --- a/owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerce_producer/v1beta/commerce_transaction/client.rb +++ /dev/null @@ -1,2574 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/commerceproducer/v1beta/commerce_transaction_pb" -require "google/cloud/location" - -module Google - module Cloud - module CommerceProducer - module V1beta - module CommerceTransaction - ## - # Client for the CommerceTransaction service. - # - # APIs related to managing resources that model commercial transactions. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "commerceproducer.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :commerce_transaction_stub - - ## - # Configure the CommerceTransaction Client class. - # - # See {::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all CommerceTransaction clients - # ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "CommerceProducer", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.list_services.timeout = 60.0 - default_config.rpcs.list_services.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_service.timeout = 60.0 - default_config.rpcs.get_service.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_private_offers.timeout = 60.0 - default_config.rpcs.list_private_offers.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_private_offer.timeout = 60.0 - default_config.rpcs.get_private_offer.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.resolve_amendment_target.timeout = 60.0 - - default_config.rpcs.create_private_offer.timeout = 60.0 - - default_config.rpcs.update_private_offer.timeout = 60.0 - - default_config.rpcs.publish_private_offer.timeout = 60.0 - - default_config.rpcs.cancel_private_offer.timeout = 60.0 - - default_config.rpcs.delete_private_offer.timeout = 60.0 - - default_config.rpcs.list_private_offer_documents.timeout = 60.0 - default_config.rpcs.list_private_offer_documents.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_private_offer_document.timeout = 60.0 - default_config.rpcs.get_private_offer_document.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_private_offer_document.timeout = 60.0 - - default_config.rpcs.update_private_offer_document.timeout = 60.0 - - default_config.rpcs.delete_private_offer_document.timeout = 60.0 - - default_config.rpcs.list_standard_offers.timeout = 60.0 - default_config.rpcs.list_standard_offers.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_standard_offer.timeout = 60.0 - default_config.rpcs.get_standard_offer.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_sku.timeout = 60.0 - default_config.rpcs.get_sku.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_skus.timeout = 60.0 - default_config.rpcs.list_skus.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_sku_group.timeout = 60.0 - default_config.rpcs.get_sku_group.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_sku_groups.timeout = 60.0 - default_config.rpcs.list_sku_groups.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the CommerceTransaction Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @commerce_transaction_stub.universe_domain - end - - ## - # Create a new CommerceTransaction client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the CommerceTransaction client. - # @yieldparam config [Client::Configuration] - # - def initialize - # These require statements are intentionally placed here to initialize - # the gRPC module only when it's required. - # See https://github.com/googleapis/toolkit/issues/446 - require "gapic/grpc" - require "google/cloud/commerceproducer/v1beta/commerce_transaction_services_pb" - - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @commerce_transaction_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Stub, - credentials: credentials, - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - channel_args: @config.channel_args, - interceptors: @config.interceptors, - channel_pool_config: @config.channel_pool, - logger: @config.logger - ) - - @commerce_transaction_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - - @location_client = Google::Cloud::Location::Locations::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @commerce_transaction_stub.endpoint - config.universe_domain = @commerce_transaction_stub.universe_domain - config.logger = @commerce_transaction_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Client] - # - attr_reader :location_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @commerce_transaction_stub.logger - end - - # Service calls - - ## - # Lists Services in a given project and location. - # - # @overload list_services(request, options = nil) - # Pass arguments to `list_services` via a request object, either of type - # {::Google::Cloud::CommerceProducer::V1beta::ListServicesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CommerceProducer::V1beta::ListServicesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_services(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_services` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent value for ListServicesRequest - # @param page_size [::Integer] - # Optional. Maximum results to return. The service may return fewer than this - # value. The maximum value is 500; values above 500 will be coerced to 500. - # If unspecified, the server will default to the maximum. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::CommerceProducer::V1beta::Service>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::CommerceProducer::V1beta::Service>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/commerce_producer/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CommerceProducer::V1beta::ListServicesRequest.new - # - # # Call the list_services method. - # result = client.list_services request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::CommerceProducer::V1beta::Service. - # p item - # end - # - def list_services request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::ListServicesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_services.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_services.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_services.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @commerce_transaction_stub.call_rpc :list_services, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @commerce_transaction_stub, :list_services, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single Service. - # - # @overload get_service(request, options = nil) - # Pass arguments to `get_service` via a request object, either of type - # {::Google::Cloud::CommerceProducer::V1beta::GetServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CommerceProducer::V1beta::GetServiceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_service(name: nil, view: nil) - # Pass arguments to `get_service` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource - # @param view [::Google::Cloud::CommerceProducer::V1beta::ServiceView] - # Optional. The view of the Service to return. - # If unspecified, the default view is BASIC. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::CommerceProducer::V1beta::Service] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::CommerceProducer::V1beta::Service] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/commerce_producer/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CommerceProducer::V1beta::GetServiceRequest.new - # - # # Call the get_service method. - # result = client.get_service request - # - # # The returned object is of type Google::Cloud::CommerceProducer::V1beta::Service. - # p result - # - def get_service request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::GetServiceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_service.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_service.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_service.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @commerce_transaction_stub.call_rpc :get_service, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists PrivateOffers for the given parent. - # - # @overload list_private_offers(request, options = nil) - # Pass arguments to `list_private_offers` via a request object, either of type - # {::Google::Cloud::CommerceProducer::V1beta::ListPrivateOffersRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CommerceProducer::V1beta::ListPrivateOffersRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_private_offers(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_private_offers` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent value for ListPrivateOffersRequest - # @param page_size [::Integer] - # Optional. Maximum results to return. The service may return fewer than this - # value. The maximum value is 500; values above 500 will be coerced to 500. - # If unspecified, the server will default to the maximum. - # @param page_token [::String] - # Optional. A page token, received from a previous list response message. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters of the list request must match the - # request that returned the page token. - # @param filter [::String] - # Optional. Filter expression that matches a subset of resources to show. - # See https://google.aip.dev/160 for more details. - # Only supports filtering by: - # - # * `update_time`. Example: `update_time > "2012-04-21T11:30:00-04:00"`. - # @param order_by [::String] - # Optional. Ordering expression for sorting the results. - # See https://google.aip.dev/132#ordering for more details. - # If no value is present the default ordering is unspecified. - # Only supports ordering by: - # - # * `update_time` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::CommerceProducer::V1beta::PrivateOffer>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::CommerceProducer::V1beta::PrivateOffer>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/commerce_producer/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CommerceProducer::V1beta::ListPrivateOffersRequest.new - # - # # Call the list_private_offers method. - # result = client.list_private_offers request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::CommerceProducer::V1beta::PrivateOffer. - # p item - # end - # - def list_private_offers request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::ListPrivateOffersRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_private_offers.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_private_offers.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_private_offers.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @commerce_transaction_stub.call_rpc :list_private_offers, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @commerce_transaction_stub, :list_private_offers, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single PrivateOffer. - # - # @overload get_private_offer(request, options = nil) - # Pass arguments to `get_private_offer` via a request object, either of type - # {::Google::Cloud::CommerceProducer::V1beta::GetPrivateOfferRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CommerceProducer::V1beta::GetPrivateOfferRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_private_offer(name: nil, view: nil) - # Pass arguments to `get_private_offer` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource - # @param view [::Google::Cloud::CommerceProducer::V1beta::PrivateOfferView] - # Optional. The view of the PrivateOffer to return. - # If unspecified, the default view is BASIC. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/commerce_producer/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CommerceProducer::V1beta::GetPrivateOfferRequest.new - # - # # Call the get_private_offer method. - # result = client.get_private_offer request - # - # # The returned object is of type Google::Cloud::CommerceProducer::V1beta::PrivateOffer. - # p result - # - def get_private_offer request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::GetPrivateOfferRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_private_offer.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_private_offer.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_private_offer.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @commerce_transaction_stub.call_rpc :get_private_offer, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Resolves the existing offer that must be amended when creating a new - # PrivateOffer. Use this method to determine the correct amendment target - # before creating or publishing an offer. - # - # @overload resolve_amendment_target(request, options = nil) - # Pass arguments to `resolve_amendment_target` via a request object, either of type - # {::Google::Cloud::CommerceProducer::V1beta::ResolveAmendmentTargetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CommerceProducer::V1beta::ResolveAmendmentTargetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload resolve_amendment_target(parent: nil, target_billing_account: nil, base_standard_offer: nil) - # Pass arguments to `resolve_amendment_target` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent value for ResolveAmendmentTargetRequest - # @param target_billing_account [::String] - # Required. The customer's billing account targeted by the offer. This is the - # billing account for which the new private offer will be created on. Format: - # billingAccounts/\\{billing_account}. - # @param base_standard_offer [::String] - # Required. The base standard offer that the private offer will be based on. - # Format: - # projects/\\{project}/locations/\\{location}/services/\\{service}/standardOffers/\\{standard_offer}. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::CommerceProducer::V1beta::ResolveAmendmentTargetResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::CommerceProducer::V1beta::ResolveAmendmentTargetResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/commerce_producer/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CommerceProducer::V1beta::ResolveAmendmentTargetRequest.new - # - # # Call the resolve_amendment_target method. - # result = client.resolve_amendment_target request - # - # # The returned object is of type Google::Cloud::CommerceProducer::V1beta::ResolveAmendmentTargetResponse. - # p result - # - def resolve_amendment_target request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::ResolveAmendmentTargetRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.resolve_amendment_target.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.resolve_amendment_target.timeout, - metadata: metadata, - retry_policy: @config.rpcs.resolve_amendment_target.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @commerce_transaction_stub.call_rpc :resolve_amendment_target, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new PrivateOffer in a given project and location. - # - # @overload create_private_offer(request, options = nil) - # Pass arguments to `create_private_offer` via a request object, either of type - # {::Google::Cloud::CommerceProducer::V1beta::CreatePrivateOfferRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CommerceProducer::V1beta::CreatePrivateOfferRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_private_offer(parent: nil, private_offer: nil) - # Pass arguments to `create_private_offer` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Value for parent. - # @param private_offer [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer, ::Hash] - # Required. The resource being created - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/commerce_producer/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CommerceProducer::V1beta::CreatePrivateOfferRequest.new - # - # # Call the create_private_offer method. - # result = client.create_private_offer request - # - # # The returned object is of type Google::Cloud::CommerceProducer::V1beta::PrivateOffer. - # p result - # - def create_private_offer request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::CreatePrivateOfferRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_private_offer.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_private_offer.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_private_offer.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @commerce_transaction_stub.call_rpc :create_private_offer, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the target PrivateOffer. - # - # @overload update_private_offer(request, options = nil) - # Pass arguments to `update_private_offer` via a request object, either of type - # {::Google::Cloud::CommerceProducer::V1beta::UpdatePrivateOfferRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CommerceProducer::V1beta::UpdatePrivateOfferRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_private_offer(update_mask: nil, private_offer: nil) - # Pass arguments to `update_private_offer` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. The list of fields to update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. - # The special value "*" means full replacement. - # If unspecified, all fields present in the request will be overwritten. - # @param private_offer [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer, ::Hash] - # Required. The resource being updated - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/commerce_producer/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CommerceProducer::V1beta::UpdatePrivateOfferRequest.new - # - # # Call the update_private_offer method. - # result = client.update_private_offer request - # - # # The returned object is of type Google::Cloud::CommerceProducer::V1beta::PrivateOffer. - # p result - # - def update_private_offer request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::UpdatePrivateOfferRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_private_offer.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.private_offer&.name - header_params["private_offer.name"] = request.private_offer.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_private_offer.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_private_offer.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @commerce_transaction_stub.call_rpc :update_private_offer, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Publishes the target PrivateOffer. - # - # @overload publish_private_offer(request, options = nil) - # Pass arguments to `publish_private_offer` via a request object, either of type - # {::Google::Cloud::CommerceProducer::V1beta::PublishPrivateOfferRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CommerceProducer::V1beta::PublishPrivateOfferRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload publish_private_offer(name: nil, validate_only: nil) - # Pass arguments to `publish_private_offer` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource - # @param validate_only [::Boolean] - # Optional. If set to `true`, validates the request but does not execute it. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/commerce_producer/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CommerceProducer::V1beta::PublishPrivateOfferRequest.new - # - # # Call the publish_private_offer method. - # result = client.publish_private_offer request - # - # # The returned object is of type Google::Cloud::CommerceProducer::V1beta::PrivateOffer. - # p result - # - def publish_private_offer request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::PublishPrivateOfferRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.publish_private_offer.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.publish_private_offer.timeout, - metadata: metadata, - retry_policy: @config.rpcs.publish_private_offer.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @commerce_transaction_stub.call_rpc :publish_private_offer, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Cancels the target PrivateOffer. - # - # @overload cancel_private_offer(request, options = nil) - # Pass arguments to `cancel_private_offer` via a request object, either of type - # {::Google::Cloud::CommerceProducer::V1beta::CancelPrivateOfferRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CommerceProducer::V1beta::CancelPrivateOfferRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload cancel_private_offer(name: nil, cancellation_note: nil) - # Pass arguments to `cancel_private_offer` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource - # @param cancellation_note [::String] - # Optional. Internal note relating to the cancellation. - # Stored on the cancelled offer. Not visible to customers. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/commerce_producer/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CommerceProducer::V1beta::CancelPrivateOfferRequest.new - # - # # Call the cancel_private_offer method. - # result = client.cancel_private_offer request - # - # # The returned object is of type Google::Cloud::CommerceProducer::V1beta::PrivateOffer. - # p result - # - def cancel_private_offer request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::CancelPrivateOfferRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.cancel_private_offer.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.cancel_private_offer.timeout, - metadata: metadata, - retry_policy: @config.rpcs.cancel_private_offer.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @commerce_transaction_stub.call_rpc :cancel_private_offer, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes the target PrivateOffer. - # - # @overload delete_private_offer(request, options = nil) - # Pass arguments to `delete_private_offer` via a request object, either of type - # {::Google::Cloud::CommerceProducer::V1beta::DeletePrivateOfferRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CommerceProducer::V1beta::DeletePrivateOfferRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_private_offer(name: nil, force: nil) - # Pass arguments to `delete_private_offer` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource - # @param force [::Boolean] - # Optional. Indicates whether to cascade the delete to child resources. - # If false, the request fails if child resources exist. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/commerce_producer/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CommerceProducer::V1beta::DeletePrivateOfferRequest.new - # - # # Call the delete_private_offer method. - # result = client.delete_private_offer request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_private_offer request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::DeletePrivateOfferRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_private_offer.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_private_offer.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_private_offer.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @commerce_transaction_stub.call_rpc :delete_private_offer, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists PrivateOfferDocuments for the given parent. - # - # @overload list_private_offer_documents(request, options = nil) - # Pass arguments to `list_private_offer_documents` via a request object, either of type - # {::Google::Cloud::CommerceProducer::V1beta::ListPrivateOfferDocumentsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CommerceProducer::V1beta::ListPrivateOfferDocumentsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_private_offer_documents(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_private_offer_documents` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent value for ListPrivateOfferDocumentsRequest. - # @param page_size [::Integer] - # Optional. Maximum results to return. The service may return fewer than this - # value. The maximum value is 500; values above 500 will be coerced to 500. - # If unspecified, the server will default to the maximum. - # @param page_token [::String] - # Optional. A page token, received from a previous list response message. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters of the list request must match the - # request that returned the page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/commerce_producer/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CommerceProducer::V1beta::ListPrivateOfferDocumentsRequest.new - # - # # Call the list_private_offer_documents method. - # result = client.list_private_offer_documents request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument. - # p item - # end - # - def list_private_offer_documents request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::ListPrivateOfferDocumentsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_private_offer_documents.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_private_offer_documents.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_private_offer_documents.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @commerce_transaction_stub.call_rpc :list_private_offer_documents, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @commerce_transaction_stub, :list_private_offer_documents, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single PrivateOfferDocument. - # - # @overload get_private_offer_document(request, options = nil) - # Pass arguments to `get_private_offer_document` via a request object, either of type - # {::Google::Cloud::CommerceProducer::V1beta::GetPrivateOfferDocumentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CommerceProducer::V1beta::GetPrivateOfferDocumentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_private_offer_document(name: nil) - # Pass arguments to `get_private_offer_document` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/commerce_producer/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CommerceProducer::V1beta::GetPrivateOfferDocumentRequest.new - # - # # Call the get_private_offer_document method. - # result = client.get_private_offer_document request - # - # # The returned object is of type Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument. - # p result - # - def get_private_offer_document request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::GetPrivateOfferDocumentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_private_offer_document.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_private_offer_document.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_private_offer_document.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @commerce_transaction_stub.call_rpc :get_private_offer_document, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new PrivateOfferDocument in a given project and location. - # - # @overload create_private_offer_document(request, options = nil) - # Pass arguments to `create_private_offer_document` via a request object, either of type - # {::Google::Cloud::CommerceProducer::V1beta::CreatePrivateOfferDocumentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CommerceProducer::V1beta::CreatePrivateOfferDocumentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_private_offer_document(parent: nil, private_offer_document: nil) - # Pass arguments to `create_private_offer_document` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Value for parent. - # @param private_offer_document [::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument, ::Hash] - # Required. The resource being created. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/commerce_producer/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CommerceProducer::V1beta::CreatePrivateOfferDocumentRequest.new - # - # # Call the create_private_offer_document method. - # result = client.create_private_offer_document request - # - # # The returned object is of type Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument. - # p result - # - def create_private_offer_document request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::CreatePrivateOfferDocumentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_private_offer_document.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_private_offer_document.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_private_offer_document.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @commerce_transaction_stub.call_rpc :create_private_offer_document, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the target PrivateOfferDocument. - # - # @overload update_private_offer_document(request, options = nil) - # Pass arguments to `update_private_offer_document` via a request object, either of type - # {::Google::Cloud::CommerceProducer::V1beta::UpdatePrivateOfferDocumentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CommerceProducer::V1beta::UpdatePrivateOfferDocumentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_private_offer_document(private_offer_document: nil, update_mask: nil) - # Pass arguments to `update_private_offer_document` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param private_offer_document [::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument, ::Hash] - # Required. The resource being updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. The list of fields to update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. - # The special value "*" means full replacement. - # If unspecified, all fields present in the request will be overwritten. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/commerce_producer/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CommerceProducer::V1beta::UpdatePrivateOfferDocumentRequest.new - # - # # Call the update_private_offer_document method. - # result = client.update_private_offer_document request - # - # # The returned object is of type Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument. - # p result - # - def update_private_offer_document request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::UpdatePrivateOfferDocumentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_private_offer_document.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.private_offer_document&.name - header_params["private_offer_document.name"] = request.private_offer_document.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_private_offer_document.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_private_offer_document.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @commerce_transaction_stub.call_rpc :update_private_offer_document, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes the target PrivateOfferDocument. - # - # @overload delete_private_offer_document(request, options = nil) - # Pass arguments to `delete_private_offer_document` via a request object, either of type - # {::Google::Cloud::CommerceProducer::V1beta::DeletePrivateOfferDocumentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CommerceProducer::V1beta::DeletePrivateOfferDocumentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_private_offer_document(name: nil) - # Pass arguments to `delete_private_offer_document` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/commerce_producer/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CommerceProducer::V1beta::DeletePrivateOfferDocumentRequest.new - # - # # Call the delete_private_offer_document method. - # result = client.delete_private_offer_document request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_private_offer_document request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::DeletePrivateOfferDocumentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_private_offer_document.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_private_offer_document.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_private_offer_document.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @commerce_transaction_stub.call_rpc :delete_private_offer_document, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists StandardOffers for the given parent. - # - # @overload list_standard_offers(request, options = nil) - # Pass arguments to `list_standard_offers` via a request object, either of type - # {::Google::Cloud::CommerceProducer::V1beta::ListStandardOffersRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CommerceProducer::V1beta::ListStandardOffersRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_standard_offers(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_standard_offers` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent value for ListStandardOffersRequest - # @param page_size [::Integer] - # Optional. Maximum results to return. The service may return fewer than this - # value. The maximum value is 500; values above 500 will be coerced to 500. - # If unspecified, the server will default to the maximum. - # @param page_token [::String] - # Optional. A page token, received from a previous list response message. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters of the list request must match the - # request that returned the page token. - # @param filter [::String] - # Optional. Filter expression that matches a subset of resources to show. - # See https://google.aip.dev/160 for more details. - # Supports filtering by: - # - # * `effective_time`. - # Example: `effective_time > "2012-04-21T11:30:00-04:00"`. - # * `expire_time`. Example: `expire_time < "2026-05-06T00:00:00Z"`. - # @param order_by [::String] - # Optional. Ordering expression for sorting the results. - # See https://google.aip.dev/132#ordering for more details. - # If no value is present the default ordering is unspecified. - # Supports ordering by: - # - # * `effective_time` - # * `expire_time` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::CommerceProducer::V1beta::StandardOffer>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::CommerceProducer::V1beta::StandardOffer>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/commerce_producer/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CommerceProducer::V1beta::ListStandardOffersRequest.new - # - # # Call the list_standard_offers method. - # result = client.list_standard_offers request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::CommerceProducer::V1beta::StandardOffer. - # p item - # end - # - def list_standard_offers request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::ListStandardOffersRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_standard_offers.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_standard_offers.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_standard_offers.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @commerce_transaction_stub.call_rpc :list_standard_offers, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @commerce_transaction_stub, :list_standard_offers, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single StandardOffer. - # - # @overload get_standard_offer(request, options = nil) - # Pass arguments to `get_standard_offer` via a request object, either of type - # {::Google::Cloud::CommerceProducer::V1beta::GetStandardOfferRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CommerceProducer::V1beta::GetStandardOfferRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_standard_offer(name: nil, view: nil) - # Pass arguments to `get_standard_offer` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource - # @param view [::Google::Cloud::CommerceProducer::V1beta::StandardOfferView] - # Optional. The view of the StandardOffer to return. - # If unspecified, the default view is BASIC. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::CommerceProducer::V1beta::StandardOffer] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::CommerceProducer::V1beta::StandardOffer] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/commerce_producer/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CommerceProducer::V1beta::GetStandardOfferRequest.new - # - # # Call the get_standard_offer method. - # result = client.get_standard_offer request - # - # # The returned object is of type Google::Cloud::CommerceProducer::V1beta::StandardOffer. - # p result - # - def get_standard_offer request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::GetStandardOfferRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_standard_offer.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_standard_offer.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_standard_offer.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @commerce_transaction_stub.call_rpc :get_standard_offer, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single Sku. - # - # @overload get_sku(request, options = nil) - # Pass arguments to `get_sku` via a request object, either of type - # {::Google::Cloud::CommerceProducer::V1beta::GetSkuRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CommerceProducer::V1beta::GetSkuRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_sku(name: nil) - # Pass arguments to `get_sku` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::CommerceProducer::V1beta::Sku] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::CommerceProducer::V1beta::Sku] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/commerce_producer/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CommerceProducer::V1beta::GetSkuRequest.new - # - # # Call the get_sku method. - # result = client.get_sku request - # - # # The returned object is of type Google::Cloud::CommerceProducer::V1beta::Sku. - # p result - # - def get_sku request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::GetSkuRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_sku.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_sku.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_sku.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @commerce_transaction_stub.call_rpc :get_sku, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists Skus for the given parent. - # - # @overload list_skus(request, options = nil) - # Pass arguments to `list_skus` via a request object, either of type - # {::Google::Cloud::CommerceProducer::V1beta::ListSkusRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CommerceProducer::V1beta::ListSkusRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_skus(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_skus` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent value for ListSkusRequest - # @param page_size [::Integer] - # Optional. Maximum results to return. The service may return fewer than this - # value. The maximum value is 500; values above 500 will be coerced to 500. - # If unspecified, the server will default to the maximum. - # @param page_token [::String] - # Optional. A page token, received from a previous list response message. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters of the list request must match the - # request that returned the page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::CommerceProducer::V1beta::Sku>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::CommerceProducer::V1beta::Sku>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/commerce_producer/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CommerceProducer::V1beta::ListSkusRequest.new - # - # # Call the list_skus method. - # result = client.list_skus request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::CommerceProducer::V1beta::Sku. - # p item - # end - # - def list_skus request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::ListSkusRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_skus.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_skus.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_skus.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @commerce_transaction_stub.call_rpc :list_skus, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @commerce_transaction_stub, :list_skus, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single SkuGroup. - # - # @overload get_sku_group(request, options = nil) - # Pass arguments to `get_sku_group` via a request object, either of type - # {::Google::Cloud::CommerceProducer::V1beta::GetSkuGroupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CommerceProducer::V1beta::GetSkuGroupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_sku_group(name: nil) - # Pass arguments to `get_sku_group` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::CommerceProducer::V1beta::SkuGroup] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::CommerceProducer::V1beta::SkuGroup] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/commerce_producer/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CommerceProducer::V1beta::GetSkuGroupRequest.new - # - # # Call the get_sku_group method. - # result = client.get_sku_group request - # - # # The returned object is of type Google::Cloud::CommerceProducer::V1beta::SkuGroup. - # p result - # - def get_sku_group request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::GetSkuGroupRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_sku_group.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_sku_group.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_sku_group.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @commerce_transaction_stub.call_rpc :get_sku_group, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists SkuGroups for the given parent. - # - # @overload list_sku_groups(request, options = nil) - # Pass arguments to `list_sku_groups` via a request object, either of type - # {::Google::Cloud::CommerceProducer::V1beta::ListSkuGroupsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CommerceProducer::V1beta::ListSkuGroupsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_sku_groups(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_sku_groups` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent value for ListSkuGroupsRequest - # @param page_size [::Integer] - # Optional. Maximum results to return. The service may return fewer than this - # value. The maximum value is 500; values above 500 will be coerced to 500. - # If unspecified, the server will default to the maximum. - # @param page_token [::String] - # Optional. A page token, received from a previous list response message. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters of the list request must match the - # request that returned the page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::CommerceProducer::V1beta::SkuGroup>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::CommerceProducer::V1beta::SkuGroup>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/commerce_producer/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CommerceProducer::V1beta::ListSkuGroupsRequest.new - # - # # Call the list_sku_groups method. - # result = client.list_sku_groups request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::CommerceProducer::V1beta::SkuGroup. - # p item - # end - # - def list_sku_groups request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::ListSkuGroupsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_sku_groups.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_sku_groups.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_sku_groups.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @commerce_transaction_stub.call_rpc :list_sku_groups, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @commerce_transaction_stub, :list_sku_groups, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the CommerceTransaction API. - # - # This class represents the configuration for CommerceTransaction, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_services to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_services.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_services.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "commerceproducer.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the CommerceTransaction API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_services` - # @return [::Gapic::Config::Method] - # - attr_reader :list_services - ## - # RPC-specific configuration for `get_service` - # @return [::Gapic::Config::Method] - # - attr_reader :get_service - ## - # RPC-specific configuration for `list_private_offers` - # @return [::Gapic::Config::Method] - # - attr_reader :list_private_offers - ## - # RPC-specific configuration for `get_private_offer` - # @return [::Gapic::Config::Method] - # - attr_reader :get_private_offer - ## - # RPC-specific configuration for `resolve_amendment_target` - # @return [::Gapic::Config::Method] - # - attr_reader :resolve_amendment_target - ## - # RPC-specific configuration for `create_private_offer` - # @return [::Gapic::Config::Method] - # - attr_reader :create_private_offer - ## - # RPC-specific configuration for `update_private_offer` - # @return [::Gapic::Config::Method] - # - attr_reader :update_private_offer - ## - # RPC-specific configuration for `publish_private_offer` - # @return [::Gapic::Config::Method] - # - attr_reader :publish_private_offer - ## - # RPC-specific configuration for `cancel_private_offer` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_private_offer - ## - # RPC-specific configuration for `delete_private_offer` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_private_offer - ## - # RPC-specific configuration for `list_private_offer_documents` - # @return [::Gapic::Config::Method] - # - attr_reader :list_private_offer_documents - ## - # RPC-specific configuration for `get_private_offer_document` - # @return [::Gapic::Config::Method] - # - attr_reader :get_private_offer_document - ## - # RPC-specific configuration for `create_private_offer_document` - # @return [::Gapic::Config::Method] - # - attr_reader :create_private_offer_document - ## - # RPC-specific configuration for `update_private_offer_document` - # @return [::Gapic::Config::Method] - # - attr_reader :update_private_offer_document - ## - # RPC-specific configuration for `delete_private_offer_document` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_private_offer_document - ## - # RPC-specific configuration for `list_standard_offers` - # @return [::Gapic::Config::Method] - # - attr_reader :list_standard_offers - ## - # RPC-specific configuration for `get_standard_offer` - # @return [::Gapic::Config::Method] - # - attr_reader :get_standard_offer - ## - # RPC-specific configuration for `get_sku` - # @return [::Gapic::Config::Method] - # - attr_reader :get_sku - ## - # RPC-specific configuration for `list_skus` - # @return [::Gapic::Config::Method] - # - attr_reader :list_skus - ## - # RPC-specific configuration for `get_sku_group` - # @return [::Gapic::Config::Method] - # - attr_reader :get_sku_group - ## - # RPC-specific configuration for `list_sku_groups` - # @return [::Gapic::Config::Method] - # - attr_reader :list_sku_groups - - # @private - def initialize parent_rpcs = nil - list_services_config = parent_rpcs.list_services if parent_rpcs.respond_to? :list_services - @list_services = ::Gapic::Config::Method.new list_services_config - get_service_config = parent_rpcs.get_service if parent_rpcs.respond_to? :get_service - @get_service = ::Gapic::Config::Method.new get_service_config - list_private_offers_config = parent_rpcs.list_private_offers if parent_rpcs.respond_to? :list_private_offers - @list_private_offers = ::Gapic::Config::Method.new list_private_offers_config - get_private_offer_config = parent_rpcs.get_private_offer if parent_rpcs.respond_to? :get_private_offer - @get_private_offer = ::Gapic::Config::Method.new get_private_offer_config - resolve_amendment_target_config = parent_rpcs.resolve_amendment_target if parent_rpcs.respond_to? :resolve_amendment_target - @resolve_amendment_target = ::Gapic::Config::Method.new resolve_amendment_target_config - create_private_offer_config = parent_rpcs.create_private_offer if parent_rpcs.respond_to? :create_private_offer - @create_private_offer = ::Gapic::Config::Method.new create_private_offer_config - update_private_offer_config = parent_rpcs.update_private_offer if parent_rpcs.respond_to? :update_private_offer - @update_private_offer = ::Gapic::Config::Method.new update_private_offer_config - publish_private_offer_config = parent_rpcs.publish_private_offer if parent_rpcs.respond_to? :publish_private_offer - @publish_private_offer = ::Gapic::Config::Method.new publish_private_offer_config - cancel_private_offer_config = parent_rpcs.cancel_private_offer if parent_rpcs.respond_to? :cancel_private_offer - @cancel_private_offer = ::Gapic::Config::Method.new cancel_private_offer_config - delete_private_offer_config = parent_rpcs.delete_private_offer if parent_rpcs.respond_to? :delete_private_offer - @delete_private_offer = ::Gapic::Config::Method.new delete_private_offer_config - list_private_offer_documents_config = parent_rpcs.list_private_offer_documents if parent_rpcs.respond_to? :list_private_offer_documents - @list_private_offer_documents = ::Gapic::Config::Method.new list_private_offer_documents_config - get_private_offer_document_config = parent_rpcs.get_private_offer_document if parent_rpcs.respond_to? :get_private_offer_document - @get_private_offer_document = ::Gapic::Config::Method.new get_private_offer_document_config - create_private_offer_document_config = parent_rpcs.create_private_offer_document if parent_rpcs.respond_to? :create_private_offer_document - @create_private_offer_document = ::Gapic::Config::Method.new create_private_offer_document_config - update_private_offer_document_config = parent_rpcs.update_private_offer_document if parent_rpcs.respond_to? :update_private_offer_document - @update_private_offer_document = ::Gapic::Config::Method.new update_private_offer_document_config - delete_private_offer_document_config = parent_rpcs.delete_private_offer_document if parent_rpcs.respond_to? :delete_private_offer_document - @delete_private_offer_document = ::Gapic::Config::Method.new delete_private_offer_document_config - list_standard_offers_config = parent_rpcs.list_standard_offers if parent_rpcs.respond_to? :list_standard_offers - @list_standard_offers = ::Gapic::Config::Method.new list_standard_offers_config - get_standard_offer_config = parent_rpcs.get_standard_offer if parent_rpcs.respond_to? :get_standard_offer - @get_standard_offer = ::Gapic::Config::Method.new get_standard_offer_config - get_sku_config = parent_rpcs.get_sku if parent_rpcs.respond_to? :get_sku - @get_sku = ::Gapic::Config::Method.new get_sku_config - list_skus_config = parent_rpcs.list_skus if parent_rpcs.respond_to? :list_skus - @list_skus = ::Gapic::Config::Method.new list_skus_config - get_sku_group_config = parent_rpcs.get_sku_group if parent_rpcs.respond_to? :get_sku_group - @get_sku_group = ::Gapic::Config::Method.new get_sku_group_config - list_sku_groups_config = parent_rpcs.list_sku_groups if parent_rpcs.respond_to? :list_sku_groups - @list_sku_groups = ::Gapic::Config::Method.new list_sku_groups_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerce_producer/v1beta/commerce_transaction/credentials.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerce_producer/v1beta/commerce_transaction/credentials.rb deleted file mode 100644 index 81dca397b79c..000000000000 --- a/owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerce_producer/v1beta/commerce_transaction/credentials.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "googleauth" - -module Google - module Cloud - module CommerceProducer - module V1beta - module CommerceTransaction - # Credentials for the CommerceTransaction API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS_JSON", - "GOOGLE_CLOUD_KEYFILE_JSON", - "GCLOUD_KEYFILE_JSON" - ] - self.paths = [ - "~/.config/google_cloud/application_default_credentials.json" - ] - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerce_producer/v1beta/commerce_transaction/paths.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerce_producer/v1beta/commerce_transaction/paths.rb deleted file mode 100644 index bc55a2ece373..000000000000 --- a/owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerce_producer/v1beta/commerce_transaction/paths.rb +++ /dev/null @@ -1,184 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module CommerceProducer - module V1beta - module CommerceTransaction - # Path helper methods for the CommerceTransaction API. - module Paths - ## - # Create a fully-qualified BillingAccount resource string. - # - # The resource will be in the following format: - # - # `billingAccounts/{billing_account}` - # - # @param billing_account [String] - # - # @return [::String] - def billing_account_path billing_account: - "billingAccounts/#{billing_account}" - end - - ## - # Create a fully-qualified Location resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}` - # - # @param project [String] - # @param location [String] - # - # @return [::String] - def location_path project:, location: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/locations/#{location}" - end - - ## - # Create a fully-qualified PrivateOffer resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/privateOffers/{private_offer}` - # - # @param project [String] - # @param location [String] - # @param private_offer [String] - # - # @return [::String] - def private_offer_path project:, location:, private_offer: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/privateOffers/#{private_offer}" - end - - ## - # Create a fully-qualified PrivateOfferDocument resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/privateOffers/{private_offer}/documents/{document}` - # - # @param project [String] - # @param location [String] - # @param private_offer [String] - # @param document [String] - # - # @return [::String] - def private_offer_document_path project:, location:, private_offer:, document: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "private_offer cannot contain /" if private_offer.to_s.include? "/" - - "projects/#{project}/locations/#{location}/privateOffers/#{private_offer}/documents/#{document}" - end - - ## - # Create a fully-qualified Service resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/services/{service}` - # - # @param project [String] - # @param location [String] - # @param service [String] - # - # @return [::String] - def service_path project:, location:, service: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/services/#{service}" - end - - ## - # Create a fully-qualified Sku resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/services/{service}/skus/{sku}` - # - # @param project [String] - # @param location [String] - # @param service [String] - # @param sku [String] - # - # @return [::String] - def sku_path project:, location:, service:, sku: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "service cannot contain /" if service.to_s.include? "/" - - "projects/#{project}/locations/#{location}/services/#{service}/skus/#{sku}" - end - - ## - # Create a fully-qualified SkuGroup resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/skuGroups/{sku_group}` - # - # @param project [String] - # @param location [String] - # @param sku_group [String] - # - # @return [::String] - def sku_group_path project:, location:, sku_group: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/skuGroups/#{sku_group}" - end - - ## - # Create a fully-qualified StandardOffer resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/services/{service}/standardOffers/{standard_offer}` - # - # @param project [String] - # @param location [String] - # @param service [String] - # @param standard_offer [String] - # - # @return [::String] - def standard_offer_path project:, location:, service:, standard_offer: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "service cannot contain /" if service.to_s.include? "/" - - "projects/#{project}/locations/#{location}/services/#{service}/standardOffers/#{standard_offer}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerce_producer/v1beta/commerce_transaction/rest.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerce_producer/v1beta/commerce_transaction/rest.rb deleted file mode 100644 index d4ec99500c2e..000000000000 --- a/owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerce_producer/v1beta/commerce_transaction/rest.rb +++ /dev/null @@ -1,53 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/commerce_producer/v1beta/version" -require "google/cloud/commerce_producer/v1beta/bindings_override" - -require "google/cloud/commerce_producer/v1beta/commerce_transaction/credentials" -require "google/cloud/commerce_producer/v1beta/commerce_transaction/paths" -require "google/cloud/commerce_producer/v1beta/commerce_transaction/rest/client" - -module Google - module Cloud - module CommerceProducer - module V1beta - ## - # APIs related to managing resources that model commercial transactions. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/commerce_producer/v1beta/commerce_transaction/rest" - # client = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new - # - module CommerceTransaction - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/commerce_producer/v1beta/commerce_transaction/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerce_producer/v1beta/commerce_transaction/rest/client.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerce_producer/v1beta/commerce_transaction/rest/client.rb deleted file mode 100644 index 00c8dfa939e3..000000000000 --- a/owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerce_producer/v1beta/commerce_transaction/rest/client.rb +++ /dev/null @@ -1,2392 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/commerceproducer/v1beta/commerce_transaction_pb" -require "google/cloud/commerce_producer/v1beta/commerce_transaction/rest/service_stub" -require "google/cloud/location/rest" - -module Google - module Cloud - module CommerceProducer - module V1beta - module CommerceTransaction - module Rest - ## - # REST client for the CommerceTransaction service. - # - # APIs related to managing resources that model commercial transactions. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "commerceproducer.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :commerce_transaction_stub - - ## - # Configure the CommerceTransaction Client class. - # - # See {::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all CommerceTransaction clients - # ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "CommerceProducer", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.list_services.timeout = 60.0 - default_config.rpcs.list_services.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_service.timeout = 60.0 - default_config.rpcs.get_service.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_private_offers.timeout = 60.0 - default_config.rpcs.list_private_offers.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_private_offer.timeout = 60.0 - default_config.rpcs.get_private_offer.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.resolve_amendment_target.timeout = 60.0 - - default_config.rpcs.create_private_offer.timeout = 60.0 - - default_config.rpcs.update_private_offer.timeout = 60.0 - - default_config.rpcs.publish_private_offer.timeout = 60.0 - - default_config.rpcs.cancel_private_offer.timeout = 60.0 - - default_config.rpcs.delete_private_offer.timeout = 60.0 - - default_config.rpcs.list_private_offer_documents.timeout = 60.0 - default_config.rpcs.list_private_offer_documents.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_private_offer_document.timeout = 60.0 - default_config.rpcs.get_private_offer_document.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_private_offer_document.timeout = 60.0 - - default_config.rpcs.update_private_offer_document.timeout = 60.0 - - default_config.rpcs.delete_private_offer_document.timeout = 60.0 - - default_config.rpcs.list_standard_offers.timeout = 60.0 - default_config.rpcs.list_standard_offers.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_standard_offer.timeout = 60.0 - default_config.rpcs.get_standard_offer.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_sku.timeout = 60.0 - default_config.rpcs.get_sku.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_skus.timeout = 60.0 - default_config.rpcs.list_skus.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_sku_group.timeout = 60.0 - default_config.rpcs.get_sku_group.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_sku_groups.timeout = 60.0 - default_config.rpcs.list_sku_groups.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the CommerceTransaction Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @commerce_transaction_stub.universe_domain - end - - ## - # Create a new CommerceTransaction REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the CommerceTransaction client. - # @yieldparam config [Client::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Client.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - # Use self-signed JWT if the endpoint is unchanged from default, - # but only if the default endpoint does not have a region prefix. - enable_self_signed_jwt = @config.endpoint.nil? || - (@config.endpoint == Configuration::DEFAULT_ENDPOINT && - !@config.endpoint.split(".").first.include?("-")) - credentials ||= Credentials.default scope: @config.scope, - enable_self_signed_jwt: enable_self_signed_jwt - if credentials.is_a?(::String) || credentials.is_a?(::Hash) - credentials = Credentials.new credentials, scope: @config.scope - end - - @quota_project_id = @config.quota_project - @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id - - @commerce_transaction_stub = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @commerce_transaction_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - - @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @commerce_transaction_stub.endpoint - config.universe_domain = @commerce_transaction_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @commerce_transaction_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for mix-in of the Locations. - # - # @return [Google::Cloud::Location::Locations::Rest::Client] - # - attr_reader :location_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @commerce_transaction_stub.logger - end - - # Service calls - - ## - # Lists Services in a given project and location. - # - # @overload list_services(request, options = nil) - # Pass arguments to `list_services` via a request object, either of type - # {::Google::Cloud::CommerceProducer::V1beta::ListServicesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CommerceProducer::V1beta::ListServicesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_services(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_services` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent value for ListServicesRequest - # @param page_size [::Integer] - # Optional. Maximum results to return. The service may return fewer than this - # value. The maximum value is 500; values above 500 will be coerced to 500. - # If unspecified, the server will default to the maximum. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CommerceProducer::V1beta::Service>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CommerceProducer::V1beta::Service>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/commerce_producer/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CommerceProducer::V1beta::ListServicesRequest.new - # - # # Call the list_services method. - # result = client.list_services request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::CommerceProducer::V1beta::Service. - # p item - # end - # - def list_services request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::ListServicesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_services.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_services.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_services.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @commerce_transaction_stub.list_services request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @commerce_transaction_stub, :list_services, "services", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single Service. - # - # @overload get_service(request, options = nil) - # Pass arguments to `get_service` via a request object, either of type - # {::Google::Cloud::CommerceProducer::V1beta::GetServiceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CommerceProducer::V1beta::GetServiceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_service(name: nil, view: nil) - # Pass arguments to `get_service` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource - # @param view [::Google::Cloud::CommerceProducer::V1beta::ServiceView] - # Optional. The view of the Service to return. - # If unspecified, the default view is BASIC. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::CommerceProducer::V1beta::Service] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CommerceProducer::V1beta::Service] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/commerce_producer/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CommerceProducer::V1beta::GetServiceRequest.new - # - # # Call the get_service method. - # result = client.get_service request - # - # # The returned object is of type Google::Cloud::CommerceProducer::V1beta::Service. - # p result - # - def get_service request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::GetServiceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_service.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_service.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_service.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @commerce_transaction_stub.get_service request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists PrivateOffers for the given parent. - # - # @overload list_private_offers(request, options = nil) - # Pass arguments to `list_private_offers` via a request object, either of type - # {::Google::Cloud::CommerceProducer::V1beta::ListPrivateOffersRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CommerceProducer::V1beta::ListPrivateOffersRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_private_offers(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_private_offers` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent value for ListPrivateOffersRequest - # @param page_size [::Integer] - # Optional. Maximum results to return. The service may return fewer than this - # value. The maximum value is 500; values above 500 will be coerced to 500. - # If unspecified, the server will default to the maximum. - # @param page_token [::String] - # Optional. A page token, received from a previous list response message. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters of the list request must match the - # request that returned the page token. - # @param filter [::String] - # Optional. Filter expression that matches a subset of resources to show. - # See https://google.aip.dev/160 for more details. - # Only supports filtering by: - # - # * `update_time`. Example: `update_time > "2012-04-21T11:30:00-04:00"`. - # @param order_by [::String] - # Optional. Ordering expression for sorting the results. - # See https://google.aip.dev/132#ordering for more details. - # If no value is present the default ordering is unspecified. - # Only supports ordering by: - # - # * `update_time` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CommerceProducer::V1beta::PrivateOffer>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CommerceProducer::V1beta::PrivateOffer>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/commerce_producer/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CommerceProducer::V1beta::ListPrivateOffersRequest.new - # - # # Call the list_private_offers method. - # result = client.list_private_offers request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::CommerceProducer::V1beta::PrivateOffer. - # p item - # end - # - def list_private_offers request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::ListPrivateOffersRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_private_offers.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_private_offers.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_private_offers.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @commerce_transaction_stub.list_private_offers request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @commerce_transaction_stub, :list_private_offers, "private_offers", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single PrivateOffer. - # - # @overload get_private_offer(request, options = nil) - # Pass arguments to `get_private_offer` via a request object, either of type - # {::Google::Cloud::CommerceProducer::V1beta::GetPrivateOfferRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CommerceProducer::V1beta::GetPrivateOfferRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_private_offer(name: nil, view: nil) - # Pass arguments to `get_private_offer` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource - # @param view [::Google::Cloud::CommerceProducer::V1beta::PrivateOfferView] - # Optional. The view of the PrivateOffer to return. - # If unspecified, the default view is BASIC. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/commerce_producer/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CommerceProducer::V1beta::GetPrivateOfferRequest.new - # - # # Call the get_private_offer method. - # result = client.get_private_offer request - # - # # The returned object is of type Google::Cloud::CommerceProducer::V1beta::PrivateOffer. - # p result - # - def get_private_offer request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::GetPrivateOfferRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_private_offer.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_private_offer.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_private_offer.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @commerce_transaction_stub.get_private_offer request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Resolves the existing offer that must be amended when creating a new - # PrivateOffer. Use this method to determine the correct amendment target - # before creating or publishing an offer. - # - # @overload resolve_amendment_target(request, options = nil) - # Pass arguments to `resolve_amendment_target` via a request object, either of type - # {::Google::Cloud::CommerceProducer::V1beta::ResolveAmendmentTargetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CommerceProducer::V1beta::ResolveAmendmentTargetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload resolve_amendment_target(parent: nil, target_billing_account: nil, base_standard_offer: nil) - # Pass arguments to `resolve_amendment_target` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent value for ResolveAmendmentTargetRequest - # @param target_billing_account [::String] - # Required. The customer's billing account targeted by the offer. This is the - # billing account for which the new private offer will be created on. Format: - # billingAccounts/\\{billing_account}. - # @param base_standard_offer [::String] - # Required. The base standard offer that the private offer will be based on. - # Format: - # projects/\\{project}/locations/\\{location}/services/\\{service}/standardOffers/\\{standard_offer}. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::CommerceProducer::V1beta::ResolveAmendmentTargetResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CommerceProducer::V1beta::ResolveAmendmentTargetResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/commerce_producer/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CommerceProducer::V1beta::ResolveAmendmentTargetRequest.new - # - # # Call the resolve_amendment_target method. - # result = client.resolve_amendment_target request - # - # # The returned object is of type Google::Cloud::CommerceProducer::V1beta::ResolveAmendmentTargetResponse. - # p result - # - def resolve_amendment_target request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::ResolveAmendmentTargetRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.resolve_amendment_target.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.resolve_amendment_target.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.resolve_amendment_target.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @commerce_transaction_stub.resolve_amendment_target request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new PrivateOffer in a given project and location. - # - # @overload create_private_offer(request, options = nil) - # Pass arguments to `create_private_offer` via a request object, either of type - # {::Google::Cloud::CommerceProducer::V1beta::CreatePrivateOfferRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CommerceProducer::V1beta::CreatePrivateOfferRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_private_offer(parent: nil, private_offer: nil) - # Pass arguments to `create_private_offer` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Value for parent. - # @param private_offer [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer, ::Hash] - # Required. The resource being created - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/commerce_producer/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CommerceProducer::V1beta::CreatePrivateOfferRequest.new - # - # # Call the create_private_offer method. - # result = client.create_private_offer request - # - # # The returned object is of type Google::Cloud::CommerceProducer::V1beta::PrivateOffer. - # p result - # - def create_private_offer request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::CreatePrivateOfferRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_private_offer.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_private_offer.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_private_offer.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @commerce_transaction_stub.create_private_offer request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the target PrivateOffer. - # - # @overload update_private_offer(request, options = nil) - # Pass arguments to `update_private_offer` via a request object, either of type - # {::Google::Cloud::CommerceProducer::V1beta::UpdatePrivateOfferRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CommerceProducer::V1beta::UpdatePrivateOfferRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_private_offer(update_mask: nil, private_offer: nil) - # Pass arguments to `update_private_offer` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. The list of fields to update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. - # The special value "*" means full replacement. - # If unspecified, all fields present in the request will be overwritten. - # @param private_offer [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer, ::Hash] - # Required. The resource being updated - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/commerce_producer/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CommerceProducer::V1beta::UpdatePrivateOfferRequest.new - # - # # Call the update_private_offer method. - # result = client.update_private_offer request - # - # # The returned object is of type Google::Cloud::CommerceProducer::V1beta::PrivateOffer. - # p result - # - def update_private_offer request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::UpdatePrivateOfferRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_private_offer.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_private_offer.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_private_offer.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @commerce_transaction_stub.update_private_offer request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Publishes the target PrivateOffer. - # - # @overload publish_private_offer(request, options = nil) - # Pass arguments to `publish_private_offer` via a request object, either of type - # {::Google::Cloud::CommerceProducer::V1beta::PublishPrivateOfferRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CommerceProducer::V1beta::PublishPrivateOfferRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload publish_private_offer(name: nil, validate_only: nil) - # Pass arguments to `publish_private_offer` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource - # @param validate_only [::Boolean] - # Optional. If set to `true`, validates the request but does not execute it. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/commerce_producer/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CommerceProducer::V1beta::PublishPrivateOfferRequest.new - # - # # Call the publish_private_offer method. - # result = client.publish_private_offer request - # - # # The returned object is of type Google::Cloud::CommerceProducer::V1beta::PrivateOffer. - # p result - # - def publish_private_offer request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::PublishPrivateOfferRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.publish_private_offer.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.publish_private_offer.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.publish_private_offer.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @commerce_transaction_stub.publish_private_offer request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Cancels the target PrivateOffer. - # - # @overload cancel_private_offer(request, options = nil) - # Pass arguments to `cancel_private_offer` via a request object, either of type - # {::Google::Cloud::CommerceProducer::V1beta::CancelPrivateOfferRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CommerceProducer::V1beta::CancelPrivateOfferRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload cancel_private_offer(name: nil, cancellation_note: nil) - # Pass arguments to `cancel_private_offer` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource - # @param cancellation_note [::String] - # Optional. Internal note relating to the cancellation. - # Stored on the cancelled offer. Not visible to customers. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/commerce_producer/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CommerceProducer::V1beta::CancelPrivateOfferRequest.new - # - # # Call the cancel_private_offer method. - # result = client.cancel_private_offer request - # - # # The returned object is of type Google::Cloud::CommerceProducer::V1beta::PrivateOffer. - # p result - # - def cancel_private_offer request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::CancelPrivateOfferRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.cancel_private_offer.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.cancel_private_offer.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.cancel_private_offer.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @commerce_transaction_stub.cancel_private_offer request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes the target PrivateOffer. - # - # @overload delete_private_offer(request, options = nil) - # Pass arguments to `delete_private_offer` via a request object, either of type - # {::Google::Cloud::CommerceProducer::V1beta::DeletePrivateOfferRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CommerceProducer::V1beta::DeletePrivateOfferRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_private_offer(name: nil, force: nil) - # Pass arguments to `delete_private_offer` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource - # @param force [::Boolean] - # Optional. Indicates whether to cascade the delete to child resources. - # If false, the request fails if child resources exist. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/commerce_producer/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CommerceProducer::V1beta::DeletePrivateOfferRequest.new - # - # # Call the delete_private_offer method. - # result = client.delete_private_offer request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_private_offer request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::DeletePrivateOfferRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_private_offer.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_private_offer.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_private_offer.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @commerce_transaction_stub.delete_private_offer request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists PrivateOfferDocuments for the given parent. - # - # @overload list_private_offer_documents(request, options = nil) - # Pass arguments to `list_private_offer_documents` via a request object, either of type - # {::Google::Cloud::CommerceProducer::V1beta::ListPrivateOfferDocumentsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CommerceProducer::V1beta::ListPrivateOfferDocumentsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_private_offer_documents(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_private_offer_documents` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent value for ListPrivateOfferDocumentsRequest. - # @param page_size [::Integer] - # Optional. Maximum results to return. The service may return fewer than this - # value. The maximum value is 500; values above 500 will be coerced to 500. - # If unspecified, the server will default to the maximum. - # @param page_token [::String] - # Optional. A page token, received from a previous list response message. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters of the list request must match the - # request that returned the page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/commerce_producer/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CommerceProducer::V1beta::ListPrivateOfferDocumentsRequest.new - # - # # Call the list_private_offer_documents method. - # result = client.list_private_offer_documents request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument. - # p item - # end - # - def list_private_offer_documents request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::ListPrivateOfferDocumentsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_private_offer_documents.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_private_offer_documents.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_private_offer_documents.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @commerce_transaction_stub.list_private_offer_documents request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @commerce_transaction_stub, :list_private_offer_documents, "private_offer_documents", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single PrivateOfferDocument. - # - # @overload get_private_offer_document(request, options = nil) - # Pass arguments to `get_private_offer_document` via a request object, either of type - # {::Google::Cloud::CommerceProducer::V1beta::GetPrivateOfferDocumentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CommerceProducer::V1beta::GetPrivateOfferDocumentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_private_offer_document(name: nil) - # Pass arguments to `get_private_offer_document` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/commerce_producer/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CommerceProducer::V1beta::GetPrivateOfferDocumentRequest.new - # - # # Call the get_private_offer_document method. - # result = client.get_private_offer_document request - # - # # The returned object is of type Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument. - # p result - # - def get_private_offer_document request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::GetPrivateOfferDocumentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_private_offer_document.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_private_offer_document.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_private_offer_document.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @commerce_transaction_stub.get_private_offer_document request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new PrivateOfferDocument in a given project and location. - # - # @overload create_private_offer_document(request, options = nil) - # Pass arguments to `create_private_offer_document` via a request object, either of type - # {::Google::Cloud::CommerceProducer::V1beta::CreatePrivateOfferDocumentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CommerceProducer::V1beta::CreatePrivateOfferDocumentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_private_offer_document(parent: nil, private_offer_document: nil) - # Pass arguments to `create_private_offer_document` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Value for parent. - # @param private_offer_document [::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument, ::Hash] - # Required. The resource being created. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/commerce_producer/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CommerceProducer::V1beta::CreatePrivateOfferDocumentRequest.new - # - # # Call the create_private_offer_document method. - # result = client.create_private_offer_document request - # - # # The returned object is of type Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument. - # p result - # - def create_private_offer_document request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::CreatePrivateOfferDocumentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_private_offer_document.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_private_offer_document.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_private_offer_document.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @commerce_transaction_stub.create_private_offer_document request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates the target PrivateOfferDocument. - # - # @overload update_private_offer_document(request, options = nil) - # Pass arguments to `update_private_offer_document` via a request object, either of type - # {::Google::Cloud::CommerceProducer::V1beta::UpdatePrivateOfferDocumentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CommerceProducer::V1beta::UpdatePrivateOfferDocumentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_private_offer_document(private_offer_document: nil, update_mask: nil) - # Pass arguments to `update_private_offer_document` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param private_offer_document [::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument, ::Hash] - # Required. The resource being updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. The list of fields to update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. - # The special value "*" means full replacement. - # If unspecified, all fields present in the request will be overwritten. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/commerce_producer/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CommerceProducer::V1beta::UpdatePrivateOfferDocumentRequest.new - # - # # Call the update_private_offer_document method. - # result = client.update_private_offer_document request - # - # # The returned object is of type Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument. - # p result - # - def update_private_offer_document request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::UpdatePrivateOfferDocumentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_private_offer_document.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_private_offer_document.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_private_offer_document.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @commerce_transaction_stub.update_private_offer_document request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes the target PrivateOfferDocument. - # - # @overload delete_private_offer_document(request, options = nil) - # Pass arguments to `delete_private_offer_document` via a request object, either of type - # {::Google::Cloud::CommerceProducer::V1beta::DeletePrivateOfferDocumentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CommerceProducer::V1beta::DeletePrivateOfferDocumentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_private_offer_document(name: nil) - # Pass arguments to `delete_private_offer_document` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/commerce_producer/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CommerceProducer::V1beta::DeletePrivateOfferDocumentRequest.new - # - # # Call the delete_private_offer_document method. - # result = client.delete_private_offer_document request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_private_offer_document request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::DeletePrivateOfferDocumentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_private_offer_document.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_private_offer_document.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_private_offer_document.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @commerce_transaction_stub.delete_private_offer_document request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists StandardOffers for the given parent. - # - # @overload list_standard_offers(request, options = nil) - # Pass arguments to `list_standard_offers` via a request object, either of type - # {::Google::Cloud::CommerceProducer::V1beta::ListStandardOffersRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CommerceProducer::V1beta::ListStandardOffersRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_standard_offers(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_standard_offers` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent value for ListStandardOffersRequest - # @param page_size [::Integer] - # Optional. Maximum results to return. The service may return fewer than this - # value. The maximum value is 500; values above 500 will be coerced to 500. - # If unspecified, the server will default to the maximum. - # @param page_token [::String] - # Optional. A page token, received from a previous list response message. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters of the list request must match the - # request that returned the page token. - # @param filter [::String] - # Optional. Filter expression that matches a subset of resources to show. - # See https://google.aip.dev/160 for more details. - # Supports filtering by: - # - # * `effective_time`. - # Example: `effective_time > "2012-04-21T11:30:00-04:00"`. - # * `expire_time`. Example: `expire_time < "2026-05-06T00:00:00Z"`. - # @param order_by [::String] - # Optional. Ordering expression for sorting the results. - # See https://google.aip.dev/132#ordering for more details. - # If no value is present the default ordering is unspecified. - # Supports ordering by: - # - # * `effective_time` - # * `expire_time` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CommerceProducer::V1beta::StandardOffer>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CommerceProducer::V1beta::StandardOffer>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/commerce_producer/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CommerceProducer::V1beta::ListStandardOffersRequest.new - # - # # Call the list_standard_offers method. - # result = client.list_standard_offers request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::CommerceProducer::V1beta::StandardOffer. - # p item - # end - # - def list_standard_offers request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::ListStandardOffersRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_standard_offers.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_standard_offers.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_standard_offers.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @commerce_transaction_stub.list_standard_offers request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @commerce_transaction_stub, :list_standard_offers, "standard_offers", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single StandardOffer. - # - # @overload get_standard_offer(request, options = nil) - # Pass arguments to `get_standard_offer` via a request object, either of type - # {::Google::Cloud::CommerceProducer::V1beta::GetStandardOfferRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CommerceProducer::V1beta::GetStandardOfferRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_standard_offer(name: nil, view: nil) - # Pass arguments to `get_standard_offer` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource - # @param view [::Google::Cloud::CommerceProducer::V1beta::StandardOfferView] - # Optional. The view of the StandardOffer to return. - # If unspecified, the default view is BASIC. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::CommerceProducer::V1beta::StandardOffer] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CommerceProducer::V1beta::StandardOffer] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/commerce_producer/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CommerceProducer::V1beta::GetStandardOfferRequest.new - # - # # Call the get_standard_offer method. - # result = client.get_standard_offer request - # - # # The returned object is of type Google::Cloud::CommerceProducer::V1beta::StandardOffer. - # p result - # - def get_standard_offer request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::GetStandardOfferRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_standard_offer.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_standard_offer.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_standard_offer.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @commerce_transaction_stub.get_standard_offer request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single Sku. - # - # @overload get_sku(request, options = nil) - # Pass arguments to `get_sku` via a request object, either of type - # {::Google::Cloud::CommerceProducer::V1beta::GetSkuRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CommerceProducer::V1beta::GetSkuRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_sku(name: nil) - # Pass arguments to `get_sku` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::CommerceProducer::V1beta::Sku] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CommerceProducer::V1beta::Sku] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/commerce_producer/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CommerceProducer::V1beta::GetSkuRequest.new - # - # # Call the get_sku method. - # result = client.get_sku request - # - # # The returned object is of type Google::Cloud::CommerceProducer::V1beta::Sku. - # p result - # - def get_sku request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::GetSkuRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_sku.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_sku.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_sku.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @commerce_transaction_stub.get_sku request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists Skus for the given parent. - # - # @overload list_skus(request, options = nil) - # Pass arguments to `list_skus` via a request object, either of type - # {::Google::Cloud::CommerceProducer::V1beta::ListSkusRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CommerceProducer::V1beta::ListSkusRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_skus(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_skus` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent value for ListSkusRequest - # @param page_size [::Integer] - # Optional. Maximum results to return. The service may return fewer than this - # value. The maximum value is 500; values above 500 will be coerced to 500. - # If unspecified, the server will default to the maximum. - # @param page_token [::String] - # Optional. A page token, received from a previous list response message. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters of the list request must match the - # request that returned the page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CommerceProducer::V1beta::Sku>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CommerceProducer::V1beta::Sku>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/commerce_producer/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CommerceProducer::V1beta::ListSkusRequest.new - # - # # Call the list_skus method. - # result = client.list_skus request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::CommerceProducer::V1beta::Sku. - # p item - # end - # - def list_skus request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::ListSkusRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_skus.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_skus.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_skus.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @commerce_transaction_stub.list_skus request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @commerce_transaction_stub, :list_skus, "skus", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single SkuGroup. - # - # @overload get_sku_group(request, options = nil) - # Pass arguments to `get_sku_group` via a request object, either of type - # {::Google::Cloud::CommerceProducer::V1beta::GetSkuGroupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CommerceProducer::V1beta::GetSkuGroupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_sku_group(name: nil) - # Pass arguments to `get_sku_group` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::CommerceProducer::V1beta::SkuGroup] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CommerceProducer::V1beta::SkuGroup] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/commerce_producer/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CommerceProducer::V1beta::GetSkuGroupRequest.new - # - # # Call the get_sku_group method. - # result = client.get_sku_group request - # - # # The returned object is of type Google::Cloud::CommerceProducer::V1beta::SkuGroup. - # p result - # - def get_sku_group request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::GetSkuGroupRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_sku_group.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_sku_group.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_sku_group.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @commerce_transaction_stub.get_sku_group request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists SkuGroups for the given parent. - # - # @overload list_sku_groups(request, options = nil) - # Pass arguments to `list_sku_groups` via a request object, either of type - # {::Google::Cloud::CommerceProducer::V1beta::ListSkuGroupsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::CommerceProducer::V1beta::ListSkuGroupsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_sku_groups(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_sku_groups` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Parent value for ListSkuGroupsRequest - # @param page_size [::Integer] - # Optional. Maximum results to return. The service may return fewer than this - # value. The maximum value is 500; values above 500 will be coerced to 500. - # If unspecified, the server will default to the maximum. - # @param page_token [::String] - # Optional. A page token, received from a previous list response message. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters of the list request must match the - # request that returned the page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CommerceProducer::V1beta::SkuGroup>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::CommerceProducer::V1beta::SkuGroup>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/commerce_producer/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::CommerceProducer::V1beta::ListSkuGroupsRequest.new - # - # # Call the list_sku_groups method. - # result = client.list_sku_groups request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::CommerceProducer::V1beta::SkuGroup. - # p item - # end - # - def list_sku_groups request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::CommerceProducer::V1beta::ListSkuGroupsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_sku_groups.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::CommerceProducer::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_sku_groups.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_sku_groups.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @commerce_transaction_stub.list_sku_groups request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @commerce_transaction_stub, :list_sku_groups, "sku_groups", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the CommerceTransaction REST API. - # - # This class represents the configuration for CommerceTransaction REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_services to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_services.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_services.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "commerceproducer.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - # Overrides for http bindings for the RPCs of this service - # are only used when this service is used as mixin, and only - # by the host service. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the CommerceTransaction API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:jitter` (*type:* `Numeric`) - The jitter in seconds. Default: 1.0. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_services` - # @return [::Gapic::Config::Method] - # - attr_reader :list_services - ## - # RPC-specific configuration for `get_service` - # @return [::Gapic::Config::Method] - # - attr_reader :get_service - ## - # RPC-specific configuration for `list_private_offers` - # @return [::Gapic::Config::Method] - # - attr_reader :list_private_offers - ## - # RPC-specific configuration for `get_private_offer` - # @return [::Gapic::Config::Method] - # - attr_reader :get_private_offer - ## - # RPC-specific configuration for `resolve_amendment_target` - # @return [::Gapic::Config::Method] - # - attr_reader :resolve_amendment_target - ## - # RPC-specific configuration for `create_private_offer` - # @return [::Gapic::Config::Method] - # - attr_reader :create_private_offer - ## - # RPC-specific configuration for `update_private_offer` - # @return [::Gapic::Config::Method] - # - attr_reader :update_private_offer - ## - # RPC-specific configuration for `publish_private_offer` - # @return [::Gapic::Config::Method] - # - attr_reader :publish_private_offer - ## - # RPC-specific configuration for `cancel_private_offer` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_private_offer - ## - # RPC-specific configuration for `delete_private_offer` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_private_offer - ## - # RPC-specific configuration for `list_private_offer_documents` - # @return [::Gapic::Config::Method] - # - attr_reader :list_private_offer_documents - ## - # RPC-specific configuration for `get_private_offer_document` - # @return [::Gapic::Config::Method] - # - attr_reader :get_private_offer_document - ## - # RPC-specific configuration for `create_private_offer_document` - # @return [::Gapic::Config::Method] - # - attr_reader :create_private_offer_document - ## - # RPC-specific configuration for `update_private_offer_document` - # @return [::Gapic::Config::Method] - # - attr_reader :update_private_offer_document - ## - # RPC-specific configuration for `delete_private_offer_document` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_private_offer_document - ## - # RPC-specific configuration for `list_standard_offers` - # @return [::Gapic::Config::Method] - # - attr_reader :list_standard_offers - ## - # RPC-specific configuration for `get_standard_offer` - # @return [::Gapic::Config::Method] - # - attr_reader :get_standard_offer - ## - # RPC-specific configuration for `get_sku` - # @return [::Gapic::Config::Method] - # - attr_reader :get_sku - ## - # RPC-specific configuration for `list_skus` - # @return [::Gapic::Config::Method] - # - attr_reader :list_skus - ## - # RPC-specific configuration for `get_sku_group` - # @return [::Gapic::Config::Method] - # - attr_reader :get_sku_group - ## - # RPC-specific configuration for `list_sku_groups` - # @return [::Gapic::Config::Method] - # - attr_reader :list_sku_groups - - # @private - def initialize parent_rpcs = nil - list_services_config = parent_rpcs.list_services if parent_rpcs.respond_to? :list_services - @list_services = ::Gapic::Config::Method.new list_services_config - get_service_config = parent_rpcs.get_service if parent_rpcs.respond_to? :get_service - @get_service = ::Gapic::Config::Method.new get_service_config - list_private_offers_config = parent_rpcs.list_private_offers if parent_rpcs.respond_to? :list_private_offers - @list_private_offers = ::Gapic::Config::Method.new list_private_offers_config - get_private_offer_config = parent_rpcs.get_private_offer if parent_rpcs.respond_to? :get_private_offer - @get_private_offer = ::Gapic::Config::Method.new get_private_offer_config - resolve_amendment_target_config = parent_rpcs.resolve_amendment_target if parent_rpcs.respond_to? :resolve_amendment_target - @resolve_amendment_target = ::Gapic::Config::Method.new resolve_amendment_target_config - create_private_offer_config = parent_rpcs.create_private_offer if parent_rpcs.respond_to? :create_private_offer - @create_private_offer = ::Gapic::Config::Method.new create_private_offer_config - update_private_offer_config = parent_rpcs.update_private_offer if parent_rpcs.respond_to? :update_private_offer - @update_private_offer = ::Gapic::Config::Method.new update_private_offer_config - publish_private_offer_config = parent_rpcs.publish_private_offer if parent_rpcs.respond_to? :publish_private_offer - @publish_private_offer = ::Gapic::Config::Method.new publish_private_offer_config - cancel_private_offer_config = parent_rpcs.cancel_private_offer if parent_rpcs.respond_to? :cancel_private_offer - @cancel_private_offer = ::Gapic::Config::Method.new cancel_private_offer_config - delete_private_offer_config = parent_rpcs.delete_private_offer if parent_rpcs.respond_to? :delete_private_offer - @delete_private_offer = ::Gapic::Config::Method.new delete_private_offer_config - list_private_offer_documents_config = parent_rpcs.list_private_offer_documents if parent_rpcs.respond_to? :list_private_offer_documents - @list_private_offer_documents = ::Gapic::Config::Method.new list_private_offer_documents_config - get_private_offer_document_config = parent_rpcs.get_private_offer_document if parent_rpcs.respond_to? :get_private_offer_document - @get_private_offer_document = ::Gapic::Config::Method.new get_private_offer_document_config - create_private_offer_document_config = parent_rpcs.create_private_offer_document if parent_rpcs.respond_to? :create_private_offer_document - @create_private_offer_document = ::Gapic::Config::Method.new create_private_offer_document_config - update_private_offer_document_config = parent_rpcs.update_private_offer_document if parent_rpcs.respond_to? :update_private_offer_document - @update_private_offer_document = ::Gapic::Config::Method.new update_private_offer_document_config - delete_private_offer_document_config = parent_rpcs.delete_private_offer_document if parent_rpcs.respond_to? :delete_private_offer_document - @delete_private_offer_document = ::Gapic::Config::Method.new delete_private_offer_document_config - list_standard_offers_config = parent_rpcs.list_standard_offers if parent_rpcs.respond_to? :list_standard_offers - @list_standard_offers = ::Gapic::Config::Method.new list_standard_offers_config - get_standard_offer_config = parent_rpcs.get_standard_offer if parent_rpcs.respond_to? :get_standard_offer - @get_standard_offer = ::Gapic::Config::Method.new get_standard_offer_config - get_sku_config = parent_rpcs.get_sku if parent_rpcs.respond_to? :get_sku - @get_sku = ::Gapic::Config::Method.new get_sku_config - list_skus_config = parent_rpcs.list_skus if parent_rpcs.respond_to? :list_skus - @list_skus = ::Gapic::Config::Method.new list_skus_config - get_sku_group_config = parent_rpcs.get_sku_group if parent_rpcs.respond_to? :get_sku_group - @get_sku_group = ::Gapic::Config::Method.new get_sku_group_config - list_sku_groups_config = parent_rpcs.list_sku_groups if parent_rpcs.respond_to? :list_sku_groups - @list_sku_groups = ::Gapic::Config::Method.new list_sku_groups_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerce_producer/v1beta/commerce_transaction/rest/service_stub.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerce_producer/v1beta/commerce_transaction/rest/service_stub.rb deleted file mode 100644 index d850964552c8..000000000000 --- a/owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerce_producer/v1beta/commerce_transaction/rest/service_stub.rb +++ /dev/null @@ -1,1368 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/commerceproducer/v1beta/commerce_transaction_pb" - -module Google - module Cloud - module CommerceProducer - module V1beta - module CommerceTransaction - module Rest - ## - # REST service stub for the CommerceTransaction service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the list_services REST call - # - # @param request_pb [::Google::Cloud::CommerceProducer::V1beta::ListServicesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::CommerceProducer::V1beta::ListServicesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CommerceProducer::V1beta::ListServicesResponse] - # A result object deserialized from the server's reply - def list_services request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_services_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_services", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::CommerceProducer::V1beta::ListServicesResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_service REST call - # - # @param request_pb [::Google::Cloud::CommerceProducer::V1beta::GetServiceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::CommerceProducer::V1beta::Service] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CommerceProducer::V1beta::Service] - # A result object deserialized from the server's reply - def get_service request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_service_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_service", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::CommerceProducer::V1beta::Service.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_private_offers REST call - # - # @param request_pb [::Google::Cloud::CommerceProducer::V1beta::ListPrivateOffersRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::CommerceProducer::V1beta::ListPrivateOffersResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CommerceProducer::V1beta::ListPrivateOffersResponse] - # A result object deserialized from the server's reply - def list_private_offers request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_private_offers_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_private_offers", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::CommerceProducer::V1beta::ListPrivateOffersResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_private_offer REST call - # - # @param request_pb [::Google::Cloud::CommerceProducer::V1beta::GetPrivateOfferRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer] - # A result object deserialized from the server's reply - def get_private_offer request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_private_offer_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_private_offer", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::CommerceProducer::V1beta::PrivateOffer.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the resolve_amendment_target REST call - # - # @param request_pb [::Google::Cloud::CommerceProducer::V1beta::ResolveAmendmentTargetRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::CommerceProducer::V1beta::ResolveAmendmentTargetResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CommerceProducer::V1beta::ResolveAmendmentTargetResponse] - # A result object deserialized from the server's reply - def resolve_amendment_target request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_resolve_amendment_target_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "resolve_amendment_target", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::CommerceProducer::V1beta::ResolveAmendmentTargetResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_private_offer REST call - # - # @param request_pb [::Google::Cloud::CommerceProducer::V1beta::CreatePrivateOfferRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer] - # A result object deserialized from the server's reply - def create_private_offer request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_private_offer_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_private_offer", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::CommerceProducer::V1beta::PrivateOffer.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_private_offer REST call - # - # @param request_pb [::Google::Cloud::CommerceProducer::V1beta::UpdatePrivateOfferRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer] - # A result object deserialized from the server's reply - def update_private_offer request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_private_offer_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_private_offer", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::CommerceProducer::V1beta::PrivateOffer.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the publish_private_offer REST call - # - # @param request_pb [::Google::Cloud::CommerceProducer::V1beta::PublishPrivateOfferRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer] - # A result object deserialized from the server's reply - def publish_private_offer request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_publish_private_offer_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "publish_private_offer", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::CommerceProducer::V1beta::PrivateOffer.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the cancel_private_offer REST call - # - # @param request_pb [::Google::Cloud::CommerceProducer::V1beta::CancelPrivateOfferRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer] - # A result object deserialized from the server's reply - def cancel_private_offer request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_cancel_private_offer_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "cancel_private_offer", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::CommerceProducer::V1beta::PrivateOffer.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_private_offer REST call - # - # @param request_pb [::Google::Cloud::CommerceProducer::V1beta::DeletePrivateOfferRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_private_offer request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_private_offer_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_private_offer", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_private_offer_documents REST call - # - # @param request_pb [::Google::Cloud::CommerceProducer::V1beta::ListPrivateOfferDocumentsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::CommerceProducer::V1beta::ListPrivateOfferDocumentsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CommerceProducer::V1beta::ListPrivateOfferDocumentsResponse] - # A result object deserialized from the server's reply - def list_private_offer_documents request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_private_offer_documents_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_private_offer_documents", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::CommerceProducer::V1beta::ListPrivateOfferDocumentsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_private_offer_document REST call - # - # @param request_pb [::Google::Cloud::CommerceProducer::V1beta::GetPrivateOfferDocumentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument] - # A result object deserialized from the server's reply - def get_private_offer_document request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_private_offer_document_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_private_offer_document", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_private_offer_document REST call - # - # @param request_pb [::Google::Cloud::CommerceProducer::V1beta::CreatePrivateOfferDocumentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument] - # A result object deserialized from the server's reply - def create_private_offer_document request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_private_offer_document_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_private_offer_document", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_private_offer_document REST call - # - # @param request_pb [::Google::Cloud::CommerceProducer::V1beta::UpdatePrivateOfferDocumentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument] - # A result object deserialized from the server's reply - def update_private_offer_document request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_private_offer_document_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_private_offer_document", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_private_offer_document REST call - # - # @param request_pb [::Google::Cloud::CommerceProducer::V1beta::DeletePrivateOfferDocumentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_private_offer_document request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_private_offer_document_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_private_offer_document", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_standard_offers REST call - # - # @param request_pb [::Google::Cloud::CommerceProducer::V1beta::ListStandardOffersRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::CommerceProducer::V1beta::ListStandardOffersResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CommerceProducer::V1beta::ListStandardOffersResponse] - # A result object deserialized from the server's reply - def list_standard_offers request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_standard_offers_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_standard_offers", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::CommerceProducer::V1beta::ListStandardOffersResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_standard_offer REST call - # - # @param request_pb [::Google::Cloud::CommerceProducer::V1beta::GetStandardOfferRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::CommerceProducer::V1beta::StandardOffer] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CommerceProducer::V1beta::StandardOffer] - # A result object deserialized from the server's reply - def get_standard_offer request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_standard_offer_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_standard_offer", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::CommerceProducer::V1beta::StandardOffer.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_sku REST call - # - # @param request_pb [::Google::Cloud::CommerceProducer::V1beta::GetSkuRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::CommerceProducer::V1beta::Sku] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CommerceProducer::V1beta::Sku] - # A result object deserialized from the server's reply - def get_sku request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_sku_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_sku", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::CommerceProducer::V1beta::Sku.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_skus REST call - # - # @param request_pb [::Google::Cloud::CommerceProducer::V1beta::ListSkusRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::CommerceProducer::V1beta::ListSkusResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CommerceProducer::V1beta::ListSkusResponse] - # A result object deserialized from the server's reply - def list_skus request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_skus_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_skus", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::CommerceProducer::V1beta::ListSkusResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_sku_group REST call - # - # @param request_pb [::Google::Cloud::CommerceProducer::V1beta::GetSkuGroupRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::CommerceProducer::V1beta::SkuGroup] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CommerceProducer::V1beta::SkuGroup] - # A result object deserialized from the server's reply - def get_sku_group request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_sku_group_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_sku_group", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::CommerceProducer::V1beta::SkuGroup.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_sku_groups REST call - # - # @param request_pb [::Google::Cloud::CommerceProducer::V1beta::ListSkuGroupsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::CommerceProducer::V1beta::ListSkuGroupsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::CommerceProducer::V1beta::ListSkuGroupsResponse] - # A result object deserialized from the server's reply - def list_sku_groups request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_sku_groups_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_sku_groups", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::CommerceProducer::V1beta::ListSkuGroupsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_services REST call - # - # @param request_pb [::Google::Cloud::CommerceProducer::V1beta::ListServicesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_services_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta/{parent}/services", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_service REST call - # - # @param request_pb [::Google::Cloud::CommerceProducer::V1beta::GetServiceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_service_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/services/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_private_offers REST call - # - # @param request_pb [::Google::Cloud::CommerceProducer::V1beta::ListPrivateOffersRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_private_offers_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta/{parent}/privateOffers", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_private_offer REST call - # - # @param request_pb [::Google::Cloud::CommerceProducer::V1beta::GetPrivateOfferRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_private_offer_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/privateOffers/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the resolve_amendment_target REST call - # - # @param request_pb [::Google::Cloud::CommerceProducer::V1beta::ResolveAmendmentTargetRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_resolve_amendment_target_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta/{parent}/privateOffers:resolveAmendmentTarget", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_private_offer REST call - # - # @param request_pb [::Google::Cloud::CommerceProducer::V1beta::CreatePrivateOfferRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_private_offer_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta/{parent}/privateOffers", - body: "private_offer", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_private_offer REST call - # - # @param request_pb [::Google::Cloud::CommerceProducer::V1beta::UpdatePrivateOfferRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_private_offer_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1beta/{private_offer.name}", - body: "private_offer", - matches: [ - ["private_offer.name", %r{^projects/[^/]+/locations/[^/]+/privateOffers/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the publish_private_offer REST call - # - # @param request_pb [::Google::Cloud::CommerceProducer::V1beta::PublishPrivateOfferRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_publish_private_offer_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta/{name}:publish", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/privateOffers/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_private_offer REST call - # - # @param request_pb [::Google::Cloud::CommerceProducer::V1beta::CancelPrivateOfferRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_private_offer_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/privateOffers/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_private_offer REST call - # - # @param request_pb [::Google::Cloud::CommerceProducer::V1beta::DeletePrivateOfferRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_private_offer_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1beta/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/privateOffers/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_private_offer_documents REST call - # - # @param request_pb [::Google::Cloud::CommerceProducer::V1beta::ListPrivateOfferDocumentsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_private_offer_documents_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta/{parent}/documents", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/privateOffers/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_private_offer_document REST call - # - # @param request_pb [::Google::Cloud::CommerceProducer::V1beta::GetPrivateOfferDocumentRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_private_offer_document_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/privateOffers/[^/]+/documents/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_private_offer_document REST call - # - # @param request_pb [::Google::Cloud::CommerceProducer::V1beta::CreatePrivateOfferDocumentRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_private_offer_document_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta/{parent}/documents", - body: "private_offer_document", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/privateOffers/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_private_offer_document REST call - # - # @param request_pb [::Google::Cloud::CommerceProducer::V1beta::UpdatePrivateOfferDocumentRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_private_offer_document_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1beta/{private_offer_document.name}", - body: "private_offer_document", - matches: [ - ["private_offer_document.name", %r{^projects/[^/]+/locations/[^/]+/privateOffers/[^/]+/documents/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_private_offer_document REST call - # - # @param request_pb [::Google::Cloud::CommerceProducer::V1beta::DeletePrivateOfferDocumentRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_private_offer_document_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1beta/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/privateOffers/[^/]+/documents/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_standard_offers REST call - # - # @param request_pb [::Google::Cloud::CommerceProducer::V1beta::ListStandardOffersRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_standard_offers_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta/{parent}/standardOffers", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/services/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_standard_offer REST call - # - # @param request_pb [::Google::Cloud::CommerceProducer::V1beta::GetStandardOfferRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_standard_offer_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/services/[^/]+/standardOffers/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_sku REST call - # - # @param request_pb [::Google::Cloud::CommerceProducer::V1beta::GetSkuRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_sku_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/services/[^/]+/skus/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_skus REST call - # - # @param request_pb [::Google::Cloud::CommerceProducer::V1beta::ListSkusRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_skus_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta/{parent}/skus", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/services/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_sku_group REST call - # - # @param request_pb [::Google::Cloud::CommerceProducer::V1beta::GetSkuGroupRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_sku_group_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/skuGroups/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_sku_groups REST call - # - # @param request_pb [::Google::Cloud::CommerceProducer::V1beta::ListSkuGroupsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_sku_groups_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta/{parent}/skuGroups", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerce_producer/v1beta/rest.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerce_producer/v1beta/rest.rb deleted file mode 100644 index affebcd5fdf8..000000000000 --- a/owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerce_producer/v1beta/rest.rb +++ /dev/null @@ -1,38 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/commerce_producer/v1beta/commerce_transaction/rest" -require "google/cloud/commerce_producer/v1beta/bindings_override" -require "google/cloud/commerce_producer/v1beta/version" - -module Google - module Cloud - module CommerceProducer - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/commerce_producer/v1beta/rest" - # client = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new - # - module V1beta - end - end - end -end diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerce_producer/v1beta/version.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerce_producer/v1beta/version.rb deleted file mode 100644 index b2ade675bab2..000000000000 --- a/owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerce_producer/v1beta/version.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module CommerceProducer - module V1beta - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerceproducer/v1beta/commerce_transaction_pb.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerceproducer/v1beta/commerce_transaction_pb.rb deleted file mode 100644 index b136e06e7a33..000000000000 --- a/owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerceproducer/v1beta/commerce_transaction_pb.rb +++ /dev/null @@ -1,64 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/commerceproducer/v1beta/commerce_transaction.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/commerceproducer/v1beta/private_offer_pb' -require 'google/cloud/commerceproducer/v1beta/service_pb' -require 'google/cloud/commerceproducer/v1beta/sku_pb' -require 'google/cloud/commerceproducer/v1beta/sku_group_pb' -require 'google/cloud/commerceproducer/v1beta/standard_offer_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' - - -descriptor_data = "\n?google/cloud/commerceproducer/v1beta/commerce_transaction.proto\x12$google.cloud.commerceproducer.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x38google/cloud/commerceproducer/v1beta/private_offer.proto\x1a\x32google/cloud/commerceproducer/v1beta/service.proto\x1a.google/cloud/commerceproducer/v1beta/sku.proto\x1a\x34google/cloud/commerceproducer/v1beta/sku_group.proto\x1a\x39google/cloud/commerceproducer/v1beta/standard_offer.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"\xbd\x01\n\x18ListPrivateOffersRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\x12,commerceproducer.googleapis.com/PrivateOffer\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x80\x01\n\x19ListPrivateOffersResponse\x12J\n\x0eprivate_offers\x18\x01 \x03(\x0b\x32\x32.google.cloud.commerceproducer.v1beta.PrivateOffer\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xa7\x01\n\x16GetPrivateOfferRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,commerceproducer.googleapis.com/PrivateOffer\x12I\n\x04view\x18\x02 \x01(\x0e\x32\x36.google.cloud.commerceproducer.v1beta.PrivateOfferViewB\x03\xe0\x41\x01\"\x8d\x02\n\x1dResolveAmendmentTargetRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\x12,commerceproducer.googleapis.com/PrivateOffer\x12R\n\x16target_billing_account\x18\x02 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*cloudbilling.googleapis.com/BillingAccount\x12R\n\x13\x62\x61se_standard_offer\x18\x03 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-commerceproducer.googleapis.com/StandardOffer\"\xb2\x03\n\x1eResolveAmendmentTargetResponse\x12S\n\x16required_private_offer\x18\x01 \x01(\tB1\xfa\x41.\n,commerceproducer.googleapis.com/PrivateOfferH\x00\x12U\n\x17required_standard_offer\x18\x02 \x01(\tB2\xfa\x41/\n-commerceproducer.googleapis.com/StandardOfferH\x00\x12n\n\x0foptional_offers\x18\x03 \x01(\x0b\x32S.google.cloud.commerceproducer.v1beta.ResolveAmendmentTargetResponse.OptionalOffersH\x00\x1a[\n\x0eOptionalOffers\x12I\n\x0eprivate_offers\x18\x01 \x03(\tB1\xfa\x41.\n,commerceproducer.googleapis.com/PrivateOfferB\x17\n\x15\x61mendment_requirement\"\xb1\x01\n\x19\x43reatePrivateOfferRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\x12,commerceproducer.googleapis.com/PrivateOffer\x12N\n\rprivate_offer\x18\x03 \x01(\x0b\x32\x32.google.cloud.commerceproducer.v1beta.PrivateOfferB\x03\xe0\x41\x02\"\xa1\x01\n\x19UpdatePrivateOfferRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12N\n\rprivate_offer\x18\x02 \x01(\x0b\x32\x32.google.cloud.commerceproducer.v1beta.PrivateOfferB\x03\xe0\x41\x02\"|\n\x1aPublishPrivateOfferRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,commerceproducer.googleapis.com/PrivateOffer\x12\x1a\n\rvalidate_only\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"\x7f\n\x19\x43\x61ncelPrivateOfferRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,commerceproducer.googleapis.com/PrivateOffer\x12\x1e\n\x11\x63\x61ncellation_note\x18\x02 \x01(\tB\x03\xe0\x41\x01\"s\n\x19\x44\x65letePrivateOfferRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,commerceproducer.googleapis.com/PrivateOffer\x12\x12\n\x05\x66orce\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"\xa1\x01\n ListPrivateOfferDocumentsRequest\x12L\n\x06parent\x18\x01 \x01(\tB<\xe0\x41\x02\xfa\x41\x36\x12\x34\x63ommerceproducer.googleapis.com/PrivateOfferDocument\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x99\x01\n!ListPrivateOfferDocumentsResponse\x12[\n\x17private_offer_documents\x18\x01 \x03(\x0b\x32:.google.cloud.commerceproducer.v1beta.PrivateOfferDocument\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"l\n\x1eGetPrivateOfferDocumentRequest\x12J\n\x04name\x18\x01 \x01(\tB<\xe0\x41\x02\xfa\x41\x36\n4commerceproducer.googleapis.com/PrivateOfferDocument\"\xd2\x01\n!CreatePrivateOfferDocumentRequest\x12L\n\x06parent\x18\x01 \x01(\tB<\xe0\x41\x02\xfa\x41\x36\x12\x34\x63ommerceproducer.googleapis.com/PrivateOfferDocument\x12_\n\x16private_offer_document\x18\x03 \x01(\x0b\x32:.google.cloud.commerceproducer.v1beta.PrivateOfferDocumentB\x03\xe0\x41\x02\"\xba\x01\n!UpdatePrivateOfferDocumentRequest\x12_\n\x16private_offer_document\x18\x01 \x01(\x0b\x32:.google.cloud.commerceproducer.v1beta.PrivateOfferDocumentB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"o\n!DeletePrivateOfferDocumentRequest\x12J\n\x04name\x18\x01 \x01(\tB<\xe0\x41\x02\xfa\x41\x36\n4commerceproducer.googleapis.com/PrivateOfferDocument\"\x87\x01\n\x13ListServicesRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'commerceproducer.googleapis.com/Service\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"p\n\x14ListServicesResponse\x12?\n\x08services\x18\x01 \x03(\x0b\x32-.google.cloud.commerceproducer.v1beta.Service\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x98\x01\n\x11GetServiceRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'commerceproducer.googleapis.com/Service\x12\x44\n\x04view\x18\x02 \x01(\x0e\x32\x31.google.cloud.commerceproducer.v1beta.ServiceViewB\x03\xe0\x41\x01\"\xbf\x01\n\x19ListStandardOffersRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-commerceproducer.googleapis.com/StandardOffer\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x83\x01\n\x1aListStandardOffersResponse\x12L\n\x0fstandard_offers\x18\x01 \x03(\x0b\x32\x33.google.cloud.commerceproducer.v1beta.StandardOffer\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xaa\x01\n\x17GetStandardOfferRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-commerceproducer.googleapis.com/StandardOffer\x12J\n\x04view\x18\x02 \x01(\x0e\x32\x37.google.cloud.commerceproducer.v1beta.StandardOfferViewB\x03\xe0\x41\x01\"\x7f\n\x0fListSkusRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\x12#commerceproducer.googleapis.com/Sku\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"d\n\x10ListSkusResponse\x12\x37\n\x04skus\x18\x01 \x03(\x0b\x32).google.cloud.commerceproducer.v1beta.Sku\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"J\n\rGetSkuRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#commerceproducer.googleapis.com/Sku\"T\n\x12GetSkuGroupRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(commerceproducer.googleapis.com/SkuGroup\"\x89\x01\n\x14ListSkuGroupsRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(commerceproducer.googleapis.com/SkuGroup\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"t\n\x15ListSkuGroupsResponse\x12\x42\n\nsku_groups\x18\x01 \x03(\x0b\x32..google.cloud.commerceproducer.v1beta.SkuGroup\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t*q\n\x10PrivateOfferView\x12\"\n\x1ePRIVATE_OFFER_VIEW_UNSPECIFIED\x10\x00\x12\x1c\n\x18PRIVATE_OFFER_VIEW_BASIC\x10\x01\x12\x1b\n\x17PRIVATE_OFFER_VIEW_FULL\x10\x02*u\n\x11StandardOfferView\x12#\n\x1fSTANDARD_OFFER_VIEW_UNSPECIFIED\x10\x00\x12\x1d\n\x19STANDARD_OFFER_VIEW_BASIC\x10\x01\x12\x1c\n\x18STANDARD_OFFER_VIEW_FULL\x10\x02*Z\n\x0bServiceView\x12\x1c\n\x18SERVICE_VIEW_UNSPECIFIED\x10\x00\x12\x16\n\x12SERVICE_VIEW_BASIC\x10\x01\x12\x15\n\x11SERVICE_VIEW_FULL\x10\x02\x32\xf5%\n\x13\x43ommerceTransaction\x12\xc8\x01\n\x0cListServices\x12\x39.google.cloud.commerceproducer.v1beta.ListServicesRequest\x1a:.google.cloud.commerceproducer.v1beta.ListServicesResponse\"A\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x32\x12\x30/v1beta/{parent=projects/*/locations/*}/services\x12\xb5\x01\n\nGetService\x12\x37.google.cloud.commerceproducer.v1beta.GetServiceRequest\x1a-.google.cloud.commerceproducer.v1beta.Service\"?\xda\x41\x04name\x82\xd3\xe4\x93\x02\x32\x12\x30/v1beta/{name=projects/*/locations/*/services/*}\x12\xdc\x01\n\x11ListPrivateOffers\x12>.google.cloud.commerceproducer.v1beta.ListPrivateOffersRequest\x1a?.google.cloud.commerceproducer.v1beta.ListPrivateOffersResponse\"F\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x37\x12\x35/v1beta/{parent=projects/*/locations/*}/privateOffers\x12\xc9\x01\n\x0fGetPrivateOffer\x12<.google.cloud.commerceproducer.v1beta.GetPrivateOfferRequest\x1a\x32.google.cloud.commerceproducer.v1beta.PrivateOffer\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/v1beta/{name=projects/*/locations/*/privateOffers/*}\x12\xae\x02\n\x16ResolveAmendmentTarget\x12\x43.google.cloud.commerceproducer.v1beta.ResolveAmendmentTargetRequest\x1a\x44.google.cloud.commerceproducer.v1beta.ResolveAmendmentTargetResponse\"\x88\x01\xda\x41\x31parent,target_billing_account,base_standard_offer\x82\xd3\xe4\x93\x02N\x12L/v1beta/{parent=projects/*/locations/*}/privateOffers:resolveAmendmentTarget\x12\xd7\x01\n\x12\x43reatePrivateOffer\x12?.google.cloud.commerceproducer.v1beta.CreatePrivateOfferRequest\x1a\x32.google.cloud.commerceproducer.v1beta.PrivateOffer\"L\x82\xd3\xe4\x93\x02\x46\"5/v1beta/{parent=projects/*/locations/*}/privateOffers:\rprivate_offer\x12\x81\x02\n\x12UpdatePrivateOffer\x12?.google.cloud.commerceproducer.v1beta.UpdatePrivateOfferRequest\x1a\x32.google.cloud.commerceproducer.v1beta.PrivateOffer\"v\xda\x41\x19private_offer,update_mask\x82\xd3\xe4\x93\x02T2C/v1beta/{private_offer.name=projects/*/locations/*/privateOffers/*}:\rprivate_offer\x12\xdc\x01\n\x13PublishPrivateOffer\x12@.google.cloud.commerceproducer.v1beta.PublishPrivateOfferRequest\x1a\x32.google.cloud.commerceproducer.v1beta.PrivateOffer\"O\xda\x41\x04name\x82\xd3\xe4\x93\x02\x42\"=/v1beta/{name=projects/*/locations/*/privateOffers/*}:publish:\x01*\x12\xd9\x01\n\x12\x43\x61ncelPrivateOffer\x12?.google.cloud.commerceproducer.v1beta.CancelPrivateOfferRequest\x1a\x32.google.cloud.commerceproducer.v1beta.PrivateOffer\"N\xda\x41\x04name\x82\xd3\xe4\x93\x02\x41\".google.cloud.commerceproducer.v1beta.Sku.SkuPrice.TieredPriceB\x03\xe0\x41\x03H\x00\x12\x1d\n\x10\x63\x61nonical_metric\x18\x01 \x01(\tB\x03\xe0\x41\x03\x42\x11\n\x0fprice_structure\x1a\xd9\x06\n\x1c\x43omputeEngineLicenseUsageFee\x12,\n\x0eprice_per_unit\x18\x06 \x01(\x0b\x32\x12.google.type.MoneyH\x00\x12\x19\n\x0clicense_code\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12~\n\x10machine_resource\x18\x02 \x01(\x0e\x32_.google.cloud.commerceproducer.v1beta.Sku.SkuPrice.ComputeEngineLicenseUsageFee.MachineResourceB\x03\xe0\x41\x03\x12\x89\x01\n\x16machine_resource_range\x18\x03 \x01(\x0b\x32\x64.google.cloud.commerceproducer.v1beta.Sku.SkuPrice.ComputeEngineLicenseUsageFee.MachineResourceRangeB\x03\xe0\x41\x03\x12\x80\x01\n\x11usage_calculation\x18\x04 \x01(\x0e\x32`.google.cloud.commerceproducer.v1beta.Sku.SkuPrice.ComputeEngineLicenseUsageFee.UsageCalculationB\x03\xe0\x41\x03\x12\x11\n\x04unit\x18\x05 \x01(\tB\x03\xe0\x41\x03\x1a[\n\x14MachineResourceRange\x12\x18\n\x0bstart_value\x18\x01 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1b\n\tend_value\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x42\x0c\n\n_end_value\"d\n\x0fMachineResource\x12 \n\x1cMACHINE_RESOURCE_UNSPECIFIED\x10\x00\x12\x0e\n\nVCPU_COUNT\x10\x01\x12\x10\n\x0cMEMORY_BYTES\x10\x02\x12\r\n\tGPU_COUNT\x10\x03\"x\n\x10UsageCalculation\x12!\n\x1dUSAGE_CALCULATION_UNSPECIFIED\x10\x00\x12\x14\n\x10INSTANCE_RUNTIME\x10\x01\x12+\n\'LINEAR_RESOURCE_SCALED_INSTANCE_RUNTIME\x10\x02\x42\x11\n\x0fprice_structure\x1a\xa2\x06\n\x1bKubernetesEnginePodUsageFee\x12,\n\x0eprice_per_unit\x18\x06 \x01(\x0b\x32\x12.google.type.MoneyH\x00\x12u\n\x0cpod_resource\x18\x02 \x01(\x0e\x32Z.google.cloud.commerceproducer.v1beta.Sku.SkuPrice.KubernetesEnginePodUsageFee.PodResourceB\x03\xe0\x41\x03\x12\x80\x01\n\x12pod_resource_range\x18\x03 \x01(\x0b\x32_.google.cloud.commerceproducer.v1beta.Sku.SkuPrice.KubernetesEnginePodUsageFee.PodResourceRangeB\x03\xe0\x41\x03\x12\x7f\n\x11usage_calculation\x18\x04 \x01(\x0e\x32_.google.cloud.commerceproducer.v1beta.Sku.SkuPrice.KubernetesEnginePodUsageFee.UsageCalculationB\x03\xe0\x41\x03\x12\x11\n\x04unit\x18\x05 \x01(\tB\x03\xe0\x41\x03\x1aW\n\x10PodResourceRange\x12\x18\n\x0bstart_value\x18\x01 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1b\n\tend_value\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x42\x0c\n\n_end_value\"k\n\x0bPodResource\x12\x1c\n\x18POD_RESOURCE_UNSPECIFIED\x10\x00\x12\x0e\n\nVCPU_COUNT\x10\x01\x12\x10\n\x0cMEMORY_BYTES\x10\x02\x12\r\n\tGPU_COUNT\x10\x03\x12\r\n\tTPU_COUNT\x10\x04\"n\n\x10UsageCalculation\x12!\n\x1dUSAGE_CALCULATION_UNSPECIFIED\x10\x00\x12\x0f\n\x0bPOD_RUNTIME\x10\x01\x12&\n\"LINEAR_RESOURCE_SCALED_POD_RUNTIME\x10\x02\x42\x11\n\x0fprice_structure\x1a\xfb\x11\n\x1e\x41iPlatformManagedModelUsageFee\x12[\n\x0ctiered_price\x18\x07 \x01(\x0b\x32>.google.cloud.commerceproducer.v1beta.Sku.SkuPrice.TieredPriceB\x03\xe0\x41\x03H\x00\x12\x8e\x01\n\x0cusage_metric\x18\x01 \x01(\x0b\x32s.google.cloud.commerceproducer.v1beta.Sku.SkuPrice.AiPlatformManagedModelUsageFee.AiPlatformManagedModelUsageMetricB\x03\xe0\x41\x03\x12p\n\x08location\x18\x03 \x01(\x0b\x32Y.google.cloud.commerceproducer.v1beta.Sku.SkuPrice.AiPlatformManagedModelEndpointLocationB\x03\xe0\x41\x03\x12~\n\x0fprediction_mode\x18\x04 \x01(\x0e\x32`.google.cloud.commerceproducer.v1beta.Sku.SkuPrice.AiPlatformManagedModelUsageFee.PredictionModeB\x03\xe0\x41\x03\x12\xa3\x01\n#combined_request_input_tokens_range\x18\x05 \x01(\x0b\x32q.google.cloud.commerceproducer.v1beta.Sku.SkuPrice.AiPlatformManagedModelUsageFee.CombinedRequestInputTokensRangeB\x03\xe0\x41\x03\x12\x9b\x01\n\x1eprovisioned_throughput_overage\x18\x06 \x01(\x0b\x32n.google.cloud.commerceproducer.v1beta.Sku.SkuPrice.AiPlatformManagedModelUsageFee.ProvisionedThroughputOverageB\x03\xe0\x41\x03\x1a\xf7\x08\n!AiPlatformManagedModelUsageMetric\x12\xaa\x01\n\x13input_tokens_metric\x18\x01 \x01(\x0b\x32\x85\x01.google.cloud.commerceproducer.v1beta.Sku.SkuPrice.AiPlatformManagedModelUsageFee.AiPlatformManagedModelUsageMetric.InputTokensMetricB\x03\xe0\x41\x03H\x00\x12\xbe\x01\n\x1e\x63\x61\x63he_read_input_tokens_metric\x18\x02 \x01(\x0b\x32\x8e\x01.google.cloud.commerceproducer.v1beta.Sku.SkuPrice.AiPlatformManagedModelUsageFee.AiPlatformManagedModelUsageMetric.CacheReadInputTokensMetricB\x03\xe0\x41\x03H\x00\x12\xc0\x01\n\x1f\x63\x61\x63he_write_input_tokens_metric\x18\x03 \x01(\x0b\x32\x8f\x01.google.cloud.commerceproducer.v1beta.Sku.SkuPrice.AiPlatformManagedModelUsageFee.AiPlatformManagedModelUsageMetric.CacheWriteInputTokensMetricB\x03\xe0\x41\x03H\x00\x12\xac\x01\n\x14output_tokens_metric\x18\x04 \x01(\x0b\x32\x86\x01.google.cloud.commerceproducer.v1beta.Sku.SkuPrice.AiPlatformManagedModelUsageFee.AiPlatformManagedModelUsageMetric.OutputTokensMetricB\x03\xe0\x41\x03H\x00\x12\xb7\x01\n\x1aweb_search_requests_metric\x18\x05 \x01(\x0b\x32\x8b\x01.google.cloud.commerceproducer.v1beta.Sku.SkuPrice.AiPlatformManagedModelUsageFee.AiPlatformManagedModelUsageMetric.WebSearchRequestsMetricB\x03\xe0\x41\x03H\x00\x1a\x13\n\x11InputTokensMetric\x1a\x1c\n\x1a\x43\x61\x63heReadInputTokensMetric\x1aJ\n\x1b\x43\x61\x63heWriteInputTokensMetric\x12+\n\x03ttl\x18\x01 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x03\x1a\x14\n\x12OutputTokensMetric\x1a\x19\n\x17WebSearchRequestsMetricB\x08\n\x06metric\x1a\x66\n\x1f\x43ombinedRequestInputTokensRange\x12\x18\n\x0bstart_value\x18\x01 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1b\n\tend_value\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x42\x0c\n\n_end_value\x1a`\n\x1cProvisionedThroughputOverage\x12@\n\x07service\x18\x01 \x01(\tB/\xe0\x41\x03\xfa\x41)\x12\'commerceproducer.googleapis.com/Service\"^\n\x0ePredictionMode\x12\x1f\n\x1bPREDICTION_MODE_UNSPECIFIED\x10\x00\x12\x15\n\x11ONLINE_PREDICTION\x10\x01\x12\x14\n\x10\x42\x41TCH_PREDICTION\x10\x02\x42\x11\n\x0fprice_structure\x1a\x9b\x02\n\"AiPlatformProvisionedThroughputFee\x12#\n\x14term_duration_months\x18\x02 \x01(\x05\x42\x03\xe0\x41\x03H\x00\x12\x30\n\x12gsu_price_per_unit\x18\x04 \x01(\x0b\x32\x12.google.type.MoneyH\x01\x12p\n\x08location\x18\x01 \x01(\x0b\x32Y.google.cloud.commerceproducer.v1beta.Sku.SkuPrice.AiPlatformManagedModelEndpointLocationB\x03\xe0\x41\x03\x12\x11\n\x04unit\x18\x03 \x01(\tB\x03\xe0\x41\x03\x42\x06\n\x04termB\x11\n\x0fprice_structure\x1a\x9c\x03\n\x1f\x41iPlatformDeployedModelUsageFee\x12\x1f\n\x10\x61\x63\x63\x65lerator_type\x18\x02 \x01(\tB\x03\xe0\x41\x03H\x00\x12\x31\n\x0eprice_per_unit\x18\x05 \x01(\x0b\x32\x12.google.type.MoneyB\x03\xe0\x41\x03H\x01\x12\x11\n\x04unit\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x83\x01\n\x11usage_calculation\x18\x04 \x01(\x0e\x32\x63.google.cloud.commerceproducer.v1beta.Sku.SkuPrice.AiPlatformDeployedModelUsageFee.UsageCalculationB\x03\xe0\x41\x03\"d\n\x10UsageCalculation\x12!\n\x1dUSAGE_CALCULATION_UNSPECIFIED\x10\x00\x12-\n)LINEAR_RESOURCE_SCALED_DEPLOYMENT_RUNTIME\x10\x02\x42\x13\n\x11hardware_resourceB\x11\n\x0fprice_structure\x1an\n\x13\x46latSubscriptionFee\x12\x31\n\x0eprice_per_unit\x18\x03 \x01(\x0b\x32\x12.google.type.MoneyB\x03\xe0\x41\x03H\x00\x12\x11\n\x04unit\x18\x02 \x01(\tB\x03\xe0\x41\x03\x42\x11\n\x0fprice_structure\x1a\xbe\x02\n\x0bTieredPrice\x12\x11\n\x04unit\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x1d\n\x10unit_description\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x33\n\x10price_unit_count\x18\x03 \x01(\x0b\x32\x14.google.type.DecimalB\x03\xe0\x41\x03\x12\x62\n\x0bprice_tiers\x18\x04 \x03(\x0b\x32H.google.cloud.commerceproducer.v1beta.Sku.SkuPrice.TieredPrice.PriceTierB\x03\xe0\x41\x03\x1a\x64\n\tPriceTier\x12/\n\x0cstart_amount\x18\x01 \x01(\x0b\x32\x14.google.type.DecimalB\x03\xe0\x41\x03\x12&\n\x05price\x18\x02 \x01(\x0b\x32\x12.google.type.MoneyB\x03\xe0\x41\x03\x1a\x8e\x01\n&AiPlatformManagedModelEndpointLocation\x12\x18\n\tregion_id\x18\x01 \x01(\tB\x03\xe0\x41\x03H\x00\x12\x1e\n\x0fglobal_endpoint\x18\x02 \x01(\x08\x42\x03\xe0\x41\x03H\x00\x12\x1e\n\x0fmulti_region_id\x18\x03 \x01(\tB\x03\xe0\x41\x03H\x00\x42\n\n\x08locationB\n\n\x08sku_type:z\xea\x41w\n#commerceproducer.googleapis.com/Sku\x12\x45projects/{project}/locations/{location}/services/{service}/skus/{sku}*\x04skus2\x03skuB\x84\x02\n(com.google.cloud.commerceproducer.v1betaB\x08SkuProtoP\x01ZTcloud.google.com/go/commerceproducer/apiv1beta/commerceproducerpb;commerceproducerpb\xaa\x02$Google.Cloud.CommerceProducer.V1Beta\xca\x02$Google\\Cloud\\CommerceProducer\\V1beta\xea\x02\'Google::Cloud::CommerceProducer::V1betab\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module CommerceProducer - module V1beta - Sku = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.commerceproducer.v1beta.Sku").msgclass - Sku::SkuPrice = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.commerceproducer.v1beta.Sku.SkuPrice").msgclass - Sku::SkuPrice::InactiveSkuPrice = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.commerceproducer.v1beta.Sku.SkuPrice.InactiveSkuPrice").msgclass - Sku::SkuPrice::ManagedServiceMetricUsageFee = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.commerceproducer.v1beta.Sku.SkuPrice.ManagedServiceMetricUsageFee").msgclass - Sku::SkuPrice::ComputeEngineLicenseUsageFee = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.commerceproducer.v1beta.Sku.SkuPrice.ComputeEngineLicenseUsageFee").msgclass - Sku::SkuPrice::ComputeEngineLicenseUsageFee::MachineResourceRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.commerceproducer.v1beta.Sku.SkuPrice.ComputeEngineLicenseUsageFee.MachineResourceRange").msgclass - Sku::SkuPrice::ComputeEngineLicenseUsageFee::MachineResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.commerceproducer.v1beta.Sku.SkuPrice.ComputeEngineLicenseUsageFee.MachineResource").enummodule - Sku::SkuPrice::ComputeEngineLicenseUsageFee::UsageCalculation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.commerceproducer.v1beta.Sku.SkuPrice.ComputeEngineLicenseUsageFee.UsageCalculation").enummodule - Sku::SkuPrice::KubernetesEnginePodUsageFee = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.commerceproducer.v1beta.Sku.SkuPrice.KubernetesEnginePodUsageFee").msgclass - Sku::SkuPrice::KubernetesEnginePodUsageFee::PodResourceRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.commerceproducer.v1beta.Sku.SkuPrice.KubernetesEnginePodUsageFee.PodResourceRange").msgclass - Sku::SkuPrice::KubernetesEnginePodUsageFee::PodResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.commerceproducer.v1beta.Sku.SkuPrice.KubernetesEnginePodUsageFee.PodResource").enummodule - Sku::SkuPrice::KubernetesEnginePodUsageFee::UsageCalculation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.commerceproducer.v1beta.Sku.SkuPrice.KubernetesEnginePodUsageFee.UsageCalculation").enummodule - Sku::SkuPrice::AiPlatformManagedModelUsageFee = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.commerceproducer.v1beta.Sku.SkuPrice.AiPlatformManagedModelUsageFee").msgclass - Sku::SkuPrice::AiPlatformManagedModelUsageFee::AiPlatformManagedModelUsageMetric = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.commerceproducer.v1beta.Sku.SkuPrice.AiPlatformManagedModelUsageFee.AiPlatformManagedModelUsageMetric").msgclass - Sku::SkuPrice::AiPlatformManagedModelUsageFee::AiPlatformManagedModelUsageMetric::InputTokensMetric = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.commerceproducer.v1beta.Sku.SkuPrice.AiPlatformManagedModelUsageFee.AiPlatformManagedModelUsageMetric.InputTokensMetric").msgclass - Sku::SkuPrice::AiPlatformManagedModelUsageFee::AiPlatformManagedModelUsageMetric::CacheReadInputTokensMetric = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.commerceproducer.v1beta.Sku.SkuPrice.AiPlatformManagedModelUsageFee.AiPlatformManagedModelUsageMetric.CacheReadInputTokensMetric").msgclass - Sku::SkuPrice::AiPlatformManagedModelUsageFee::AiPlatformManagedModelUsageMetric::CacheWriteInputTokensMetric = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.commerceproducer.v1beta.Sku.SkuPrice.AiPlatformManagedModelUsageFee.AiPlatformManagedModelUsageMetric.CacheWriteInputTokensMetric").msgclass - Sku::SkuPrice::AiPlatformManagedModelUsageFee::AiPlatformManagedModelUsageMetric::OutputTokensMetric = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.commerceproducer.v1beta.Sku.SkuPrice.AiPlatformManagedModelUsageFee.AiPlatformManagedModelUsageMetric.OutputTokensMetric").msgclass - Sku::SkuPrice::AiPlatformManagedModelUsageFee::AiPlatformManagedModelUsageMetric::WebSearchRequestsMetric = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.commerceproducer.v1beta.Sku.SkuPrice.AiPlatformManagedModelUsageFee.AiPlatformManagedModelUsageMetric.WebSearchRequestsMetric").msgclass - Sku::SkuPrice::AiPlatformManagedModelUsageFee::CombinedRequestInputTokensRange = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.commerceproducer.v1beta.Sku.SkuPrice.AiPlatformManagedModelUsageFee.CombinedRequestInputTokensRange").msgclass - Sku::SkuPrice::AiPlatformManagedModelUsageFee::ProvisionedThroughputOverage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.commerceproducer.v1beta.Sku.SkuPrice.AiPlatformManagedModelUsageFee.ProvisionedThroughputOverage").msgclass - Sku::SkuPrice::AiPlatformManagedModelUsageFee::PredictionMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.commerceproducer.v1beta.Sku.SkuPrice.AiPlatformManagedModelUsageFee.PredictionMode").enummodule - Sku::SkuPrice::AiPlatformProvisionedThroughputFee = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.commerceproducer.v1beta.Sku.SkuPrice.AiPlatformProvisionedThroughputFee").msgclass - Sku::SkuPrice::AiPlatformDeployedModelUsageFee = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.commerceproducer.v1beta.Sku.SkuPrice.AiPlatformDeployedModelUsageFee").msgclass - Sku::SkuPrice::AiPlatformDeployedModelUsageFee::UsageCalculation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.commerceproducer.v1beta.Sku.SkuPrice.AiPlatformDeployedModelUsageFee.UsageCalculation").enummodule - Sku::SkuPrice::FlatSubscriptionFee = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.commerceproducer.v1beta.Sku.SkuPrice.FlatSubscriptionFee").msgclass - Sku::SkuPrice::TieredPrice = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.commerceproducer.v1beta.Sku.SkuPrice.TieredPrice").msgclass - Sku::SkuPrice::TieredPrice::PriceTier = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.commerceproducer.v1beta.Sku.SkuPrice.TieredPrice.PriceTier").msgclass - Sku::SkuPrice::AiPlatformManagedModelEndpointLocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.commerceproducer.v1beta.Sku.SkuPrice.AiPlatformManagedModelEndpointLocation").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerceproducer/v1beta/standard_offer_pb.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerceproducer/v1beta/standard_offer_pb.rb deleted file mode 100644 index 63fdc3836bec..000000000000 --- a/owl-bot-staging/google-cloud-commerce_producer-v1beta/lib/google/cloud/commerceproducer/v1beta/standard_offer_pb.rb +++ /dev/null @@ -1,30 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/commerceproducer/v1beta/standard_offer.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n9google/cloud/commerceproducer/v1beta/standard_offer.proto\x12$google.cloud.commerceproducer.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xa5\n\n\rStandardOffer\x12#\n\x14term_duration_months\x18\x07 \x01(\x05\x42\x03\xe0\x41\x03H\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x37\n\x0e\x65\x66\x66\x65\x63tive_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x65xpire_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1a\n\rservice_level\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12 \n\x13service_level_title\x18\t \x01(\tB\x03\xe0\x41\x03\x12X\n\x0bprice_model\x18\x08 \x01(\x0b\x32>.google.cloud.commerceproducer.v1beta.StandardOffer.PriceModelB\x03\xe0\x41\x03\x1a\xaf\x05\n\nPriceModel\x12k\n\x08\x66lat_fee\x18\x02 \x01(\x0b\x32R.google.cloud.commerceproducer.v1beta.StandardOffer.PriceModel.FlatFeeSubscriptionB\x03\xe0\x41\x03H\x00\x12X\n\x05usage\x18\x01 \x01(\x0b\x32\x44.google.cloud.commerceproducer.v1beta.StandardOffer.PriceModel.UsageB\x03\xe0\x41\x03\x1a\x44\n\x07SkuList\x12\x39\n\x04skus\x18\x01 \x03(\tB+\xe0\x41\x03\xfa\x41%\n#commerceproducer.googleapis.com/Sku\x1aT\n\x0cSkuGroupList\x12\x44\n\nsku_groups\x18\x01 \x03(\tB0\xe0\x41\x03\xfa\x41*\n(commerceproducer.googleapis.com/SkuGroup\x1a\xdc\x01\n\x05Usage\x12_\n\x08sku_list\x18\x01 \x01(\x0b\x32\x46.google.cloud.commerceproducer.v1beta.StandardOffer.PriceModel.SkuListB\x03\xe0\x41\x03H\x00\x12j\n\x0esku_group_list\x18\x02 \x01(\x0b\x32K.google.cloud.commerceproducer.v1beta.StandardOffer.PriceModel.SkuGroupListB\x03\xe0\x41\x03H\x00\x42\x06\n\x04skus\x1aO\n\x13\x46latFeeSubscription\x12\x38\n\x03sku\x18\x01 \x01(\tB+\xe0\x41\x03\xfa\x41%\n#commerceproducer.googleapis.com/SkuB\x0e\n\x0csubscription:\xae\x01\xea\x41\xaa\x01\n-commerceproducer.googleapis.com/StandardOffer\x12Zprojects/{project}/locations/{location}/services/{service}/standardOffers/{standard_offer}*\x0estandardOffers2\rstandardOfferB\x06\n\x04termB\x8e\x02\n(com.google.cloud.commerceproducer.v1betaB\x12StandardOfferProtoP\x01ZTcloud.google.com/go/commerceproducer/apiv1beta/commerceproducerpb;commerceproducerpb\xaa\x02$Google.Cloud.CommerceProducer.V1Beta\xca\x02$Google\\Cloud\\CommerceProducer\\V1beta\xea\x02\'Google::Cloud::CommerceProducer::V1betab\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module CommerceProducer - module V1beta - StandardOffer = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.commerceproducer.v1beta.StandardOffer").msgclass - StandardOffer::PriceModel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.commerceproducer.v1beta.StandardOffer.PriceModel").msgclass - StandardOffer::PriceModel::SkuList = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.commerceproducer.v1beta.StandardOffer.PriceModel.SkuList").msgclass - StandardOffer::PriceModel::SkuGroupList = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.commerceproducer.v1beta.StandardOffer.PriceModel.SkuGroupList").msgclass - StandardOffer::PriceModel::Usage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.commerceproducer.v1beta.StandardOffer.PriceModel.Usage").msgclass - StandardOffer::PriceModel::FlatFeeSubscription = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.commerceproducer.v1beta.StandardOffer.PriceModel.FlatFeeSubscription").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/README.md b/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/README.md deleted file mode 100644 index d787dcfce5e7..000000000000 --- a/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Cloud Commerce Producer V1BETA Protocol Buffer Documentation - -These files are for the YARD documentation of the generated protobuf files. -They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/api/client.rb +++ /dev/null @@ -1,593 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Required information for every language. - # @!attribute [rw] reference_docs_uri - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Link to automatically generated reference documentation. Example: - # https://cloud.google.com/nodejs/docs/reference/asset/latest - # @!attribute [rw] destinations - # @return [::Array<::Google::Api::ClientLibraryDestination>] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - # - # Note: This field should not be used in most cases. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Php. Clobbers the php_namespace option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.php.package_name" field - # in gapic.yaml. API teams should use the protobuf php_namespace option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # library_settings: - # php_settings: - # library_package: Google\Cloud\PubSub\V1 - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # Example: - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - # @!attribute [rw] batching - # @return [::Google::Api::BatchingConfigProto] - # Batching configuration for an API method in client libraries. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.BatchCreateExample - # batching: - # element_count_threshold: 1000 - # request_byte_threshold: 100000000 - # delay_threshold_millis: 10 - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # - # Note: This feature should not be used in most cases. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingConfigProto` defines the batching configuration for an API method. - # @!attribute [rw] thresholds - # @return [::Google::Api::BatchingSettingsProto] - # The thresholds which trigger a batched request to be sent. - # @!attribute [rw] batch_descriptor - # @return [::Google::Api::BatchingDescriptorProto] - # The request and response fields used in batching. - class BatchingConfigProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingSettingsProto` specifies a set of batching thresholds, each of - # which acts as a trigger to send a batch of messages as a request. At least - # one threshold must be positive nonzero. - # @!attribute [rw] element_count_threshold - # @return [::Integer] - # The number of elements of a field collected into a batch which, if - # exceeded, causes the batch to be sent. - # @!attribute [rw] request_byte_threshold - # @return [::Integer] - # The aggregated size of the batched field which, if exceeded, causes the - # batch to be sent. This size is computed by aggregating the sizes of the - # request field to be batched, not of the entire request message. - # @!attribute [rw] delay_threshold - # @return [::Google::Protobuf::Duration] - # The duration after which a batch should be sent, starting from the addition - # of the first message to that batch. - # @!attribute [rw] element_count_limit - # @return [::Integer] - # The maximum number of elements collected in a batch that could be accepted - # by server. - # @!attribute [rw] request_byte_limit - # @return [::Integer] - # The maximum size of the request that could be accepted by server. - # @!attribute [rw] flow_control_element_limit - # @return [::Integer] - # The maximum number of elements allowed by flow control. - # @!attribute [rw] flow_control_byte_limit - # @return [::Integer] - # The maximum size of data allowed by flow control. - # @!attribute [rw] flow_control_limit_exceeded_behavior - # @return [::Google::Api::FlowControlLimitExceededBehaviorProto] - # The behavior to take when the flow control limit is exceeded. - class BatchingSettingsProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # `BatchingDescriptorProto` specifies the fields of the request message to be - # used for batching, and, optionally, the fields of the response message to be - # used for demultiplexing. - # @!attribute [rw] batched_field - # @return [::String] - # The repeated field in the request message to be aggregated by batching. - # @!attribute [rw] discriminator_fields - # @return [::Array<::String>] - # A list of the fields in the request message. Two requests will be batched - # together only if the values of every field specified in - # `request_discriminator_fields` is equal between the two requests. - # @!attribute [rw] subresponse_field - # @return [::String] - # Optional. When present, indicates the field in the response message to be - # used to demultiplex the response into multiple response messages, in - # correspondence with the multiple request messages originally batched - # together. - class BatchingDescriptorProto - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - - # The behavior to take when the flow control limit is exceeded. - module FlowControlLimitExceededBehaviorProto - # Default behavior, system-defined. - UNSET_BEHAVIOR = 0 - - # Stop operation, raise error. - THROW_EXCEPTION = 1 - - # Pause operation until limit clears. - BLOCK = 2 - - # Continue operation, disregard limit. - IGNORE = 3 - end - end -end diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/api/field_behavior.rb +++ /dev/null @@ -1,85 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # An indicator of the behavior of a given field (for example, that a field - # is required in requests, or given as output but ignored as input). - # This **does not** change the behavior in protocol buffers itself; it only - # denotes the behavior and may affect how API tooling handles the field. - # - # Note: This enum **may** receive new values in the future. - module FieldBehavior - # Conventional default for enums. Do not use this. - FIELD_BEHAVIOR_UNSPECIFIED = 0 - - # Specifically denotes a field as optional. - # While all fields in protocol buffers are optional, this may be specified - # for emphasis if appropriate. - OPTIONAL = 1 - - # Denotes a field as required. - # This indicates that the field **must** be provided as part of the request, - # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). - REQUIRED = 2 - - # Denotes a field as output only. - # This indicates that the field is provided in responses, but including the - # field in a request does nothing (the server *must* ignore it and - # *must not* throw an error as a result of the field's presence). - OUTPUT_ONLY = 3 - - # Denotes a field as input only. - # This indicates that the field is provided in requests, and the - # corresponding field is not included in output. - INPUT_ONLY = 4 - - # Denotes a field as immutable. - # This indicates that the field may be set once in a request to create a - # resource, but may not be changed thereafter. - IMMUTABLE = 5 - - # Denotes that a (repeated) field is an unordered list. - # This indicates that the service may provide the elements of the list - # in any arbitrary order, rather than the order the user originally - # provided. Additionally, the list's order may or may not be stable. - UNORDERED_LIST = 6 - - # Denotes that this field returns a non-empty default value if not set. - # This indicates that if the user provides the empty value in a request, - # a non-empty value will be returned. The user will not be aware of what - # non-empty value to expect. - NON_EMPTY_DEFAULT = 7 - - # Denotes that the field in a resource (a message annotated with - # google.api.resource) is used in the resource name to uniquely identify the - # resource. For AIP-compliant APIs, this should only be applied to the - # `name` field on the resource. - # - # This behavior should not be applied to references to other resources within - # the message. - # - # The identifier field of resources often have different field behavior - # depending on the request it is embedded in (e.g. for Create methods name - # is optional and unused, while for Update methods it is required). Instead - # of method-specific annotations, only `IDENTIFIER` is required. - IDENTIFIER = 8 - end - end -end diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/api/launch_stage.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # The launch stage as defined by [Google Cloud Platform - # Launch Stages](https://cloud.google.com/terms/launch-stages). - module LaunchStage - # Do not use this default value. - LAUNCH_STAGE_UNSPECIFIED = 0 - - # The feature is not yet implemented. Users can not use it. - UNIMPLEMENTED = 6 - - # Prelaunch features are hidden from users and are only visible internally. - PRELAUNCH = 7 - - # Early Access features are limited to a closed group of testers. To use - # these features, you must sign up in advance and sign a Trusted Tester - # agreement (which includes confidentiality provisions). These features may - # be unstable, changed in backward-incompatible ways, and are not - # guaranteed to be released. - EARLY_ACCESS = 1 - - # Alpha is a limited availability test for releases before they are cleared - # for widespread use. By Alpha, all significant design issues are resolved - # and we are in the process of verifying functionality. Alpha customers - # need to apply for access, agree to applicable terms, and have their - # projects allowlisted. Alpha releases don't have to be feature complete, - # no SLAs are provided, and there are no technical support obligations, but - # they will be far enough along that customers can actually use them in - # test environments or for limited-use tests -- just like they would in - # normal production cases. - ALPHA = 2 - - # Beta is the point at which we are ready to open a release for any - # customer to use. There are no SLA or technical support obligations in a - # Beta release. Products will be complete from a feature perspective, but - # may have some open outstanding issues. Beta releases are suitable for - # limited production use cases. - BETA = 3 - - # GA features are open to all developers and are considered stable and - # fully qualified for production use. - GA = 4 - - # Deprecated features are scheduled to be shut down and removed. For more - # information, see the "Deprecation Policy" section of our [Terms of - # Service](https://cloud.google.com/terms/) - # and the [Google Cloud Platform Subject to the Deprecation - # Policy](https://cloud.google.com/terms/deprecation) documentation. - DEPRECATED = 5 - end - end -end diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/api/resource.rb +++ /dev/null @@ -1,227 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # A simple descriptor of a resource type. - # - # ResourceDescriptor annotates a resource message (either by means of a - # protobuf annotation or use in the service config), and associates the - # resource's schema, the resource type, and the pattern of the resource name. - # - # Example: - # - # message Topic { - # // Indicates this message defines a resource schema. - # // Declares the resource type in the format of {service}/{kind}. - # // For Kubernetes resources, the format is {api group}/{kind}. - # option (google.api.resource) = { - # type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # - # Sometimes, resources have multiple patterns, typically because they can - # live under multiple parents. - # - # Example: - # - # message LogEntry { - # option (google.api.resource) = { - # type: "logging.googleapis.com/LogEntry" - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: 'logging.googleapis.com/LogEntry' - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # @!attribute [rw] type - # @return [::String] - # The resource type. It must be in the format of - # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be - # singular and must not include version numbers. - # - # Example: `storage.googleapis.com/Bucket` - # - # The value of the resource_type_kind must follow the regular expression - # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and - # should use PascalCase (UpperCamelCase). The maximum number of - # characters allowed for the `resource_type_kind` is 100. - # @!attribute [rw] pattern - # @return [::Array<::String>] - # Optional. The relative resource name pattern associated with this resource - # type. The DNS prefix of the full resource name shouldn't be specified here. - # - # The path pattern must follow the syntax, which aligns with HTTP binding - # syntax: - # - # Template = Segment { "/" Segment } ; - # Segment = LITERAL | Variable ; - # Variable = "{" LITERAL "}" ; - # - # Examples: - # - # - "projects/\\{project}/topics/\\{topic}" - # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" - # - # The components in braces correspond to the IDs for each resource in the - # hierarchy. It is expected that, if multiple patterns are provided, - # the same component name (e.g. "project") refers to IDs of the same - # type of resource. - # @!attribute [rw] name_field - # @return [::String] - # Optional. The field on the resource that designates the resource name - # field. If omitted, this is assumed to be "name". - # @!attribute [rw] history - # @return [::Google::Api::ResourceDescriptor::History] - # Optional. The historical or future-looking state of the resource pattern. - # - # Example: - # - # // The InspectTemplate message originally only supported resource - # // names with organization, and project was added later. - # message InspectTemplate { - # option (google.api.resource) = { - # type: "dlp.googleapis.com/InspectTemplate" - # pattern: - # "organizations/{organization}/inspectTemplates/{inspect_template}" - # pattern: "projects/{project}/inspectTemplates/{inspect_template}" - # history: ORIGINALLY_SINGLE_PATTERN - # }; - # } - # @!attribute [rw] plural - # @return [::String] - # The plural name used in the resource name and permission names, such as - # 'projects' for the resource name of 'projects/\\{project}' and the permission - # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception - # to this is for Nested Collections that have stuttering names, as defined - # in [AIP-122](https://google.aip.dev/122#nested-collections), where the - # collection ID in the resource name pattern does not necessarily directly - # match the `plural` value. - # - # It is the same concept of the `plural` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # - # Note: The plural form is required even for singleton resources. See - # https://aip.dev/156 - # @!attribute [rw] singular - # @return [::String] - # The same concept of the `singular` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # Such as "project" for the `resourcemanager.googleapis.com/Project` type. - # @!attribute [rw] style - # @return [::Array<::Google::Api::ResourceDescriptor::Style>] - # Style flag(s) for this resource. - # These indicate that a resource is expected to conform to a given - # style. See the specific style flags for additional information. - class ResourceDescriptor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A description of the historical or future-looking state of the - # resource pattern. - module History - # The "unset" value. - HISTORY_UNSPECIFIED = 0 - - # The resource originally had one pattern and launched as such, and - # additional patterns were added later. - ORIGINALLY_SINGLE_PATTERN = 1 - - # The resource has one pattern, but the API owner expects to add more - # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents - # that from being necessary once there are multiple patterns.) - FUTURE_MULTI_PATTERN = 2 - end - - # A flag representing a specific style that a resource claims to conform to. - module Style - # The unspecified value. Do not use. - STYLE_UNSPECIFIED = 0 - - # This resource is intended to be "declarative-friendly". - # - # Declarative-friendly resources must be more strictly consistent, and - # setting this to true communicates to tools that this resource should - # adhere to declarative-friendly expectations. - # - # Note: This is used by the API linter (linter.aip.dev) to enable - # additional checks. - DECLARATIVE_FRIENDLY = 1 - end - end - - # Defines a proto annotation that describes a string field that refers to - # an API resource. - # @!attribute [rw] type - # @return [::String] - # The resource type that the annotated field references. - # - # Example: - # - # message Subscription { - # string topic = 2 [(google.api.resource_reference) = { - # type: "pubsub.googleapis.com/Topic" - # }]; - # } - # - # Occasionally, a field may reference an arbitrary resource. In this case, - # APIs use the special value * in their resource reference. - # - # Example: - # - # message GetIamPolicyRequest { - # string resource = 2 [(google.api.resource_reference) = { - # type: "*" - # }]; - # } - # @!attribute [rw] child_type - # @return [::String] - # The resource type of a child collection that the annotated field - # references. This is useful for annotating the `parent` field that - # doesn't have a fixed resource type. - # - # Example: - # - # message ListLogEntriesRequest { - # string parent = 1 [(google.api.resource_reference) = { - # child_type: "logging.googleapis.com/LogEntry" - # }; - # } - class ResourceReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/cloud/commerceproducer/v1beta/commerce_transaction.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/cloud/commerceproducer/v1beta/commerce_transaction.rb deleted file mode 100644 index 0eeb3ecd914f..000000000000 --- a/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/cloud/commerceproducer/v1beta/commerce_transaction.rb +++ /dev/null @@ -1,533 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module CommerceProducer - module V1beta - # Message for requesting list of PrivateOffers - # @!attribute [rw] parent - # @return [::String] - # Required. Parent value for ListPrivateOffersRequest - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Maximum results to return. The service may return fewer than this - # value. The maximum value is 500; values above 500 will be coerced to 500. - # If unspecified, the server will default to the maximum. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous list response message. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters of the list request must match the - # request that returned the page token. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filter expression that matches a subset of resources to show. - # See https://google.aip.dev/160 for more details. - # Only supports filtering by: - # - # * `update_time`. Example: `update_time > "2012-04-21T11:30:00-04:00"`. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Ordering expression for sorting the results. - # See https://google.aip.dev/132#ordering for more details. - # If no value is present the default ordering is unspecified. - # Only supports ordering by: - # - # * `update_time` - class ListPrivateOffersRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for response to listing PrivateOffers - # @!attribute [rw] private_offers - # @return [::Array<::Google::Cloud::CommerceProducer::V1beta::PrivateOffer>] - # The list of PrivateOffer - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListPrivateOffersResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for getting a PrivateOffer - # @!attribute [rw] name - # @return [::String] - # Required. Name of the resource - # @!attribute [rw] view - # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOfferView] - # Optional. The view of the PrivateOffer to return. - # If unspecified, the default view is BASIC. - class GetPrivateOfferRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for resolving an amended offer. - # @!attribute [rw] parent - # @return [::String] - # Required. Parent value for ResolveAmendmentTargetRequest - # @!attribute [rw] target_billing_account - # @return [::String] - # Required. The customer's billing account targeted by the offer. This is the - # billing account for which the new private offer will be created on. Format: - # billingAccounts/\\{billing_account}. - # @!attribute [rw] base_standard_offer - # @return [::String] - # Required. The base standard offer that the private offer will be based on. - # Format: - # projects/\\{project}/locations/\\{location}/services/\\{service}/standardOffers/\\{standard_offer}. - class ResolveAmendmentTargetRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message in response to ResolveAmendmentTarget. - # @!attribute [rw] required_private_offer - # @return [::String] - # The resource name of an existing private offer that MUST be amended. - # - # If this is set, the new private offer the client creates must populate - # the `single_product_offer.amended_private_offer` field with this value. - # - # Note: The following fields are mutually exclusive: `required_private_offer`, `required_standard_offer`, `optional_offers`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] required_standard_offer - # @return [::String] - # The resource name of an existing standard offer that MUST be amended. - # - # If this is set, the new private offer the client creates must populate - # the `single_product_offer.amended_standard_offer` field with this value. - # - # Note: The following fields are mutually exclusive: `required_standard_offer`, `required_private_offer`, `optional_offers`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] optional_offers - # @return [::Google::Cloud::CommerceProducer::V1beta::ResolveAmendmentTargetResponse::OptionalOffers] - # A list of existing offers that may optionally be amended. - # - # Note: The following fields are mutually exclusive: `optional_offers`, `required_private_offer`, `required_standard_offer`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class ResolveAmendmentTargetResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A wrapper message containing offers that can optionally be amended. - # @!attribute [rw] private_offers - # @return [::Array<::String>] - # A list of existing private offers that are eligible to be amended. - # - # When creating a new private offer, the client may choose to populate the - # `single_product_offer.amended_private_offer` field with one of these - # resource names. Alternatively, the client may leave the field unset to - # create a brand new offer. - class OptionalOffers - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Message for creating a PrivateOffer - # @!attribute [rw] parent - # @return [::String] - # Required. Value for parent. - # @!attribute [rw] private_offer - # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer] - # Required. The resource being created - class CreatePrivateOfferRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for updating a PrivateOffer - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. The list of fields to update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. - # The special value "*" means full replacement. - # If unspecified, all fields present in the request will be overwritten. - # @!attribute [rw] private_offer - # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer] - # Required. The resource being updated - class UpdatePrivateOfferRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for publishing a PrivateOffer - # @!attribute [rw] name - # @return [::String] - # Required. Name of the resource - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set to `true`, validates the request but does not execute it. - class PublishPrivateOfferRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for cancelling a PrivateOffer - # @!attribute [rw] name - # @return [::String] - # Required. Name of the resource - # @!attribute [rw] cancellation_note - # @return [::String] - # Optional. Internal note relating to the cancellation. - # Stored on the cancelled offer. Not visible to customers. - class CancelPrivateOfferRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for deleting a PrivateOffer - # @!attribute [rw] name - # @return [::String] - # Required. Name of the resource - # @!attribute [rw] force - # @return [::Boolean] - # Optional. Indicates whether to cascade the delete to child resources. - # If false, the request fails if child resources exist. - class DeletePrivateOfferRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for requesting list of PrivateOfferDocuments - # @!attribute [rw] parent - # @return [::String] - # Required. Parent value for ListPrivateOfferDocumentsRequest. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Maximum results to return. The service may return fewer than this - # value. The maximum value is 500; values above 500 will be coerced to 500. - # If unspecified, the server will default to the maximum. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous list response message. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters of the list request must match the - # request that returned the page token. - class ListPrivateOfferDocumentsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for response to listing PrivateOfferDocuments - # @!attribute [rw] private_offer_documents - # @return [::Array<::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument>] - # The list of PrivateOfferDocuments. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListPrivateOfferDocumentsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for getting a PrivateOfferDocument - # @!attribute [rw] name - # @return [::String] - # Required. Name of the resource. - class GetPrivateOfferDocumentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for creating a PrivateOfferDocument. - # @!attribute [rw] parent - # @return [::String] - # Required. Value for parent. - # @!attribute [rw] private_offer_document - # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument] - # Required. The resource being created. - class CreatePrivateOfferDocumentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for updating a PrivateOfferDocument - # @!attribute [rw] private_offer_document - # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument] - # Required. The resource being updated. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. The list of fields to update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. - # The special value "*" means full replacement. - # If unspecified, all fields present in the request will be overwritten. - class UpdatePrivateOfferDocumentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for deleting a PrivateOfferDocument - # @!attribute [rw] name - # @return [::String] - # Required. Name of the resource. - class DeletePrivateOfferDocumentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for requesting list of Services - # @!attribute [rw] parent - # @return [::String] - # Required. Parent value for ListServicesRequest - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Maximum results to return. The service may return fewer than this - # value. The maximum value is 500; values above 500 will be coerced to 500. - # If unspecified, the server will default to the maximum. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A token identifying a page of results the server should return. - class ListServicesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for response to listing Services - # @!attribute [rw] services - # @return [::Array<::Google::Cloud::CommerceProducer::V1beta::Service>] - # The list of Service - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListServicesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for getting a Service - # @!attribute [rw] name - # @return [::String] - # Required. Name of the resource - # @!attribute [rw] view - # @return [::Google::Cloud::CommerceProducer::V1beta::ServiceView] - # Optional. The view of the Service to return. - # If unspecified, the default view is BASIC. - class GetServiceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for requesting list of StandardOffers - # @!attribute [rw] parent - # @return [::String] - # Required. Parent value for ListStandardOffersRequest - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Maximum results to return. The service may return fewer than this - # value. The maximum value is 500; values above 500 will be coerced to 500. - # If unspecified, the server will default to the maximum. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous list response message. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters of the list request must match the - # request that returned the page token. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filter expression that matches a subset of resources to show. - # See https://google.aip.dev/160 for more details. - # Supports filtering by: - # - # * `effective_time`. - # Example: `effective_time > "2012-04-21T11:30:00-04:00"`. - # * `expire_time`. Example: `expire_time < "2026-05-06T00:00:00Z"`. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Ordering expression for sorting the results. - # See https://google.aip.dev/132#ordering for more details. - # If no value is present the default ordering is unspecified. - # Supports ordering by: - # - # * `effective_time` - # * `expire_time` - class ListStandardOffersRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for response to listing StandardOffers - # @!attribute [rw] standard_offers - # @return [::Array<::Google::Cloud::CommerceProducer::V1beta::StandardOffer>] - # The list of StandardOffer - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListStandardOffersResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for getting a StandardOffer - # @!attribute [rw] name - # @return [::String] - # Required. Name of the resource - # @!attribute [rw] view - # @return [::Google::Cloud::CommerceProducer::V1beta::StandardOfferView] - # Optional. The view of the StandardOffer to return. - # If unspecified, the default view is BASIC. - class GetStandardOfferRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for requesting list of Skus - # @!attribute [rw] parent - # @return [::String] - # Required. Parent value for ListSkusRequest - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Maximum results to return. The service may return fewer than this - # value. The maximum value is 500; values above 500 will be coerced to 500. - # If unspecified, the server will default to the maximum. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous list response message. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters of the list request must match the - # request that returned the page token. - class ListSkusRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for response to listing Skus - # @!attribute [rw] skus - # @return [::Array<::Google::Cloud::CommerceProducer::V1beta::Sku>] - # The list of Sku - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListSkusResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for getting a Sku - # @!attribute [rw] name - # @return [::String] - # Required. Name of the resource - class GetSkuRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for getting a SkuGroup - # @!attribute [rw] name - # @return [::String] - # Required. Name of the resource - class GetSkuGroupRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for requesting list of SkuGroups - # @!attribute [rw] parent - # @return [::String] - # Required. Parent value for ListSkuGroupsRequest - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Maximum results to return. The service may return fewer than this - # value. The maximum value is 500; values above 500 will be coerced to 500. - # If unspecified, the server will default to the maximum. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous list response message. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters of the list request must match the - # request that returned the page token. - class ListSkuGroupsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for response to listing SkuGroups - # @!attribute [rw] sku_groups - # @return [::Array<::Google::Cloud::CommerceProducer::V1beta::SkuGroup>] - # The list of SkuGroup - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - class ListSkuGroupsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Controls which fields are returned in a PrivateOffer returned by the API. - # https://google.aip.dev/157 - module PrivateOfferView - # The default / unset value. - # The API will default to the BASIC view. - PRIVATE_OFFER_VIEW_UNSPECIFIED = 0 - - # Include basic metadata about the PrivateOffer, but not the full contents. - # This is the default value (for both List and Get requests). - PRIVATE_OFFER_VIEW_BASIC = 1 - - # Include everything. - PRIVATE_OFFER_VIEW_FULL = 2 - end - - # Controls which fields are returned in a StandardOffer returned by the API. - # https://google.aip.dev/157 - module StandardOfferView - # The default / unset value. - # The API will default to the BASIC view. - STANDARD_OFFER_VIEW_UNSPECIFIED = 0 - - # Include basic metadata about the StandardOffer, but not the full contents. - # This is the default value (for both List and Get requests). - STANDARD_OFFER_VIEW_BASIC = 1 - - # Include everything. - STANDARD_OFFER_VIEW_FULL = 2 - end - - # Controls which fields are returned in a Service returned by the API. - # https://google.aip.dev/157 - module ServiceView - # The default / unset value. - # The API will default to the BASIC view. - SERVICE_VIEW_UNSPECIFIED = 0 - - # Include basic metadata about the Service, but not the full contents. - # This is the default value (for both List and Get requests). - SERVICE_VIEW_BASIC = 1 - - # Include everything. - SERVICE_VIEW_FULL = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/cloud/commerceproducer/v1beta/private_offer.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/cloud/commerceproducer/v1beta/private_offer.rb deleted file mode 100644 index 87b0eb5b580b..000000000000 --- a/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/cloud/commerceproducer/v1beta/private_offer.rb +++ /dev/null @@ -1,1189 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module CommerceProducer - module V1beta - # Message describing PrivateOffer resource. - # - # Note on OPTIONAL fields: To facilitate saving incomplete draft offers, most - # fields are categorized as OPTIONAL irrespective of whether they are necessary - # for a private offer to be valid. Many fields labeled OPTIONAL must be set to - # publish the offer. - # @!attribute [rw] single_product_offer - # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer::SingleProductOffer] - # Optional. Configurations for the offer that is associated with a single - # product. - # @!attribute [rw] name - # @return [::String] - # Identifier. Name of the resource. - # @!attribute [r] state - # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer::State] - # Output only. The state of the private offer. - # @!attribute [r] publish_requirement_google_review - # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer::PublishRequirementGoogleReview] - # Output only. Information about the Google review process. - # Present only when the offer is determined to require review by Google. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The creation time. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The last update time. - # @!attribute [r] publish_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time the offer transitioned to PUBLISHED state. - # @!attribute [r] accept_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time the offer transitioned to ACCEPTED state. - # @!attribute [r] cancel_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time the offer transited to CANCELLED state. - # @!attribute [r] end_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the offer ended. This can only be set for offers - # with `ENDED` state. - # @!attribute [r] cancellation_note - # @return [::String] - # Output only. Internal note supplied when the offer was cancelled. - # Present only for cancelled offers and only if a note was supplied. - # @!attribute [r] reseller_contact - # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer::ResellerContact] - # Output only. Information about the reseller contact. - # Present only for offers created by a reseller. - # @!attribute [rw] internal_note - # @return [::String] - # Optional. Unstructured text content that is not visible to the customer. - # Intended to be used by partners for storing notes about the private offer. - # Maximum length: 1500 characters. - # @!attribute [rw] offer_deal_type - # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer::OfferDealType] - # Optional. The type of the deal transacted with the offer. - # - # The deal type is not visible to customers. - # - # Must be present to publish the offer. - # @!attribute [rw] title - # @return [::String] - # Optional. A title that describes the offer and helps your customers - # identify it. This title will be visible to the customer. Maximum length: - # 256 characters. Must be present to publish the offer. - # @!attribute [rw] customer_note - # @return [::String] - # Optional. Unstructured text content that is visible to the customer. - # Maximum length: 120 characters. - # @!attribute [rw] partner_contact - # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer::PartnerContact] - # Optional. Information about the partner contact. - # Must be provided when publishing the offer. - # @!attribute [rw] customer - # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer::Customer] - # Optional. Information identifying the intended recipient of the offer. - # Must be provided when publishing the offer. - # @!attribute [rw] accept_deadline_time - # @return [::Google::Type::DateTime] - # Optional. Deadline for acceptance of published offers. - # A published offer not accepted by this time will expire. - # Only day boundaries in the America/Los_Angeles time zone are supported. - # Must be present to publish the offer. - # - # When publishing an offer the deadline must be set to a time in the future - # not more than 3 months from the time of publishing. For example, if the - # offer is published on 03/05 at 1PM, then the deadline must be at or before - # 06/05 12AM America/Los_Angeles time. - # - # The deadline must also be: - # - # * Before or equal to the scheduled start time of this offer (if - # `term.scheduled_start_time` is set and the term's start policy is - # `SCHEDULED_START_TIME`). - # * Before or equal to the scheduled end time of this offer, if - # `term.scheduled_end_time` is set and the term's end policy is - # `SCHEDULED_END_TIME`. - # * Before or equal to the upcoming installment start times on this offer. - # * Before or equal to the amended offer's end time, if the offer amends - # another private or standard offer. - # * Before or equal to the start time of the next pending installment of the - # amended offer, if amending a private offer with custom installments. For - # example, if the amended offer has installments on 01/01, 02/01, 03/01, - # 04/01, and today is 02/15, then this offer's `accept_deadline_time` - # must be at or before 03/01. - # - # In addition, if the offer amends another private offer, but there is - # already an accepted upcoming amendment against that private offer, then - # this deadline must be before or equal to the start time of the accepted - # upcoming offer. - # For example, today is 02/15, and this offer (offer C) amends private offer - # A, and private offer B has already been accepted which also amends private - # offer A. Private offer B has a start time of 03/01. Then this deadline - # must be at or before 03/01. Otherwise, on 03/01, private offer B would - # take effect, superseding offer A. This would mean offer C is no longer - # amending the currently active offer (Offer A), which is required for - # valid amendments. - # - # Once the offer is published, this field is still updatable to extend the - # deadline of the offer. However, the extension is still limited to be - # at most 3 months from the time of publishing. - # @!attribute [rw] term - # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer::Term] - # Optional. Configuration for the offer term. - # Must be set when publishing the offer. - class PrivateOffer - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Information about the Google review process. - # @!attribute [r] review_approve_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The approval time of the Google review process. - class PublishRequirementGoogleReview - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Contact information for a reseller. - # @!attribute [r] contact - # @return [::String] - # Output only. The name of the reseller contact for this offer. - # @!attribute [r] email - # @return [::String] - # Output only. The email of the reseller contact for this offer. - class ResellerContact - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Contact information for the partner representative. - # @!attribute [rw] contact - # @return [::String] - # Optional. Display text identifying the partner sales contact. - # Displayed to the customer. - # Must be provided when publishing the offer. - # Maximum length: 256 characters. - # @!attribute [rw] email - # @return [::String] - # Optional. The email address of the partner sales contact. - # Displayed to the customer. - # The format of the provided email address is validated when publishing the - # offer, but no verification is performed that the email address actually - # exists, accepts email, or is otherwise functional. - class PartnerContact - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Information about the customer. - # @!attribute [rw] entity_title - # @return [::String] - # Optional. A string identifying the customer's entity (for example, the - # customer's organization or company name). Must be provided when - # publishing the offer. Maximum length: 256 characters. - # @!attribute [rw] contact - # @return [::String] - # Optional. A string identifying the customer contact. - # Must be provided when publishing the offer. - # Maximum length: 256 characters. - # @!attribute [rw] email - # @return [::String] - # Optional. Email of customer contact. - # If provided, it must be a well-formed email address. - # @!attribute [r] address - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Output only. Legal address of the customer organization. - # This field can no longer be set, but it is preserved to return the - # data from existing offers where address is set. - # @!attribute [rw] target_billing_account - # @return [::String] - # Optional. The customer's billing account targeted by the offer. - # The private offer once published can be accepted by a billing - # administrator of the target billing account. If the customer accepts the - # offer and later moves the resulting order to a new billing account, this - # field will continue to reflect the original billing account to which the - # private offer was extended. Must be provided when publishing the offer. - # - # To publish this private offer: - # - # * The billing account must exist. - # * The billing account must not be in a free trial. - # * The billing account must comply with Marketplace Reselling Policies. - # * Reseller parent billing accounts are prohibited. Reseller subaccounts - # are prohibited unless the service is enabled for reselling. - # - # Format: billingAccounts/012345-567890-ABCDEF - class Customer - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Configurations for the offer term and renewal options. - # Extending a private offer to a customer that covers a given term - # constitutes a guarantee to the customer that the product will remain - # available to them for the duration of the term. - # @!attribute [rw] duration_months - # @return [::Integer] - # Optional. Duration in months of the offer term. - # The offer will end on the same day of the month after this duration. If - # that date is not available, the offer will end on the last day of the - # month. For example, if the offer starts on 01/31/2024 and the duration - # is 13 months, the offer will end on 02/28/2025. - # Must be set to publish the offer if the end policy is `AFTER_DURATION` - # or `MATCH_AMENDED_OFFER`, and must be a positive value. - # - # The maximum possible offer duration, including all renewal terms, - # cannot exceed 7 years. For example, if `duration_months` is 9 and - # `term.max_renewal_count` is 9, then the maximum possible offer duration - # is 90 months and exceeds the 7 year limit. - # - # Note: The following fields are mutually exclusive: `duration_months`, `scheduled_end_time`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] scheduled_end_time - # @return [::Google::Type::DateTime] - # Optional. Specified end time of the offer. - # Must be set to publish the offer if the end policy is - # `SCHEDULED_END_TIME`. - # When set, the time must be in the future and at a day boundary in the - # America/Los_Angeles time zone, and must be after - # `term.scheduled_start_time` if applicable. - # - # Note: The following fields are mutually exclusive: `scheduled_end_time`, `duration_months`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] max_renewal_count - # @return [::Integer] - # Optional. The max number of renewals allowed, after the initial term - # ends. This field is only relevant to standard interval offers with - # interval of 'MONTHLY_PRORATED', 'MONTHLY_NOT_PRORATED', - # 'QUARTERLY_NOT_PRORATED' or 'YEARLY_NOT_PRORATED'. Other types of - # offers cannot be renewed. - # - # For example, if the initial term is 1 year and the max renewals is 3, - # the customer can renew the offer for up to 3 additional years after the - # initial term ends. Customers control whether they renew the offer. - # - # Allowing a customer to renew an offer does not constitute a guarantee - # to the customer that the offered product will still be available to be - # renewed at the renewal date. - # - # An offer with a max renewal count of 0 cannot be renewed. - # Must be non-negative. - # - # Note: The following fields are mutually exclusive: `max_renewal_count`, `unlimited_renewal`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] unlimited_renewal - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Boolean] - # Output only. Deprecated: This field can only be true on existing offers - # with standard interval of 'MONTHLY_POSTPAY'. As of May 2024, we no - # longer allow unlimited renewals. - # - # Note: The following fields are mutually exclusive: `unlimited_renewal`, `max_renewal_count`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] start_policy - # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer::Term::StartPolicy] - # Optional. Defines when the resulting order should start. - # Must be set when publishing the offer. - # @!attribute [rw] scheduled_start_time - # @return [::Google::Type::DateTime] - # Optional. The scheduled start time of the offer. Cannot exceed one year - # from the time of publish. - # - # If the start policy is `SCHEDULED_START_TIME`, a future time at a day - # boundary in the America/Los_Angeles time zone must be provided when - # publishing the offer. - # - # If the offer amends another private or standard offer, then the - # scheduled start time must be: - # - # * Before or equal to the amended offer's end time if the offer's - # end policy is not MATCH_AMENDED_OFFER. Otherwise, it has to be - # strictly before the amended offer's end time. - # * Before or equal to the start time of the next pending installment of - # the amended offer, if amending a private offer with custom - # installments. For example, if the amended offer has installments on - # 01/01, 02/01, 03/01, 04/01, and today is 02/15, then the new offer's - # `scheduled_start_time` must be at or before 03/01. - # @!attribute [rw] end_policy - # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer::Term::EndPolicy] - # Optional. Defines when an offer should end. - # Must be set when publishing the offer. - # @!attribute [r] effective_term_end_time - # @return [::Google::Type::DateTime] - # Output only. The expected end time of the current offer term. - # - # At the end of each offer term, an offer associated with an active - # order will either renew or end. When an offer renews, a new term begins - # and this value changes to reflect the end time of the new term. - # When an offer ends this value is no longer set and instead `end_time` is - # set. - # - # When the term of an offer ends and the offer does not renew, the - # associated order also ends if the base standard offer has a - # subscription price model. Otherwise, the associated order does not end - # and remains active. - # - # Not included for PRIVATE_OFFER_VIEW_BASIC. - # Included for PRIVATE_OFFER_VIEW_FULL when the offer has not ended and - # either the offer has started or the value can be derived from other - # fields. - # - # For offers that have not started, this field is set when one of the - # following conditions is true. - # - # * The offer sets `term.scheduled_end_time`. - # * The offer sets `term.scheduled_start_time` and `term.duration_months`, - # the offer's `term.end_policy` is not `MATCH_AMENDED_OFFER`, and the - # offer does not have standard_interval set to `MONTHLY_POSTPAY`. - class Term - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Defines when an offer should start. - module StartPolicy - # Default value. This value is unused. - START_POLICY_UNSPECIFIED = 0 - - # The resulting order starts immediately upon the customer's acceptance - # of the offer, if no partner approval is required, or else immediately - # after the partner approves the purchase if order approval is required. - # This enum value cannot be combined with `term.scheduled_start_time`. - IMMEDIATE = 1 - - # The resulting order starts at the scheduled start time. - SCHEDULED_START_TIME = 2 - end - - # Defines when an offer should end. - module EndPolicy - # Default value. This value is unused. - END_POLICY_UNSPECIFIED = 0 - - # Offer ends after the specified duration. - # If this is set, then `duration_months` must be positive. - AFTER_DURATION = 1 - - # Offer ends at the schduled time. - SCHEDULED_END_TIME = 2 - - # Offer coterms to the amended offer - the offer ends at the end of the - # amended offer's term - # - # For example, if the amended offer starts on 01/15/24, and has a - # duration of 6 months, then it ends on 07/15/24. If the current offer - # coterms to the previous offer, and the current offer starts on - # 05/06/24, then it will still end on 07/15/24. Assuming the current - # offer renews 3 times, then the terms on the current offer will be: - # - # 1. 05/06/24 - 07/15/24 (First term, ends on 07/15 to coterm with the - # amended offer) - # 2. 07/15/24 - 01/15/25 (First renewal term) - # 3. 01/15/25 - 07/15/25 (Second renewal term) - # 4. 07/15/25 - 01/15/26 (Third renewal term) - # - # As a contrast, if the current offer does not coterm with the amended - # offer (such as when `end_policy` is `AFTER_DURATION`), then the - # terms will be: - # - # 1. 05/06/24 - 11/06/24 (First term, ends on 11/06, no coterming) - # 2. 11/06/24 - 05/06/25 (First renewal term) - # 3. 05/06/25 - 11/06/25 (Second renewal term) - # 4. 11/06/25 - 05/06/26 (Third renewal term) - # - # If this is set, then the following conditions must be met: - # - # * `single_product_offer.amended_private_offer` must be set, and the - # amended private offer must not be ended. - # * The proration policy must not change (e.g., you cannot switch - # between `MONTHLY_PRORATED` and `MONTHLY_NOT_PRORATED`). - # * The current offer must not have custom intervals (where - # `custom_interval_price` is set). - # * `term.duration_months` must match the amended private offer's - # duration. - # * The amended private offer must not have a standard interval - # of `MONTHLY_POSTPAY`. - # - # This is currently not supported. - MATCH_AMENDED_OFFER = 3 - end - end - - # Configurations for the offer that is associated with a single product. - # @!attribute [rw] amended_private_offer - # @return [::String] - # Optional. An existing private offer that will be superseded by this - # offer. Unless the private offer is for a product type that supports - # [multiple active - # orders](https://cloud.google.com/marketplace/docs/partners/offers/multiple-offers), - # an amendment private offer must be transacted if and only if the - # destination customer billing account already contains an active order - # for the same product. The offer to be superseded must be the offer - # associated with an active order. - # - # Amendments generally fall into one of two scenarios: - # - # 1. **Active Order / Ended Offer**: The term of the amended offer has - # ended but it is still associated with an active order. The new - # offer must amend the ended private offer. - # 2. **Active Order / Active Offer**: The term of the amended offer is - # still active and the associated order is active. Similar to above, - # the new offer must amend the currently active offer (unless - # "multiple active orders" are supported). - # - # If this is set, then the `base_standard_offer` parent service must - # match the parent service of the `base_standard_offer` in the - # `amended_private_offer`. - # - # **Active Term Restrictions**: - # If the term of the amended private offer has *NOT* ended, then the - # following compatibility rules apply: - # - # * **Price Model Compatibility**: - # * Flat Fee (with or without usage) offers can amend Flat Fee - # offers. - # * Usage-only or CUD offers can amend usage-only offers. - # * Commitment-based offers must amend offers of the same price - # model subtype (e.g., "additional usage at list price" vs "all - # usage discounted"). - # * **Billing Frequency Compatibility**: Determined by - # `standard_interval` or `custom_interval_price`. - # * If the amended offer has a custom billing frequency, the new - # offer must also have a custom frequency. - # * If the amended offer has a standard frequency (Monthly, - # Quarterly, or Yearly), the new offer must maintain the same - # frequency or transition to a custom frequency. - # * Switching between different standard frequencies (e.g., Monthly - # to Quarterly) is not supported. - # * For Monthly frequency, switching between `MONTHLY_PRORATED` - # and `MONTHLY_NOT_PRORATED` is supported, unless the offer's - # `term.end_policy` is `MATCH_AMENDED_OFFER`. - # * For usage-only offers, there are no billing frequency - # restrictions. - # - # Other criteria for offer amendment are detailed elsewhere. - # - # Note: The following fields are mutually exclusive: `amended_private_offer`, `amended_standard_offer`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] amended_standard_offer - # @return [::String] - # Optional. An existing standard offer that will be superseded by this - # offer. An amendment private offer must be transacted if the destination - # customer billing account already contains an active order for the same - # product, and otherwise cannot be transacted. The offer to be superseded - # must be the offer associated with the active order. - # - # If this is set, then the `base_standard_offer` must contain the same - # parent service as the parent service of the `amended_standard_offer`. - # The price model of this offer must be compatible with the price model - # of the `amended_standard_offer`: - # - # * Flat Fee, or Flat Fee with usage offers can amend Flat Fee or Flat - # Fee with usage standard offers. - # * Usage-only offers, or CUD offers can amend usage-only standard - # offers. - # - # Other criteria for offer amendment are detailed elsewhere. - # - # Note: The following fields are mutually exclusive: `amended_standard_offer`, `amended_private_offer`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] standard_interval_price - # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer::SingleProductOffer::StandardIntervalPrice] - # Optional. Price configurations for offers with standard intervals. - # A price must be set when publishing the offer. - # - # Note: The following fields are mutually exclusive: `standard_interval_price`, `custom_interval_price`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] custom_interval_price - # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer::SingleProductOffer::CustomIntervalPrice] - # Optional. Price configurations for offers with custom intervals. - # Custom interval corresponds to "custom billing frequency", - # see - # https://docs.cloud.google.com/marketplace/docs/partners/offers/select-payment-schedule. - # A price must be set when publishing the offer. - # - # Note: The following fields are mutually exclusive: `custom_interval_price`, `standard_interval_price`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] base_standard_offer - # @return [::String] - # Optional. The StandardOffer this PrivateOffer is based on. - # Must be in the same project as the private offer, and must be effective - # at the time of publishing. Must be present to publish the offer. - # - # Format: - # projects/\\{project}/locations/\\{location}/services/\\{service}/standardOffers/\\{standard_offer} - # @!attribute [r] service_level - # @return [::String] - # Output only. The service level (also known as the 'plan') of the base - # standard offer. The value is populated at publish time from the base - # standard offer. - # @!attribute [r] reseller_private_offer_plan_id - # @return [::String] - # Output only. Present for offers created by a reseller from a reseller - # private offer plan (RPOP). When set, contains the ID of the originating - # RPOP. Not included for `PRIVATE_OFFER_VIEW_BASIC`. - # @!attribute [rw] features - # @return [::Array<::Google::Cloud::CommerceProducer::V1beta::PrivateOffer::SingleProductOffer::Feature>] - # Optional. The custom product features to display for this offer. - # Feature `display_name` values must be unique to publish the offer. - # The set of features specified here should generally include all features - # included in the base service level, with optionally customized values, - # but is not required to match exactly and may include additional features. - # @!attribute [r] effective_installment_timeline - # @return [::Array<::Google::Cloud::CommerceProducer::V1beta::PrivateOffer::SingleProductOffer::Installment>] - # Output only. The effective installment timeline of the offer. - # Not included for `PRIVATE_OFFER_VIEW_BASIC`. - # Included for `PRIVATE_OFFER_VIEW_FULL` if all necessary information is - # available to generate the timeline, and if the offer has - # 'standard_interval_price' of 'MONTHLY_PRORATED', 'MONTHLY_NOT_PRORATED', - # 'QUARTERLY_NOT_PRORATED', or 'YEARLY_NOT_PRORATED'. - # @!attribute [r] contract_value - # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer::SingleProductOffer::ContractValue] - # Output only. Contract value of the offer. - # Not included for `PRIVATE_OFFER_VIEW_BASIC`. - # @!attribute [r] revenue_share - # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer::SingleProductOffer::RevenueShare] - # Output only. Revenue share information for this Private Offer. - # Not included for `PRIVATE_OFFER_VIEW_BASIC`. - # @!attribute [rw] additional_contract_value - # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer::SingleProductOffer::AdditionalContractValue] - # Optional. Additional contract value that the customer is legally - # obligated to spend on the product over the duration of the offer. - class SingleProductOffer - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Additional details used to describe customization of the service level. - # - # Features are used to distinguish service levels of the same product. - # When a product has a single service level, all details can be contained - # in the product documentation. When a product has multiple service levels, - # each service level can be assigned a distinct set of features to - # distinguish the key differences between the service levels. - # - # In addition to customizing pricing and other transaction details, a - # private offer may include customization of partner-managed product - # behavior. When this is the case, the details of the custom behavior are - # described using features. - # @!attribute [rw] display_name - # @return [::String] - # Optional. Human readable display text characterizing the feature. - # Should be sufficiently detailed to identify the feature, allowing - # features to be correlated across separate offers and service levels. - # Must be non-empty to publish the offer. - # The maximum allowed length is 128 characters. - # Allows characters from the following Unicode Property Classes: - # Letters, Numbers, Punctuation, Symbols, and Separators - # @!attribute [rw] value - # @return [::String] - # Optional. Human readable display text reflecting the value of the - # feature. Used for variable features not captured by the display_name - # alone. The maximum allowed length is 3000 characters. Allows characters - # from the following Unicode Property Classes: Letters, Numbers, - # Punctuation, Symbols, and Separators - class Feature - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The price model of the private offer. - # - # Private offers are referred to as having different kinds of price models - # based on the combination of fields set in the price model. The following - # terminology is used in documentation and other reference material. - # - # * Usage-based: the price model does not set `flat_fee` - # * Usage-only: the price model sets only `usage` - # * CUD (committed use discount): the price model sets `commitment` - # * Commitment discount with additional usage at list price: - # The price model sets `commitment` and not `usage`. - # * Commitment with all usage discounted: The price model sets - # `commitment` and `usage`. - # * Flat fee: the price model sets only `flat_fee` - # * Flat fee with usage: the price model sets `flat_fee` and `usage` - # - # See - # https://docs.cloud.google.com/marketplace/docs/partners/offers/select-pricing-model#CUD - # for the price models. - # @!attribute [rw] flat_fee - # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer::SingleProductOffer::PriceModel::FlatFee] - # Optional. The price configurations for the flat fee subscription. - # Must be unset when the base standard offer's price model does not - # include subscription SKUs. - # - # Note: The following fields are mutually exclusive: `flat_fee`, `commitment`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] commitment - # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer::SingleProductOffer::PriceModel::Commitment] - # Optional. The price configurations for the commitment based - # subscription. Must be unset when the base standard offer's price - # model includes subscription SKUs. - # - # Note: The following fields are mutually exclusive: `commitment`, `flat_fee`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] usage - # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer::SingleProductOffer::PriceModel::Usage] - # Optional. The price configurations for the usage part. - # If this field is set, the `Commitment.discount_percent` must be unset. - # A private offer can apply a discount to all usage or to a usage - # commitment, but not both. - # Must be unset when the base standard offer's price model includes no - # usage SKUs. - class PriceModel - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The discount for a specific SKU. - # @!attribute [rw] sku - # @return [::String] - # Optional. The name of a partner SKU from this API. - # - # Must refer to a SKU in the price model of the base standard offer. - # Inclusion in the base price model can occur either directly or - # indirectly via inclusion in an included SkuGroup. - # - # Currently, standard offer price models include only partner SKUs - # in the same project as the standard offer. This may change. - # - # Format: - # projects/\\{project}/locations/\\{location}/services/\\{service}/skus/\\{sku} - # - # Note: The following fields are mutually exclusive: `sku`, `cloud_billing_sku`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] cloud_billing_sku - # @return [::String] - # Optional. The name of a Google SKU from the Cloud Billing API. - # - # Used for partner products sold by Google, such as Premium Operating - # System Images sold for use in Compute Engine. This is not common. - # SKUs of this type are not present on this API and can instead be - # found on the Cloud Billing API or at https://cloud.google.com/skus. - # - # Must refer to a SKU in the price model of the base standard offer. - # Google SKUs are always referenced in standard offers via SkuGroups. - # - # Format: services/\\{service}/skus/\\{sku} - # - # Note: The following fields are mutually exclusive: `cloud_billing_sku`, `sku`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] discount_percent - # @return [::Google::Type::Decimal] - # Optional. The discount percent for the SKU. - # For example, `10` means a discount of 10%. If the original SKU - # price is $100/hour then the discounted price will be $90/hour. - # - # Must be between 0 and 100 inclusive, with precision up to 2 decimal - # places. If this field is set, then the allowed pattern for 'value' - # is `^([0-9]{1,2}(\\.\\d{1,2})?|100(\\.0{1,2})?)$`. - # - # Examples of valid values: "0", "100.0", "12.34", "40.0". - # Example of invalid values: ".3", "-1", "100.1", "12.345", "+12", - # and "". - # Must be present to publish the offer. - class SkuDiscount - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The price for the usage SKUs. - # @!attribute [rw] default_discount_percent - # @return [::Google::Type::Decimal] - # Optional. The default discount percent for usage SKUs. - # An unset default discount percent is equivalent to 0 (no discount). - # - # Must be between 0 and 100 inclusive, with precision up to 2 decimal - # places. If this field is set, then the allowed pattern for 'value' - # is `^([0-9]{1,2}(\\.\\d{1,2})?|100(\\.0{1,2})?)$`. - # Examples of valid values: "0", "100.0", "12.34", "40.0". - # Example of invalid values: ".3", "-1", "100.1", "12.345", "+12", "". - # @!attribute [rw] sku_discounts - # @return [::Array<::Google::Cloud::CommerceProducer::V1beta::PrivateOffer::SingleProductOffer::PriceModel::SkuDiscount>] - # Optional. The discounts for the specific SKUs that override the - # `default_discount_percent`. - class Usage - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The price configurations for the flat fee subscriptions. - # @!attribute [rw] flat_fee_override - # @return [::Google::Type::Money] - # Optional. Flat fee overriding the default flat fee in the base - # standard offer. Value cannot be negative. The currency must be "USD" - # and precision is limited to cents. Must be present to publish the - # offer, if the parent message is set. The maximum allowed value is - # 1,000,000,000 USD. - class FlatFee - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The price configurations for the commitment based subscriptions. - # @!attribute [rw] commitment_amount - # @return [::Google::Type::Money] - # Optional. The commitment balance that the customer will receive. - # Value cannot be negative. - # The currency must be "USD" and precision is limited to cents. - # Must be present to publish the offer, if the parent message is set. - # The maximum allowed value is 1,000,000,000 USD. - # - # If the current offer amends a private offer where the term has not - # ended, and if the field - # `single_product_offer.standard_interval_price.price_model.commitment.commitment_amount` - # is set on both the current offer and the amended private offer, then - # the commitment amount must be equal or higher on the current offer, - # compared to the amended private offer. - # @!attribute [rw] discount_percent - # @return [::Google::Type::Decimal] - # Optional. The discount percent on `commitment_amount`. - # - # For example, `10` means a discount of 10%. If the original - # `commitment_amount` is $100 then the discounted amount will be $90. - # The customer is charged $90 and receives $100 in credits. - # - # All reported usage will be charged at the standard price. - # If this field is set, the `price_model.usage` must be unset. A - # private offer can apply a discount to all usage or to a usage - # commitment, but not both. - # - # Must be between 0 and 100 inclusive, with precision up to 2 decimal - # places. If this field is set, then the allowed pattern for 'value' - # is `^([0-9]{1,2}(\\.\\d{1,2})?|100(\\.0{1,2})?)$`. - # Examples of valid values: "0", "100.0", "12.34", "40.0". - # Example of invalid values: ".3", "-1", "100.1", "12.345", "+12", "". - # - # Must be present to publish the offer. - # @!attribute [rw] additional_credit - # @return [::Google::Type::Money] - # Optional. Additional credit granted to the customer. - # Additional credits are only supported for custom interval offers. - # Equivalent behavior can be achieved for standard interval offers by - # varying the `commitment_amount` and `discount_percent`. - # - # Value cannot be negative. - # The currency must be "USD" and precision is limited to cents. - # The maximum allowed value is 1,000,000 USD. - # @!attribute [rw] discard_previous_credit_balance - # @return [::Boolean] - # Optional. Whether to discard the previous credit balance when the - # associated installment starts. If not set, the previous credit - # balance will be rolled over to the current installment. - # - # If there are no previous installments, then the value of this field - # will not matter - since it has no effect when no credits exist. - class Commitment - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Price configurations for offers with standard intervals. - # @!attribute [rw] standard_interval - # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer::SingleProductOffer::StandardIntervalPrice::StandardInterval] - # Optional. The standard interval of the offer. - # Must be present to publish unless the price model is usage-only. - # @!attribute [rw] price_model - # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer::SingleProductOffer::PriceModel] - # Optional. The price model of the offer. - # Must be present to publish the offer. - class StandardIntervalPrice - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The options for offers with standard intervals. - module StandardInterval - # The private offer does not have an interval. - # If this is set, then the offer is "usage-only". - # Field `term.duration_months` must be positive. - STANDARD_INTERVAL_UNSPECIFIED = 0 - - # The schedule of the monthly postpay offers. - # This type of offer has "Monthly" billing frequency (see - # https://docs.cloud.google.com/marketplace/docs/partners/offers/select-payment-schedule). - # No longer supported as of May 2024. Cannot be used to publish - # new offers. - MONTHLY_POSTPAY = 1 - - # Monthly installments with proration. - # This type of offer has "Monthly" billing frequency (see - # https://docs.cloud.google.com/marketplace/docs/partners/offers/select-payment-schedule). - # For example, if the offer starts on 04/15, and the offer duration is - # 3 months, the following installments will be created: - # # 1: from 04/15 to 05/01, at the prorated price for April. - # - # # 2: from 05/01 to 06/01, at the full monthly price for May. - # - # # 3: from 06/01 to 07/01, at the full monthly price for June. - # - # # 4: from 07/01 to 07/15, at the prorated price for July. - # - # All dates represent the start of that day in the America/Los_Angeles - # time zone. - # - # If this is set: - # - # * The `PriceModel.subscription` oneof must be set. - # * Field `term.duration_months` must be positive. - MONTHLY_PRORATED = 2 - - # Monthly installments without proration. - # This type of offer has "Monthly" billing frequency (see - # https://docs.cloud.google.com/marketplace/docs/partners/offers/select-payment-schedule). - # For example, if the offer starts on 04/15, and the offer duration is - # 3 months, the following installments will be created: - # # 1: from 04/15 to 05/15, at the full monthly price. - # - # # 2: from 05/15 to 06/15, at the full monthly price. - # - # # 3: from 06/15 to 07/15, at the full monthly price. - # - # All dates represent the start of that day in the America/Los_Angeles - # time zone. - # - # If this is set: - # - # * The `PriceModel.subscription` oneof must be set. - # * Field `term.duration_months` must be positive. - MONTHLY_NOT_PRORATED = 3 - - # Quarterly installments which are not prorated. - # This type of offer has "Quarterly" billing frequency (see - # https://docs.cloud.google.com/marketplace/docs/partners/offers/select-payment-schedule). - # For example, if the offer starts on 01/15, and the offer duration is - # 3 quarters, the following installments will be created: - # # 1: from 01/15 to 04/15, at the full quarterly price. - # - # # 2: from 04/15 to 07/15, at the full quarterly price. - # - # # 3: from 07/15 to 10/15, at the full quarterly price. - # - # All dates represent the start of that day in the America/Los_Angeles - # time zone. - # - # If this is set: - # - # * The `PriceModel.subscription` oneof must be set. - # * Field `term.duration_months` must be positive. - QUARTERLY_NOT_PRORATED = 4 - - # Yearly installments which are not prorated. - # This type of offer has "Yearly" billing frequency (see - # https://docs.cloud.google.com/marketplace/docs/partners/offers/select-payment-schedule). - # For example, if the offer starts on 01/15/2025, and the offer - # duration is 3 years, the following installments will be created: - # # 1: from 01/15/2025 to 01/15/2026, at the full yearly price. - # - # # 2: from 01/15/2026 to 01/15/2027, at the full yearly price. - # - # # 3: from 01/15/2027 to 01/15/2028, at the full yearly price. - # - # All dates represent the start of that day in the America/Los_Angeles - # time zone. - # - # If this is set: - # - # * The `PriceModel.subscription` oneof must be set. - # * Field `term.duration_months` must be positive. - YEARLY_NOT_PRORATED = 5 - end - end - - # An installment of the offer. - # @!attribute [rw] start_time - # @return [::Google::Type::DateTime] - # Optional. The start time of the installment. - # Each installment must have a unique start time with one exception: - # When the `term.start_policy` of the offer's term is `IMMEDIATE`, - # the `start_time` of the first installment must be unset. - # The actual start time is not recorded in the offer and instead is - # determined by the time the resulting order became active. - # - # When the `term.start_policy` of the offer's term is - # `SCHEDULED_START_TIME`, then the first installment's `start_time` must - # match `term.scheduled_start_time`. - # - # If the `term.end_policy` of the offer's term is `SCHEDULED_END_TIME`, - # then installment `start_time` must be before `term.scheduled_end_time`. - # If it's `AFTER_DURATION`, then installment `start_time` must be before - # the time calculated by adding the `term.duration_months` to - # the start time of the offer. - # - # The `start_time` of the installments cannot be before the - # `accept_deadline_time` of the offer. - # - # Installment start times must be in strictly increasing chronological - # order. - # @!attribute [rw] price_model - # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOffer::SingleProductOffer::PriceModel] - # Optional. The price model of the installment. - # All installments must have the same form of price model. - class Installment - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Price configurations for offers with custom intervals. - # @!attribute [rw] installments - # @return [::Array<::Google::Cloud::CommerceProducer::V1beta::PrivateOffer::SingleProductOffer::Installment>] - # Optional. The installments that make up the installment timeline. - # All installments must have the same form of price model (e.g. - # all commitment, or all flat fee). A subscription must be present - # under the price model for every installment. - # - # Must contain at least one installment to publish the offer. - class CustomIntervalPrice - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The contract value of the offer. - # @!attribute [r] total_contract_value - # @return [::Google::Type::Money] - # Output only. The total contract value of the offer. - # This will be set for all non-draft private offers, as long as - # 'PRIVATE_OFFER_VIEW_FULL' is requested. For DRAFT private offers, - # this will be populated only when the end user's billing account is - # set and when the pricing and term configuration is sufficiently - # complete to allow for a calculation. - class ContractValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Revenue Share information for a Private Offer. - # For more details about the revenue share, including how the value is - # determined, see - # https://docs.cloud.google.com/marketplace/docs/partners/revenue-share-scenarios. - # - # Not included for `PRIVATE_OFFER_VIEW_BASIC`, or for DRAFT private offers. - # - # For non-draft private offers, these fields are populated based on the - # following: - # - # * Offers published after April 20, 2025 will always have revenue - # share fields populated. - # * Offers published on or before April 20, 2025 will only have revenue - # share fields populated if they were associated with an active, - # unexpired order on that date. - # @!attribute [r] current_term_vendor_net_revenue_percent - # @return [::Google::Type::Decimal] - # Output only. The revenue share currently in effect. - # - # The range of the value is between 0 and 100. For example, 80 - # means the Vendor's current term revenue share is 80%. The vendor - # will keep 80% of the revenue. - # . - # @!attribute [r] renewal_term_vendor_net_revenue_percent - # @return [::Google::Type::Decimal] - # Output only. The expected revenue share for the renewal term. - # Not included if the offer does not have renewal terms. - # - # The range of the value is between 0 and 100. For example, 80 - # means the Vendor's current term revenue share is 80%. The vendor - # will keep 80% of the revenue after renewal. - # . - class RevenueShare - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Additional contract value that represents a spend obligation or target - # contract value tracked out-of-band by the partner. - # @!attribute [rw] contract_value - # @return [::Google::Type::Money] - # Optional. The absolute, cumulative contract value of the customer's - # spend obligation that is added on top of the automatically billed fees - # from Google. This amount is not automatically billed or invoiced by - # Google; instead, it is tracked as a legal spend guarantee to be met via - # usage reporting and manually trued-up by partners. - # - # The overall total contract value of the offer is calculated as the - # sum of Google-billed fees (from installments), plus this additional - # contract value. - # - # For amendments, this field must be set to the new cumulative - # additional total. - # - # For example: - # - # * Initial Offer: 3 installments of $15 (total $45 billed by Google) - # plus an `additional_contract_value` of $100 (billed by Partner, with - # true-ups happening at the end of the offer's term). - # The overall total contract value of the offer is $145 ($45 + $100). - # * Amended Offer: 6 installments of $15 (total $90 billed by Google) - # plus an `additional_contract_value` of $70 (billed by Partner, with - # true-ups happening at the end of the offer's term). - # The overall total contract value of the amended offer is $160 - # ($90 + $70). - # - # Must be non-negative. The maximum allowed value is 1,000,000,000 USD. - # @!attribute [rw] eligible_skus - # @return [::Array<::String>] - # Optional. The resource names of the SKUs whose tracked usage is - # eligible to contribute toward satisfying this additional contract value - # obligation. - # - # This list explicitly separates core spend obligations from exclusions - # like overage fees, which do not count toward meeting the customer's - # legal spend commitment. - # - # Must be non-empty for the offer to be published. - # - # Format: - # projects/\\{project}/locations/\\{location}/services/\\{service}/skus/\\{sku} - class AdditionalContractValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # State of an offer. - module State - # Default value. This value is unused. - STATE_UNSPECIFIED = 0 - - # The default state after creation when the offer can be edited. - # In all other states, the contents of the offer cannot be edited. - DRAFT = 1 - - # The offer is publishing. - # Publishing will complete when all publishing requirements are satisfied. - PUBLISHING = 2 - - # The offer has been published and is available to the customer to accept. - PUBLISHED = 3 - - # The offer has been accepted by the customer. - ACCEPTED = 4 - - # The offer was cancelled by the provider before it was transacted. - # Cancelled offers can no longer be accepted by the customer. - CANCELLED = 5 - - # The offer expired without being accepted by the customer. - # Expired offers can no longer be accepted by the customer. - EXPIRED = 6 - - # The offer has ended. - # - # Ended offers were accepted and active in the past, but have now reached - # the end of their term or have been terminated. - ENDED = 7 - end - - # The type of the deal transacted with the offer. The deal type of an offer - # is a factor in determining the offer's revenue share. - module OfferDealType - # Default value. This value is unused. - OFFER_DEAL_TYPE_UNSPECIFIED = 0 - - # The offer corresponds to a preexisting commercial arrangement for a - # workload on Google Cloud that is being transferred to the Cloud - # Marketplace. - CHANNEL_SHIFT = 1 - - # The offer corresponds to a preexisting commercial arrangement for a - # workload previously not on Google Cloud that is being transferred to - # Google Cloud. - MIGRATION = 2 - - # The offer corresponds to a renewal of a deal initially transacted on - # the Google Cloud Marketplace. - NATIVE_RENEWAL = 3 - - # The offer corresponds to a new deal transacted on the Google Cloud - # Marketplace. - # - # This value is not allowed if the offer amends another private offer - # where the term has not ended, and the amended private offer has a deal - # type of `MIGRATION`, `CHANNEL_SHIFT` or `NATIVE_RENEWAL`. - NEW = 4 - end - end - - # Message describing the PrivateOfferDocument resource. - # Used to attach documents to a private offer in state DRAFT. - # Once a private offer is no longer in state DRAFT, the set of child documents - # is immutable. Existing documents cannot be updated or deleted, and new - # documents cannot be added. - # - # A private offer must include a EULA, either by assigning a standard EULA - # or attaching a custom EULA document, or a statement of work document. - # @!attribute [rw] inline_content - # @return [::String] - # Optional. Byte content of an unstructured document. - # Max size: 4MB - # @!attribute [rw] name - # @return [::String] - # Identifier. Name of the resource. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The creation time of the resource. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The last update time of the resource. - # @!attribute [rw] document_type - # @return [::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument::DocumentType] - # Required. The classification type of the document. - # Used to distinguish between different types of documents that may be - # attached to a private offer for different business purposes. - # @!attribute [rw] mime_type - # @return [::String] - # Optional. The MIME type of the document. - # Used to distinguish between different document formats. - # Supported formats (which may be expanded in the future) - # - # - 'application/pdf' - class PrivateOfferDocument - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Supported types of documents. - # Additional document types may be added in future. Further editions of the - # Google Cloud Marketplace Standard EULA may be published in future, which - # may result in changes to the subset of Standard EULA versions permitted - # to be used in new offers. - module DocumentType - # The default / unset value. Do not use. - DOCUMENT_TYPE_UNSPECIFIED = 0 - - # The document is a custom EULA used in place of the standard product EULA. - # A private offer may not have more than one custom EULA document. - # - # If this enum value is set, then mime_type and inline_content must - # be set. - CUSTOM_END_USER_LICENSE_AGREEMENT = 1 - - # The document is the statement of work required by the [Cloud Marketplace - # Product Specific - # Terms](https://cloud.google.com/terms/marketplace-product-terms) for all - # Professional Services product private offers. - # This document type is not permitted for private offers of any other - # product type. - # A private offer may not have more than one statement of work document. - # - # The mime_type and inline_content fields must be set. - STATEMENT_OF_WORK = 2 - - # The document is the Marketplace standard EULA, with the following link: - # https://cloud.google.com/terms/marketplace/eula-standard-v1-12102020. - # Existing offers may have this document type, but this is not permitted - # for new offers. - STANDARD_END_USER_LICENSE_AGREEMENT_V1 = 3 - - # The document is the Marketplace standard EULA, with the following link: - # https://cloud.google.com/terms/marketplace/eula-standard-v2-01272021 - # - # New offers using Standard EULAs should set this enum value. This is not - # permitted for Professional Services products. - # - # The mime_type and inline_content fields must not be set. - STANDARD_END_USER_LICENSE_AGREEMENT_V2 = 4 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/cloud/commerceproducer/v1beta/service.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/cloud/commerceproducer/v1beta/service.rb deleted file mode 100644 index a3798605d979..000000000000 --- a/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/cloud/commerceproducer/v1beta/service.rb +++ /dev/null @@ -1,40 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module CommerceProducer - module V1beta - # Message describing Service resource. - # @!attribute [rw] name - # @return [::String] - # Identifier. Name of resource. - # @!attribute [r] title - # @return [::String] - # Output only. Title of the service. - # - # Not included for `SERVICE_VIEW_BASIC`. - class Service - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/cloud/commerceproducer/v1beta/sku.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/cloud/commerceproducer/v1beta/sku.rb deleted file mode 100644 index fb1a88bd6527..000000000000 --- a/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/cloud/commerceproducer/v1beta/sku.rb +++ /dev/null @@ -1,794 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module CommerceProducer - module V1beta - # Message describing the Sku resource. - # - # Encapsulates and represents a stock keeping unit (SKU), the atomic unit of - # pricing and billing in Google Cloud. Each customer charge is associated with - # and originates from exactly one SKU. While the Cloud Marketplace Sku resource - # shares a close relationship with the public [Sku resource in the Cloud - # Billing - # API](https://cloud.google.com/billing/docs/how-to/get-pricing-information-api), - # Cloud Marketplace SKUs are represented here with additional information in - # an alternative format tailored for use by Cloud Marketplace partners, and are - # not necessarily public and by extension are not generally visible in the - # Cloud Billing API or the [Google Cloud Public - # SKUs](https://cloud.google.com/skus). - # - # Note on terminology: While the name of the resource derives from the acronym - # 'SKU' it is named 'Sku' for consistency with other resource type names, and - # may be rendered variously as 'Sku', 'sku', or 'SKU' across this and other - # documentation. - # @!attribute [r] name - # @return [::String] - # Output only. Identifier. Name of the SKU. - # @!attribute [r] description - # @return [::String] - # Output only. Description of the SKU. - # @!attribute [r] sku_price_timeline - # @return [::Array<::Google::Cloud::CommerceProducer::V1beta::Sku::SkuPrice>] - # Output only. Timeline of the SKU prices, in chronological order by - # `effective_time`. - # - # Each entry is active in the time range starting inclusively from the - # entry's `effective_time` and ending exclusively at the next entry's - # `effective_time`, if one exists, or else remaining active indefinitely if - # it is the final entry. The currently active entry is the entry with the - # latest `effective_time` that is in the past. Because of scheduled future - # price changes the currently active entry may not be the last entry in the - # timeline. A SKU does not necessarily have a currently active entry, as the - # SKU's first timeline entry may have an `effective_time` in the future. - class Sku - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The price of the SKU, active during a particular time range. - # Prices are in all cases in USD. Customers are billed in the currency of - # their billing account, subject to the currency conversion rate in effect - # at the time. - # @!attribute [r] inactive - # @return [::Google::Cloud::CommerceProducer::V1beta::Sku::SkuPrice::InactiveSkuPrice] - # Output only. The SKU has been disabled and has no price. - # SKUs, once created and allowed to go into effect, are never deleted. - # Disabled SKUs may accumulate over the lifetime of a product as the - # product's pricing evolves, and are retained for historical reference. - # A SKU in this state generally remains in this state indefinitely, but - # may be reactivated if needed. Clients must not depend on inactive SKUs - # remaining inactive. - # - # Note: The following fields are mutually exclusive: `inactive`, `managed_service_metric_usage_fee`, `gce_license_usage_fee`, `gke_pod_usage_fee`, `ai_platform_managed_model_usage_fee`, `ai_platform_provisioned_throughput_fee`, `ai_platform_deployed_model_usage_fee`, `flat_subscription_fee`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] managed_service_metric_usage_fee - # @return [::Google::Cloud::CommerceProducer::V1beta::Sku::SkuPrice::ManagedServiceMetricUsageFee] - # Output only. The SKU prices usage reported by the partner for a - # partner-defined custom billing metric. - # - # Note: The following fields are mutually exclusive: `managed_service_metric_usage_fee`, `inactive`, `gce_license_usage_fee`, `gke_pod_usage_fee`, `ai_platform_managed_model_usage_fee`, `ai_platform_provisioned_throughput_fee`, `ai_platform_deployed_model_usage_fee`, `flat_subscription_fee`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] gce_license_usage_fee - # @return [::Google::Cloud::CommerceProducer::V1beta::Sku::SkuPrice::ComputeEngineLicenseUsageFee] - # Output only. The SKU prices usage of a Compute Engine License via a - # license fee applied to running instances that use the license. - # - # Note: The following fields are mutually exclusive: `gce_license_usage_fee`, `inactive`, `managed_service_metric_usage_fee`, `gke_pod_usage_fee`, `ai_platform_managed_model_usage_fee`, `ai_platform_provisioned_throughput_fee`, `ai_platform_deployed_model_usage_fee`, `flat_subscription_fee`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] gke_pod_usage_fee - # @return [::Google::Cloud::CommerceProducer::V1beta::Sku::SkuPrice::KubernetesEnginePodUsageFee] - # Output only. The SKU prices usage of software deployed on Kubernetes - # Engine. - # - # Note: The following fields are mutually exclusive: `gke_pod_usage_fee`, `inactive`, `managed_service_metric_usage_fee`, `gce_license_usage_fee`, `ai_platform_managed_model_usage_fee`, `ai_platform_provisioned_throughput_fee`, `ai_platform_deployed_model_usage_fee`, `flat_subscription_fee`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] ai_platform_managed_model_usage_fee - # @return [::Google::Cloud::CommerceProducer::V1beta::Sku::SkuPrice::AiPlatformManagedModelUsageFee] - # Output only. The SKU prices usage of an AI Platform Managed Model - # (MaaS). - # - # Note: The following fields are mutually exclusive: `ai_platform_managed_model_usage_fee`, `inactive`, `managed_service_metric_usage_fee`, `gce_license_usage_fee`, `gke_pod_usage_fee`, `ai_platform_provisioned_throughput_fee`, `ai_platform_deployed_model_usage_fee`, `flat_subscription_fee`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] ai_platform_provisioned_throughput_fee - # @return [::Google::Cloud::CommerceProducer::V1beta::Sku::SkuPrice::AiPlatformProvisionedThroughputFee] - # Output only. The SKU prices reservation of AI Platform provisioned - # throughput. - # - # Note: The following fields are mutually exclusive: `ai_platform_provisioned_throughput_fee`, `inactive`, `managed_service_metric_usage_fee`, `gce_license_usage_fee`, `gke_pod_usage_fee`, `ai_platform_managed_model_usage_fee`, `ai_platform_deployed_model_usage_fee`, `flat_subscription_fee`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] ai_platform_deployed_model_usage_fee - # @return [::Google::Cloud::CommerceProducer::V1beta::Sku::SkuPrice::AiPlatformDeployedModelUsageFee] - # Output only. The SKU prices usage of an AI model deployed on AI - # Platform. - # - # Note: The following fields are mutually exclusive: `ai_platform_deployed_model_usage_fee`, `inactive`, `managed_service_metric_usage_fee`, `gce_license_usage_fee`, `gke_pod_usage_fee`, `ai_platform_managed_model_usage_fee`, `ai_platform_provisioned_throughput_fee`, `flat_subscription_fee`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] flat_subscription_fee - # @return [::Google::Cloud::CommerceProducer::V1beta::Sku::SkuPrice::FlatSubscriptionFee] - # Output only. The SKU applies a flat subscription fee. - # - # Note: The following fields are mutually exclusive: `flat_subscription_fee`, `inactive`, `managed_service_metric_usage_fee`, `gce_license_usage_fee`, `gke_pod_usage_fee`, `ai_platform_managed_model_usage_fee`, `ai_platform_provisioned_throughput_fee`, `ai_platform_deployed_model_usage_fee`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] effective_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The start of the time interval during which this price is - # effective. - class SkuPrice - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Representation for a SKU that is not active and has no price. - class InactiveSkuPrice - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about a SKU pricing usage of a [partner-reported custom billing - # metric](https://cloud.google.com/service-infrastructure/docs/reporting-billing-metrics) - # defined by the partner in the Service Management API and reported using - # the Service Control API. - # - # The customer's usage charge is computed by converting the customer's - # reported consumption to the SKU's composite price unit and applying the - # graduated price from the appropriate price tier. - # @!attribute [r] tiered_price - # @return [::Google::Cloud::CommerceProducer::V1beta::Sku::SkuPrice::TieredPrice] - # Output only. [Tiered - # pricing](https://cloud.google.com/billing/docs/how-to/pricing-table#tiered-pricing) - # of the SKU. - # @!attribute [r] canonical_metric - # @return [::String] - # Output only. The name of the metric, in canonical format. - # - # Note that in the canonical format the first character of the path - # component of the metric name is always uppercase, which may differ - # from the metric name in the service config. For example, a metric - # appearing in the service config as 'example.com/example_metric' will - # appear here in the SKU as 'example.com/Example_metric'. In the Service - # Management and Service Control APIs these two metric names are - # considered distinct, either or both may be defined, and usage must be - # reported using a name matching the name of a metric defined in the - # service config. But for billing purposes usage reported using either - # name will be aggregated under the canonical metric name. - # - # Example: "example.com/Example_metric" - class ManagedServiceMetricUsageFee - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about a SKU pricing usage of a [Compute Engine - # License](https://cloud.google.com/compute/docs/licenses/about). - # - # The SKU applies to a single license, and may be further scoped to a - # [Compute - # Engine VM Instance](https://cloud.google.com/compute/docs/instances) - # machine resource type (e.g. "vCPU") and size range for that machine - # resource. Instances deployed from [Compute - # Engine Images](https://cloud.google.com/compute/docs/images) - # incorporating the target license and (if applicable) matching the machine - # resource type size range will be charged by the SKU. A single license may - # be priced by multiple SKUs covering different combinations of machine - # resource type and size range, allowing a single running instance to be - # charged by up to one SKU per machine resource type, with pricing tiered - # according to machine shape. - # @!attribute [rw] price_per_unit - # @return [::Google::Type::Money] - # The price per unit of usage. - # The customer's usage charge is computed by measuring the customer's - # consumption denominated in price units and multiplying by this price. - # @!attribute [r] license_code - # @return [::String] - # Output only. The license code of the target Compute Engine License. - # Note that this is the numeric license code itself in uint64 format used - # to reference licenses attached to images, not the resource name of the - # related [Compute Engine LicenseCode - # resource](https://cloud.google.com/compute/docs/reference/rest/v1/licenseCodes). - # - # Example: "1234567890123456789" - # @!attribute [r] machine_resource - # @return [::Google::Cloud::CommerceProducer::V1beta::Sku::SkuPrice::ComputeEngineLicenseUsageFee::MachineResource] - # Output only. The machine resource type that the SKU applies to, if any. - # SKUs with a non-default value are referred to as "resource-based" SKUs. - # @!attribute [r] machine_resource_range - # @return [::Google::Cloud::CommerceProducer::V1beta::Sku::SkuPrice::ComputeEngineLicenseUsageFee::MachineResourceRange] - # Output only. The range of machine resource values that the SKU applies - # to. Unset when the SKU is not scoped to a particular machine resource - # type. The collection of SKUs in effect at any given time targeting the - # same license and machine resource type will cover all possible values - # for that machine resource type without overlap. Such a collection of - # SKUs form a "tiered" price structure over the possible values of the - # machine resource, with each SKU acting as a "tier". - # - # NOTE: This is distinct from a SKU with [tiered - # pricing](https://cloud.google.com/billing/docs/how-to/pricing-table#tiered-pricing). - # @!attribute [r] usage_calculation - # @return [::Google::Cloud::CommerceProducer::V1beta::Sku::SkuPrice::ComputeEngineLicenseUsageFee::UsageCalculation] - # Output only. Determines how the customer's usage is calculated. - # @!attribute [r] unit - # @return [::String] - # Output only. The price unit of the SKU. - # See https://ucum.org/ucum.html for the format of the price unit. - # For linear-priced memory SKUs, the price unit is 'GiBy.h'. - # For all other SKUs, the price unit is 'h'. This includes linear-priced - # vCPU and GPU SKUs because these resources have unitless dimensions and - # the application of these scaling factors does not change the price - # unit. - class ComputeEngineLicenseUsageFee - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The range of machine resource values that the SKU applies to. - # @!attribute [r] start_value - # @return [::Integer] - # Output only. The inclusive lower bound of the range. - # While the number zero may be the start of a range, it is not a - # possible machine resource value. An instance cannot exist with zero - # vCPU or memory, and an instance with no attached accelerators lacks a - # GPU dimension entirely rather than having a GPU count of zero. - # @!attribute [r] end_value - # @return [::Integer] - # Output only. The exclusive upper bound of the range. - # If no end value is specified, the range is unbounded from above. - class MachineResourceRange - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The machine resource type that the SKU applies to, if any. - module MachineResource - # The SKU applies to all instances irrespective of machine shape. - # This is referred to as "instance-based pricing" because the price - # is the same for all instances. - MACHINE_RESOURCE_UNSPECIFIED = 0 - - # The SKU applies based on the instance's vCPU count. - VCPU_COUNT = 1 - - # The SKU applies based on the instance's memory size in bytes. - MEMORY_BYTES = 2 - - # The SKU applies based on the instance's GPU count. - GPU_COUNT = 3 - end - - # Determines how the customer's usage is calculated. - module UsageCalculation - # Unused. - USAGE_CALCULATION_UNSPECIFIED = 0 - - # Usage is calculated from instance runtime. - # The customer's usage is metered according to the [Compute Engine VM - # instance pricing - # model](https://cloud.google.com/compute/vm-instance-pricing), - # measured on a per-instance basis in units of hours, with a minimum - # duration of one minute and an increment of one second. - # - # A SKU using this usage calculation is referred to as "flat" because - # the customer's usage charge is independent of the instance's machine - # resource shape apart from determining whether the SKU applies to the - # instance. - INSTANCE_RUNTIME = 1 - - # Usage is calculated from instance runtime and size. - # This calculation mode is only applicable to resource-based SKUs. - # Usage is calculated by measuring the instance runtime in the same - # manner as for `INSTANCE_RUNTIME` and multiplying by the instance's - # machine resource value matching the SKU's machine resource type. - # This converts the price from per-instance-hour to - # per-instance-hour-per-machine-resource, which changes the price unit - # for memory SKUs to 'GiBy.h'. The price unit otherwise remains 'h' - # because the other machine resources are dimensionless. - # - # A SKU using this usage calculation is referred to as "linear" because - # the customer's usage charge is linearly proportional to the - # instance's machine resource value. - LINEAR_RESOURCE_SCALED_INSTANCE_RUNTIME = 2 - end - end - - # Details about a SKU pricing usage of software running on a Kubernetes - # Engine pod. - # - # The SKU applies to pods annotated with the SKU's parent service name, and - # may be further scoped to a [k8s pod resource - # type](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/) - # (e.g. "CPU") and size range for that resource type. Running pods - # annotated with the parent service's service name and matching the pod - # resource type size range will be charged by the SKU. A service may be - # priced by multiple SKUs covering different combinations of pod resource - # type and size range, allowing a single running pod to be charged by up to - # one SKU per pod resource type, with pricing tiered according to pod - # shape. - # @!attribute [rw] price_per_unit - # @return [::Google::Type::Money] - # The price per unit of usage. - # The customer's usage charge is computed by measuring the customer's - # consumption denominated in price units and multiplying by this price. - # @!attribute [r] pod_resource - # @return [::Google::Cloud::CommerceProducer::V1beta::Sku::SkuPrice::KubernetesEnginePodUsageFee::PodResource] - # Output only. The pod resource type that the SKU applies to. - # SKUs with a non-default value are referred to as "resource-based" SKUs. - # @!attribute [r] pod_resource_range - # @return [::Google::Cloud::CommerceProducer::V1beta::Sku::SkuPrice::KubernetesEnginePodUsageFee::PodResourceRange] - # Output only. The range of pod resource values that the SKU applies to. - # The collection of SKUs in effect at any given time targeting the same - # service annotation and pod resource type will cover all possible values - # for that pod resource type without overlap. Such a collection of SKUs - # form a "tiered" price structure over the possible values of the pod - # resource, with each SKU acting as a "tier". - # - # NOTE: This is distinct from a SKU with [tiered - # pricing](https://cloud.google.com/billing/docs/how-to/pricing-table#tiered-pricing). - # @!attribute [r] usage_calculation - # @return [::Google::Cloud::CommerceProducer::V1beta::Sku::SkuPrice::KubernetesEnginePodUsageFee::UsageCalculation] - # Output only. Determines how the customer's usage is calculated. - # @!attribute [r] unit - # @return [::String] - # Output only. The price unit of the SKU. - # See https://ucum.org/ucum.html for the format of the price unit. - # For linear-priced memory SKUs, the price unit is 'GiBy.h'. - # For all other SKUs, the price unit is 'h'. This includes linear-priced - # VCPU, GPU, and TPU SKUs because these resources have unitless - # dimensions and the application of these scaling factors does not change - # the price unit. - class KubernetesEnginePodUsageFee - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The range of pod resource values that the SKU applies to. - # @!attribute [r] start_value - # @return [::Integer] - # Output only. The inclusive lower bound of the range. - # @!attribute [r] end_value - # @return [::Integer] - # Output only. The exclusive upper bound of the range. - # If no end value is specified, the range is unbounded from above. - class PodResourceRange - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The pod [resource - # type](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/) - # that the SKU applies to. - module PodResource - # Unused. - POD_RESOURCE_UNSPECIFIED = 0 - - # The SKU applies based on the pod's [vCPU - # count](https://kubernetes.io/docs/tasks/configure-pod-container/assign-cpu-resource/). - VCPU_COUNT = 1 - - # The SKU applies based on the pod's [memory - # size](https://kubernetes.io/docs/tasks/configure-pod-container/assign-memory-resource/) - # in bytes. - MEMORY_BYTES = 2 - - # The SKU applies based on the pod's GPU count. - GPU_COUNT = 3 - - # The SKU applies based on the pod's [TPU - # count](https://cloud.google.com/kubernetes-engine/docs/concepts/tpus#how_tpus_work). - TPU_COUNT = 4 - end - - # Determines how the customer's usage is calculated. - module UsageCalculation - # Unused. - USAGE_CALCULATION_UNSPECIFIED = 0 - - # Usage is calculated from pod runtime. - # The customer's usage is metered in a manner similar to the [GKE - # Autopilot mode for pods without specific hardware - # requirements](https://cloud.google.com/kubernetes-engine/pricing), - # priced on a per-pod basis in units of hours and measured in - # one-second increments, with no minimum duration. - # - # A SKU using this usage calculation is referred to as "flat" because - # the customer's usage charge is independent of the pod shape apart - # from determining whether the SKU applies to the pod. - POD_RUNTIME = 1 - - # Usage is calculated from pod runtime and size. - # This calculation mode is only applicable to resource-based SKUs. - # Usage is calculated by measuring the pod runtime in the same manner - # as for `POD_RUNTIME` and multiplying by the pod's resource value - # matching the SKU's pod resource type. - # This converts the price from per-pod-hour to - # per-pod-hour-per-resource, which changes the price unit for memory - # SKUs to 'GiBy.h'. The price unit otherwise remains 'h' because the - # other resources are dimensionless. - # - # A SKU using this usage calculation is referred to as "linear" because - # the customer's usage charge is linearly proportional to the - # pod's resource value. - LINEAR_RESOURCE_SCALED_POD_RUNTIME = 2 - end - end - - # Details about a SKU pricing usage of an [AI Platform Managed Model - # (MaaS)](https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/partner-models/use-partner-models). - # @!attribute [r] tiered_price - # @return [::Google::Cloud::CommerceProducer::V1beta::Sku::SkuPrice::TieredPrice] - # Output only. [Tiered - # pricing](https://cloud.google.com/billing/docs/how-to/pricing-table#tiered-pricing) - # of the SKU. - # @!attribute [r] usage_metric - # @return [::Google::Cloud::CommerceProducer::V1beta::Sku::SkuPrice::AiPlatformManagedModelUsageFee::AiPlatformManagedModelUsageMetric] - # Output only. The usage metric that the SKU applies to. - # @!attribute [r] location - # @return [::Google::Cloud::CommerceProducer::V1beta::Sku::SkuPrice::AiPlatformManagedModelEndpointLocation] - # Output only. The model endpoint location where usage is priced by this - # SKU. If no location is specified, the SKU applies to usage in all - # locations. - # @!attribute [r] prediction_mode - # @return [::Google::Cloud::CommerceProducer::V1beta::Sku::SkuPrice::AiPlatformManagedModelUsageFee::PredictionMode] - # Output only. The prediction mode of requests that the SKU applies to. - # @!attribute [r] combined_request_input_tokens_range - # @return [::Google::Cloud::CommerceProducer::V1beta::Sku::SkuPrice::AiPlatformManagedModelUsageFee::CombinedRequestInputTokensRange] - # Output only. The range of aggregated input token values covered by the - # SKU. Unset if the SKU is not scoped to a particular range. A request is - # in scope for this SKU if its aggregated input token value falls within - # the range. The collection of SKUs in effect at any given time scoped to - # a particular aggregated input token value range will cover all possible - # values without overlap. Such a collection of SKUs form a "tiered" price - # structure over the possible value, with each SKU acting as a "tier". - # - # NOTE: This is distinct from a SKU with [tiered - # pricing](https://cloud.google.com/billing/docs/how-to/pricing-table#tiered-pricing). - # @!attribute [r] provisioned_throughput_overage - # @return [::Google::Cloud::CommerceProducer::V1beta::Sku::SkuPrice::AiPlatformManagedModelUsageFee::ProvisionedThroughputOverage] - # Output only. Set when the SKU is a historical provisioned throughput - # overage SKU. Starting 2025-08-26 such SKUs have no effect, and usage in - # excess of provisioned throughput quota is now metered as standard - # usage. This field is set only in historical SKU timeline entries for - # overage SKUs belonging to partners that offered provisioned throughput - # for AI Platform managed model products prior to the unification of - # standard usage and provisioned throughput overage metering. - class AiPlatformManagedModelUsageFee - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The usage metric that the SKU applies to. - # @!attribute [r] input_tokens_metric - # @return [::Google::Cloud::CommerceProducer::V1beta::Sku::SkuPrice::AiPlatformManagedModelUsageFee::AiPlatformManagedModelUsageMetric::InputTokensMetric] - # Output only. Input tokens read from the prediction endpoint input. - # - # Note: The following fields are mutually exclusive: `input_tokens_metric`, `cache_read_input_tokens_metric`, `cache_write_input_tokens_metric`, `output_tokens_metric`, `web_search_requests_metric`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] cache_read_input_tokens_metric - # @return [::Google::Cloud::CommerceProducer::V1beta::Sku::SkuPrice::AiPlatformManagedModelUsageFee::AiPlatformManagedModelUsageMetric::CacheReadInputTokensMetric] - # Output only. Input tokens read from the cache. - # - # Note: The following fields are mutually exclusive: `cache_read_input_tokens_metric`, `input_tokens_metric`, `cache_write_input_tokens_metric`, `output_tokens_metric`, `web_search_requests_metric`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] cache_write_input_tokens_metric - # @return [::Google::Cloud::CommerceProducer::V1beta::Sku::SkuPrice::AiPlatformManagedModelUsageFee::AiPlatformManagedModelUsageMetric::CacheWriteInputTokensMetric] - # Output only. Input tokens written to the cache. - # - # Note: The following fields are mutually exclusive: `cache_write_input_tokens_metric`, `input_tokens_metric`, `cache_read_input_tokens_metric`, `output_tokens_metric`, `web_search_requests_metric`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] output_tokens_metric - # @return [::Google::Cloud::CommerceProducer::V1beta::Sku::SkuPrice::AiPlatformManagedModelUsageFee::AiPlatformManagedModelUsageMetric::OutputTokensMetric] - # Output only. Output tokens returned from the prediction endpoint. - # - # Note: The following fields are mutually exclusive: `output_tokens_metric`, `input_tokens_metric`, `cache_read_input_tokens_metric`, `cache_write_input_tokens_metric`, `web_search_requests_metric`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] web_search_requests_metric - # @return [::Google::Cloud::CommerceProducer::V1beta::Sku::SkuPrice::AiPlatformManagedModelUsageFee::AiPlatformManagedModelUsageMetric::WebSearchRequestsMetric] - # Output only. Web search requests executed by the model. - # - # Note: The following fields are mutually exclusive: `web_search_requests_metric`, `input_tokens_metric`, `cache_read_input_tokens_metric`, `cache_write_input_tokens_metric`, `output_tokens_metric`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class AiPlatformManagedModelUsageMetric - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Input tokens read from the input to the prediction endpoint. - # The unit for this metric is dimensionless. - class InputTokensMetric - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Input tokens read from the cache. - # The unit for this metric is dimensionless. - class CacheReadInputTokensMetric - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Input tokens written to the cache. - # The unit for this metric is dimensionless. - # @!attribute [r] ttl - # @return [::Google::Protobuf::Duration] - # Output only. The duration the write is retained in the cache. - class CacheWriteInputTokensMetric - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Output tokens returned from the prediction endpoint. - # The unit for this metric is dimensionless. - class OutputTokensMetric - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Web search requests executed by the model. - # The unit for this metric is dimensionless. - class WebSearchRequestsMetric - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # The range of aggregated input token values covered by the SKU. - # - # A request to a managed model has an aggregated input token value - # determined by the sum of the metric values of the input token metrics. - # - # * input tokens - # * cache read input tokens - # * cache write input tokens - # @!attribute [r] start_value - # @return [::Integer] - # Output only. The inclusive lower bound of the range. - # @!attribute [r] end_value - # @return [::Integer] - # Output only. The exclusive upper bound of the range. - # If no end value is specified, the range is unbounded from above. - class CombinedRequestInputTokensRange - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Additional details present for historical provisioned throughput - # "overage" SKUs that applied charges only to usage above the customer's - # provisioned throughput quota threshold. - # @!attribute [r] service - # @return [::String] - # Output only. The service whose usage the overage SKU applied to. - class ProvisionedThroughputOverage - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The prediction modes of requests that the SKU applies to. - module PredictionMode - # The SKU does not distinguish between prediction modes. - PREDICTION_MODE_UNSPECIFIED = 0 - - # The SKU applies to online prediction. - ONLINE_PREDICTION = 1 - - # The SKU applies to batch prediction. - BATCH_PREDICTION = 2 - end - end - - # Details about a SKU pricing reservation of [AI Platform Provisioned - # Throughput](https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/provisioned-throughput). - # - # Customers may purchase provisioned throughput reservations for AI - # Platform managed model products. This provides the customer with - # provisioned throughput quota for a particular model and location. Model - # usage below the provisioned throughput quota threshold is voided and is - # not charged by the product's managed model usage fees. - # @!attribute [r] term_duration_months - # @return [::Integer] - # Output only. The duration of the provisioned throughput reservation - # in months. - # @!attribute [rw] gsu_price_per_unit - # @return [::Google::Type::Money] - # The price per [Generative AI Scale Unit - # (GSU)](https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/provisioned-throughput/measure-provisioned-throughput) - # per `unit`. - # A provisioned throughput reservation reserves a certain number of - # GSUs, and the customer is billed for those GSUs on a continuous basis - # for the duration of the reservation. - # @!attribute [r] location - # @return [::Google::Cloud::CommerceProducer::V1beta::Sku::SkuPrice::AiPlatformManagedModelEndpointLocation] - # Output only. The location where provisioned throughput is priced by - # this SKU. - # @!attribute [r] unit - # @return [::String] - # Output only. The price unit of the SKU. - # See https://ucum.org/ucum.html for the format of the price unit. - # Since provisioned throughput reservations are billed by duration, this - # will always be a time unit. The price unit of a provisioned throughput - # SKU is not necessarily the same as the reservation term. - # This field is unrelated to the [Generative AI Scale Unit - # (GSU)](https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/provisioned-throughput/measure-provisioned-throughput). - # - # Currently the unit is always months ('mo'). - # Additional time units may be supported in future. - # - # The customary unit month ('mo') requires special handling to account - # for the variable duration of months. A price may be denominated in - # units of months, but the duration the reservation is active is measured - # in metric time and customers are billed on that basis. The exact hourly - # or per-second price can be calculated by dividing the monthly price - # by the number of hours or seconds in the desired month. A reservation - # active for N months is rarely billed exactly N times the monthly price. - # This is intended and is not a billing error. - class AiPlatformProvisionedThroughputFee - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about a SKU pricing usage of an [AI Platform Self Deployed - # Model](https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/model-garden/self-deployed-models). - # @!attribute [r] accelerator_type - # @return [::String] - # Output only. The SKU applies to a specific accelerator type. - # Contains the name of the matching [AI Platform AcceleratorType]( - # https://docs.cloud.google.com/gemini-enterprise-agent-platform/reference/rest/v1/MachineSpec#AcceleratorType). - # The corresponding linear scaling value is the dimensionless - # [`accelerator_count`](https://docs.cloud.google.com/gemini-enterprise-agent-platform/reference/rest/v1/MachineSpec#FIELDS.accelerator_count). - # @!attribute [r] price_per_unit - # @return [::Google::Type::Money] - # Output only. The price per unit of usage. - # The customer's usage charge is computed by measuring the customer's - # consumption denominated in price units and multiplying by this price. - # @!attribute [r] unit - # @return [::String] - # Output only. The price unit of the SKU. - # See https://ucum.org/ucum.html for the format of the price unit. - # Currently the unit is always hours ('h'). This may change in future. - # @!attribute [r] usage_calculation - # @return [::Google::Cloud::CommerceProducer::V1beta::Sku::SkuPrice::AiPlatformDeployedModelUsageFee::UsageCalculation] - # Output only. Determines how the customer's usage is calculated. - class AiPlatformDeployedModelUsageFee - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Determines how the customer's usage is calculated. - module UsageCalculation - # Unused. - USAGE_CALCULATION_UNSPECIFIED = 0 - - # Usage is calculated from deployment runtime and size. - # Usage is calculated by measuring the deployment runtime in hours and - # multiplying by the amount of the deployed model's hardware resource - # matching the SKU's hardware resource type. - # This results in a composite `unit` of hours ('h') multiplied by the - # unit that denominates the hardware resource, though note that - # multiplying by the dimensionless unit ("1") has no effect. - LINEAR_RESOURCE_SCALED_DEPLOYMENT_RUNTIME = 2 - end - end - - # Details about a SKU charging a flat subscription fee. - # @!attribute [r] price_per_unit - # @return [::Google::Type::Money] - # Output only. The price per time unit the subscription is active. - # @!attribute [r] unit - # @return [::String] - # Output only. The unit of the subscription SKU. - # See https://ucum.org/ucum.html for the format of the price unit. - # Since subscriptions are billed by duration, this will always be a time - # unit. The price unit of a subscription SKU is not necessarily the same - # as the subscription period of the corresponding StandardOffers. - # - # Currently the unit is always months ('mo'). - # Additional time units may be supported in future. - # - # The unit month ('mo') is a customary time unit and requires special - # handling to account for the variable duration of months. A price may be - # denominated in units of months, but the duration the subscription is - # active is measured in metric time and customers are billed on that - # basis. The exact hourly or per-second price can be calculated by - # dividing the monthly price by the number of hours or seconds in the - # desired month. A subscription active for N months is rarely billed - # exactly N times the monthly price. This is intended and is not a - # billing error. - class FlatSubscriptionFee - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Price structure for a SKU charging a [tiered - # price](https://cloud.google.com/billing/docs/how-to/pricing-table#tiered-pricing). - # @!attribute [r] unit - # @return [::String] - # Output only. Usage unit used for defining price tiers and for scaling - # with the price_unit_count to form the composite price unit. - # - # See https://ucum.org/ucum.html for the format of the price unit. - # A unitless dimension, such as a count, is represented as `1`. - # @!attribute [r] unit_description - # @return [::String] - # Output only. The display description of the unit, supplied at time of - # onboarding. This value is recommended to be set at least for - # dimensionless metrics, but may be empty if no description was provided - # at time of onboarding. - # @!attribute [r] price_unit_count - # @return [::Google::Type::Decimal] - # Output only. Scaling the `unit` by the `price_unit_count` forms the - # composite "price unit" which is priced by the price tiers. - # - # This scaling factor is in addition to any numerical prefix symbol on - # the `unit`, so the same composite "price unit" can be represented in - # several ways, differing only in their presentation to users. - # - # Examples: - # - # * $1 per 1 bytes : unit = By, price_unit_count = 1 - # * $1000 per 1 kilobytes : unit = kBy, price_unit_count = 1 - # * $5000 per 5 kilobytes : unit = kBy, price_unit_count = 5 - # @!attribute [r] price_tiers - # @return [::Array<::Google::Cloud::CommerceProducer::V1beta::Sku::SkuPrice::TieredPrice::PriceTier>] - # Output only. The list of price tiers for the SKU, ordered by the - # start_amount. - # - # The tiers are non-overlapping and are collectively bounded below by - # zero and unbounded above to cover the entire range of possible metric - # usage. Each tier is bounded below inclusively by its start_amount and - # bounded above exclusively by the start_amount of the next tier, or else - # unbounded above if there is no next tier. - # - # Usage of the metric is aggregated by customer billing account on a - # monthly basis and billed in a graduated manner according to the price - # tiers, with each marginal unit of usage priced accoring to the tier in - # which it falls. - class TieredPrice - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A [price - # tier](https://cloud.google.com/billing/docs/how-to/pricing-table#tiered-pricing) - # pricing metric usage within a range. - # - # Each marginal unit of usage is priced according to the price tier in - # which it falls. - # @!attribute [r] start_amount - # @return [::Google::Type::Decimal] - # Output only. Inclusive lower bound of the tier interval, denominated - # in `unit`. - # @!attribute [r] price - # @return [::Google::Type::Money] - # Output only. The price per `price_unit_count` of `unit` in the tier. - # The price is applied fractionally if the customer's usage within the - # tier is not an integer multiple of `price_unit_count`. - class PriceTier - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Location scope for a SKU that applies to an AI Platform Managed Model - # endpoint. - # @!attribute [r] region_id - # @return [::String] - # Output only. The SKU applies to a region. - # - # Note: The following fields are mutually exclusive: `region_id`, `global_endpoint`, `multi_region_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] global_endpoint - # @return [::Boolean] - # Output only. The SKU applies to a [global - # endpoint](https://docs.cloud.google.com/gemini-enterprise-agent-platform/resources/locations). - # **Note**: This is distinct from the conventional meaning of "global" - # as a SKU that applies to all locations. - # - # Note: The following fields are mutually exclusive: `global_endpoint`, `region_id`, `multi_region_id`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] multi_region_id - # @return [::String] - # Output only. The SKU applies to a multi-region. - # - # Note: The following fields are mutually exclusive: `multi_region_id`, `region_id`, `global_endpoint`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class AiPlatformManagedModelEndpointLocation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/cloud/commerceproducer/v1beta/sku_group.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/cloud/commerceproducer/v1beta/sku_group.rb deleted file mode 100644 index 413f024d8e56..000000000000 --- a/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/cloud/commerceproducer/v1beta/sku_group.rb +++ /dev/null @@ -1,50 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module CommerceProducer - module V1beta - # Message describing SkuGroup resource - # @!attribute [r] name - # @return [::String] - # Output only. Identifier. Name of the SkuGroup. - # @!attribute [r] skus - # @return [::Array<::String>] - # Output only. Partner SKUs included in the SkuGroup. - # Format: - # `projects/{project}/locations/{location}/services/{service}/skus/{sku}` - # @!attribute [r] cloud_billing_skus - # @return [::Array<::String>] - # Output only. Google SKUs included in the SkuGroup. - # - # Used for partner products sold by Google, such as Premium Operating System - # Images sold for use in Compute Engine. This is not common. - # SKUs of this type are not present on this API and can instead be found on - # the Cloud Billing API or at https://cloud.google.com/skus. - # - # Format: `services/{service}/skus/{sku}` - class SkuGroup - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/cloud/commerceproducer/v1beta/standard_offer.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/cloud/commerceproducer/v1beta/standard_offer.rb deleted file mode 100644 index 0eaef9bbf285..000000000000 --- a/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/cloud/commerceproducer/v1beta/standard_offer.rb +++ /dev/null @@ -1,133 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module CommerceProducer - module V1beta - # Message describing the StandardOffer resource. - # @!attribute [r] term_duration_months - # @return [::Integer] - # Output only. Term duration of the offer in months. - # Applicable only to offers with a subscription price model. - # Additional forms of offer term may be added in the future. - # @!attribute [rw] name - # @return [::String] - # Identifier. Name of resource. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Creation time of the offer. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Last update time of the offer. - # @!attribute [r] effective_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Effective time of the offer. - # Prior to this time, the offer cannot be purchased or used as the base - # standard offer of a private offer. - # @!attribute [r] expire_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Expire time of the offer. - # An offer is expired if its expire time is in the past. - # An expired standard offer cannot be purchased or used as the base standard - # offer of a private offer. - # @!attribute [r] service_level - # @return [::String] - # Output only. Identifier that distinguishes between different service levels - # of the same product that constitute distinct offerings to customers with - # different pricing. - # - # The service levels of a product are also referred to in some cases as the - # product's 'plans', and the `service_level` value is referred to in some - # cases as the "plan ID". - # - # Multiple non-expired standard offers can share the same service level when - # they are subscription offers for different term durations. - # @!attribute [r] service_level_title - # @return [::String] - # Output only. Title of the service level. - # - # Not included for `STANDARD_OFFER_VIEW_BASIC`. - # @!attribute [r] price_model - # @return [::Google::Cloud::CommerceProducer::V1beta::StandardOffer::PriceModel] - # Output only. Price model of the offer. - class StandardOffer - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Price model of the offer. - # @!attribute [r] flat_fee - # @return [::Google::Cloud::CommerceProducer::V1beta::StandardOffer::PriceModel::FlatFeeSubscription] - # Output only. Price configurations for the flat fee subscription. - # @!attribute [r] usage - # @return [::Google::Cloud::CommerceProducer::V1beta::StandardOffer::PriceModel::Usage] - # Output only. Price configurations for the usage part. - class PriceModel - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A collection of SKUs. - # @!attribute [r] skus - # @return [::Array<::String>] - # Output only. List of SKUs by name. - class SkuList - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A collection of SkuGroups. - # @!attribute [r] sku_groups - # @return [::Array<::String>] - # Output only. List of SkuGroups by name. - class SkuGroupList - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Price configurations for the usage part. - # @!attribute [r] sku_list - # @return [::Google::Cloud::CommerceProducer::V1beta::StandardOffer::PriceModel::SkuList] - # Output only. The offer's usage fees are charged against these SKUs. - # - # Note: The following fields are mutually exclusive: `sku_list`, `sku_group_list`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] sku_group_list - # @return [::Google::Cloud::CommerceProducer::V1beta::StandardOffer::PriceModel::SkuGroupList] - # Output only. The offer's usage fees are charged against the SKUs in - # these groups. - # - # Note: The following fields are mutually exclusive: `sku_group_list`, `sku_list`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Usage - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Price configurations for flat fee subscriptions. - # @!attribute [r] sku - # @return [::String] - # Output only. Flat fee subscription SKU for the offer. - class FlatFeeSubscription - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/protobuf/any.rb +++ /dev/null @@ -1,145 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `Any` contains an arbitrary serialized protocol buffer message along with a - # URL that describes the type of the serialized message. - # - # Protobuf library provides support to pack/unpack Any values in the form - # of utility functions or additional generated methods of the Any type. - # - # Example 1: Pack and unpack a message in C++. - # - # Foo foo = ...; - # Any any; - # any.PackFrom(foo); - # ... - # if (any.UnpackTo(&foo)) { - # ... - # } - # - # Example 2: Pack and unpack a message in Java. - # - # Foo foo = ...; - # Any any = Any.pack(foo); - # ... - # if (any.is(Foo.class)) { - # foo = any.unpack(Foo.class); - # } - # // or ... - # if (any.isSameTypeAs(Foo.getDefaultInstance())) { - # foo = any.unpack(Foo.getDefaultInstance()); - # } - # - # Example 3: Pack and unpack a message in Python. - # - # foo = Foo(...) - # any = Any() - # any.Pack(foo) - # ... - # if any.Is(Foo.DESCRIPTOR): - # any.Unpack(foo) - # ... - # - # Example 4: Pack and unpack a message in Go - # - # foo := &pb.Foo{...} - # any, err := anypb.New(foo) - # if err != nil { - # ... - # } - # ... - # foo := &pb.Foo{} - # if err := any.UnmarshalTo(foo); err != nil { - # ... - # } - # - # The pack methods provided by protobuf library will by default use - # 'type.googleapis.com/full.type.name' as the type URL and the unpack - # methods only use the fully qualified type name after the last '/' - # in the type URL, for example "foo.bar.com/x/y.z" will yield type - # name "y.z". - # - # JSON - # ==== - # The JSON representation of an `Any` value uses the regular - # representation of the deserialized, embedded message, with an - # additional field `@type` which contains the type URL. Example: - # - # package google.profile; - # message Person { - # string first_name = 1; - # string last_name = 2; - # } - # - # { - # "@type": "type.googleapis.com/google.profile.Person", - # "firstName": , - # "lastName": - # } - # - # If the embedded message type is well-known and has a custom JSON - # representation, that representation will be embedded adding a field - # `value` which holds the custom JSON in addition to the `@type` - # field. Example (for message [google.protobuf.Duration][]): - # - # { - # "@type": "type.googleapis.com/google.protobuf.Duration", - # "value": "1.212s" - # } - # @!attribute [rw] type_url - # @return [::String] - # A URL/resource name that uniquely identifies the type of the serialized - # protocol buffer message. This string must contain at least - # one "/" character. The last segment of the URL's path must represent - # the fully qualified name of the type (as in - # `path/google.protobuf.Duration`). The name should be in a canonical form - # (e.g., leading "." is not accepted). - # - # In practice, teams usually precompile into the binary all types that they - # expect it to use in the context of Any. However, for URLs which use the - # scheme `http`, `https`, or no scheme, one can optionally set up a type - # server that maps type URLs to message definitions as follows: - # - # * If no scheme is provided, `https` is assumed. - # * An HTTP GET on the URL must yield a [google.protobuf.Type][] - # value in binary format, or produce an error. - # * Applications are allowed to cache lookup results based on the - # URL, or have them precompiled into a binary to avoid any - # lookup. Therefore, binary compatibility needs to be preserved - # on changes to types. (Use versioned type names to manage - # breaking changes.) - # - # Note: this functionality is not currently available in the official - # protobuf release, and it is not used for type URLs beginning with - # type.googleapis.com. As of May 2023, there are no widely used type server - # implementations and no plans to implement one. - # - # Schemes other than `http`, `https` (or the empty scheme) might be - # used with implementation specific semantics. - # @!attribute [rw] value - # @return [::String] - # Must be a valid serialized protocol buffer of the above specified type. - class Any - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/protobuf/duration.rb +++ /dev/null @@ -1,98 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Duration represents a signed, fixed-length span of time represented - # as a count of seconds and fractions of seconds at nanosecond - # resolution. It is independent of any calendar and concepts like "day" - # or "month". It is related to Timestamp in that the difference between - # two Timestamp values is a Duration and it can be added or subtracted - # from a Timestamp. Range is approximately +-10,000 years. - # - # # Examples - # - # Example 1: Compute Duration from two Timestamps in pseudo code. - # - # Timestamp start = ...; - # Timestamp end = ...; - # Duration duration = ...; - # - # duration.seconds = end.seconds - start.seconds; - # duration.nanos = end.nanos - start.nanos; - # - # if (duration.seconds < 0 && duration.nanos > 0) { - # duration.seconds += 1; - # duration.nanos -= 1000000000; - # } else if (duration.seconds > 0 && duration.nanos < 0) { - # duration.seconds -= 1; - # duration.nanos += 1000000000; - # } - # - # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - # - # Timestamp start = ...; - # Duration duration = ...; - # Timestamp end = ...; - # - # end.seconds = start.seconds + duration.seconds; - # end.nanos = start.nanos + duration.nanos; - # - # if (end.nanos < 0) { - # end.seconds -= 1; - # end.nanos += 1000000000; - # } else if (end.nanos >= 1000000000) { - # end.seconds += 1; - # end.nanos -= 1000000000; - # } - # - # Example 3: Compute Duration from datetime.timedelta in Python. - # - # td = datetime.timedelta(days=3, minutes=10) - # duration = Duration() - # duration.FromTimedelta(td) - # - # # JSON Mapping - # - # In JSON format, the Duration type is encoded as a string rather than an - # object, where the string ends in the suffix "s" (indicating seconds) and - # is preceded by the number of seconds, with nanoseconds expressed as - # fractional seconds. For example, 3 seconds with 0 nanoseconds should be - # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - # microsecond should be expressed in JSON format as "3.000001s". - # @!attribute [rw] seconds - # @return [::Integer] - # Signed seconds of the span of time. Must be from -315,576,000,000 - # to +315,576,000,000 inclusive. Note: these bounds are computed from: - # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - # @!attribute [rw] nanos - # @return [::Integer] - # Signed fractions of a second at nanosecond resolution of the span - # of time. Durations less than one second are represented with a 0 - # `seconds` field and a positive or negative `nanos` field. For durations - # of one second or more, a non-zero value for the `nanos` field must be - # of the same sign as the `seconds` field. Must be from -999,999,999 - # to +999,999,999 inclusive. - class Duration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/protobuf/empty.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A generic empty message that you can re-use to avoid defining duplicated - # empty messages in your APIs. A typical example is to use it as the request - # or the response type of an API method. For instance: - # - # service Foo { - # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - # } - class Empty - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/protobuf/field_mask.rb +++ /dev/null @@ -1,229 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `FieldMask` represents a set of symbolic field paths, for example: - # - # paths: "f.a" - # paths: "f.b.d" - # - # Here `f` represents a field in some root message, `a` and `b` - # fields in the message found in `f`, and `d` a field found in the - # message in `f.b`. - # - # Field masks are used to specify a subset of fields that should be - # returned by a get operation or modified by an update operation. - # Field masks also have a custom JSON encoding (see below). - # - # # Field Masks in Projections - # - # When used in the context of a projection, a response message or - # sub-message is filtered by the API to only contain those fields as - # specified in the mask. For example, if the mask in the previous - # example is applied to a response message as follows: - # - # f { - # a : 22 - # b { - # d : 1 - # x : 2 - # } - # y : 13 - # } - # z: 8 - # - # The result will not contain specific values for fields x,y and z - # (their value will be set to the default, and omitted in proto text - # output): - # - # - # f { - # a : 22 - # b { - # d : 1 - # } - # } - # - # A repeated field is not allowed except at the last position of a - # paths string. - # - # If a FieldMask object is not present in a get operation, the - # operation applies to all fields (as if a FieldMask of all fields - # had been specified). - # - # Note that a field mask does not necessarily apply to the - # top-level response message. In case of a REST get operation, the - # field mask applies directly to the response, but in case of a REST - # list operation, the mask instead applies to each individual message - # in the returned resource list. In case of a REST custom method, - # other definitions may be used. Where the mask applies will be - # clearly documented together with its declaration in the API. In - # any case, the effect on the returned resource/resources is required - # behavior for APIs. - # - # # Field Masks in Update Operations - # - # A field mask in update operations specifies which fields of the - # targeted resource are going to be updated. The API is required - # to only change the values of the fields as specified in the mask - # and leave the others untouched. If a resource is passed in to - # describe the updated values, the API ignores the values of all - # fields not covered by the mask. - # - # If a repeated field is specified for an update operation, new values will - # be appended to the existing repeated field in the target resource. Note that - # a repeated field is only allowed in the last position of a `paths` string. - # - # If a sub-message is specified in the last position of the field mask for an - # update operation, then new value will be merged into the existing sub-message - # in the target resource. - # - # For example, given the target message: - # - # f { - # b { - # d: 1 - # x: 2 - # } - # c: [1] - # } - # - # And an update message: - # - # f { - # b { - # d: 10 - # } - # c: [2] - # } - # - # then if the field mask is: - # - # paths: ["f.b", "f.c"] - # - # then the result will be: - # - # f { - # b { - # d: 10 - # x: 2 - # } - # c: [1, 2] - # } - # - # An implementation may provide options to override this default behavior for - # repeated and message fields. - # - # In order to reset a field's value to the default, the field must - # be in the mask and set to the default value in the provided resource. - # Hence, in order to reset all fields of a resource, provide a default - # instance of the resource and set all fields in the mask, or do - # not provide a mask as described below. - # - # If a field mask is not present on update, the operation applies to - # all fields (as if a field mask of all fields has been specified). - # Note that in the presence of schema evolution, this may mean that - # fields the client does not know and has therefore not filled into - # the request will be reset to their default. If this is unwanted - # behavior, a specific service may require a client to always specify - # a field mask, producing an error if not. - # - # As with get operations, the location of the resource which - # describes the updated values in the request message depends on the - # operation kind. In any case, the effect of the field mask is - # required to be honored by the API. - # - # ## Considerations for HTTP REST - # - # The HTTP kind of an update operation which uses a field mask must - # be set to PATCH instead of PUT in order to satisfy HTTP semantics - # (PUT must only be used for full updates). - # - # # JSON Encoding of Field Masks - # - # In JSON, a field mask is encoded as a single string where paths are - # separated by a comma. Fields name in each path are converted - # to/from lower-camel naming conventions. - # - # As an example, consider the following message declarations: - # - # message Profile { - # User user = 1; - # Photo photo = 2; - # } - # message User { - # string display_name = 1; - # string address = 2; - # } - # - # In proto a field mask for `Profile` may look as such: - # - # mask { - # paths: "user.display_name" - # paths: "photo" - # } - # - # In JSON, the same mask is represented as below: - # - # { - # mask: "user.displayName,photo" - # } - # - # # Field Masks and Oneof Fields - # - # Field masks treat fields in oneofs just as regular fields. Consider the - # following message: - # - # message SampleMessage { - # oneof test_oneof { - # string name = 4; - # SubMessage sub_message = 9; - # } - # } - # - # The field mask can be: - # - # mask { - # paths: "name" - # } - # - # Or: - # - # mask { - # paths: "sub_message" - # } - # - # Note that oneof type names ("test_oneof" in this case) cannot be used in - # paths. - # - # ## Field Mask Verification - # - # The implementation of any API method which has a FieldMask type field in the - # request should verify the included field paths, and return an - # `INVALID_ARGUMENT` error if any path is unmappable. - # @!attribute [rw] paths - # @return [::Array<::String>] - # The set of field mask paths. - class FieldMask - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,127 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/type/datetime.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/type/datetime.rb deleted file mode 100644 index 10625864f3dd..000000000000 --- a/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/type/datetime.rb +++ /dev/null @@ -1,104 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Type - # Represents civil time (or occasionally physical time). - # - # This type can represent a civil time in one of a few possible ways: - # - # * When utc_offset is set and time_zone is unset: a civil time on a calendar - # day with a particular offset from UTC. - # * When time_zone is set and utc_offset is unset: a civil time on a calendar - # day in a particular time zone. - # * When neither time_zone nor utc_offset is set: a civil time on a calendar - # day in local time. - # - # The date is relative to the Proleptic Gregorian Calendar. - # - # If year, month, or day are 0, the DateTime is considered not to have a - # specific year, month, or day respectively. - # - # This type may also be used to represent a physical time if all the date and - # time fields are set and either case of the `time_offset` oneof is set. - # Consider using `Timestamp` message for physical time instead. If your use - # case also would like to store the user's timezone, that can be done in - # another field. - # - # This type is more flexible than some applications may want. Make sure to - # document and validate your application's limitations. - # @!attribute [rw] year - # @return [::Integer] - # Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a - # datetime without a year. - # @!attribute [rw] month - # @return [::Integer] - # Optional. Month of year. Must be from 1 to 12, or 0 if specifying a - # datetime without a month. - # @!attribute [rw] day - # @return [::Integer] - # Optional. Day of month. Must be from 1 to 31 and valid for the year and - # month, or 0 if specifying a datetime without a day. - # @!attribute [rw] hours - # @return [::Integer] - # Optional. Hours of day in 24 hour format. Should be from 0 to 23, defaults - # to 0 (midnight). An API may choose to allow the value "24:00:00" for - # scenarios like business closing time. - # @!attribute [rw] minutes - # @return [::Integer] - # Optional. Minutes of hour of day. Must be from 0 to 59, defaults to 0. - # @!attribute [rw] seconds - # @return [::Integer] - # Optional. Seconds of minutes of the time. Must normally be from 0 to 59, - # defaults to 0. An API may allow the value 60 if it allows leap-seconds. - # @!attribute [rw] nanos - # @return [::Integer] - # Optional. Fractions of seconds in nanoseconds. Must be from 0 to - # 999,999,999, defaults to 0. - # @!attribute [rw] utc_offset - # @return [::Google::Protobuf::Duration] - # UTC offset. Must be whole seconds, between -18 hours and +18 hours. - # For example, a UTC offset of -4:00 would be represented as - # { seconds: -14400 }. - # - # Note: The following fields are mutually exclusive: `utc_offset`, `time_zone`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] time_zone - # @return [::Google::Type::TimeZone] - # Time zone. - # - # Note: The following fields are mutually exclusive: `time_zone`, `utc_offset`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class DateTime - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents a time zone from the - # [IANA Time Zone Database](https://www.iana.org/time-zones). - # @!attribute [rw] id - # @return [::String] - # IANA Time Zone Database time zone. For example "America/New_York". - # @!attribute [rw] version - # @return [::String] - # Optional. IANA Time Zone Database version number. For example "2019a". - class TimeZone - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/type/decimal.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/type/decimal.rb deleted file mode 100644 index 1ae8cfa5d7d1..000000000000 --- a/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/type/decimal.rb +++ /dev/null @@ -1,95 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Type - # A representation of a decimal value, such as 2.5. Clients may convert values - # into language-native decimal formats, such as Java's - # [BigDecimal](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/math/BigDecimal.html) - # or Python's - # [decimal.Decimal](https://docs.python.org/3/library/decimal.html). - # @!attribute [rw] value - # @return [::String] - # The decimal value, as a string. - # - # The string representation consists of an optional sign, `+` (`U+002B`) - # or `-` (`U+002D`), followed by a sequence of zero or more decimal digits - # ("the integer"), optionally followed by a fraction, optionally followed - # by an exponent. An empty string **should** be interpreted as `0`. - # - # The fraction consists of a decimal point followed by zero or more decimal - # digits. The string must contain at least one digit in either the integer - # or the fraction. The number formed by the sign, the integer and the - # fraction is referred to as the significand. - # - # The exponent consists of the character `e` (`U+0065`) or `E` (`U+0045`) - # followed by one or more decimal digits. - # - # Services **should** normalize decimal values before storing them by: - # - # - Removing an explicitly-provided `+` sign (`+2.5` -> `2.5`). - # - Replacing a zero-length integer value with `0` (`.5` -> `0.5`). - # - Coercing the exponent character to upper-case, with explicit sign - # (`2.5e8` -> `2.5E+8`). - # - Removing an explicitly-provided zero exponent (`2.5E0` -> `2.5`). - # - # Services **may** perform additional normalization based on its own needs - # and the internal decimal implementation selected, such as shifting the - # decimal point and exponent value together (example: `2.5E-1` <-> `0.25`). - # Additionally, services **may** preserve trailing zeroes in the fraction - # to indicate increased precision, but are not required to do so. - # - # Note that only the `.` character is supported to divide the integer - # and the fraction; `,` **should not** be supported regardless of locale. - # Additionally, thousand separators **should not** be supported. If a - # service does support them, values **must** be normalized. - # - # The ENBF grammar is: - # - # DecimalString = - # '' | [Sign] Significand [Exponent]; - # - # Sign = '+' | '-'; - # - # Significand = - # Digits ['.'] [Digits] | [Digits] '.' Digits; - # - # Exponent = ('e' | 'E') [Sign] Digits; - # - # Digits = { '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' }; - # - # Services **should** clearly document the range of supported values, the - # maximum supported precision (total number of digits), and, if applicable, - # the scale (number of digits after the decimal point), as well as how it - # behaves when receiving out-of-bounds values. - # - # Services **may** choose to accept values passed as input even when the - # value has a higher precision or scale than the service supports, and - # **should** round the value to fit the supported scale. Alternatively, the - # service **may** error with `400 Bad Request` (`INVALID_ARGUMENT` in gRPC) - # if precision would be lost. - # - # Services **should** error with `400 Bad Request` (`INVALID_ARGUMENT` in - # gRPC) if the service receives a value outside of the supported range. - class Decimal - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/type/money.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/type/money.rb deleted file mode 100644 index 56a32eee300d..000000000000 --- a/owl-bot-staging/google-cloud-commerce_producer-v1beta/proto_docs/google/type/money.rb +++ /dev/null @@ -1,43 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Type - # Represents an amount of money with its currency type. - # @!attribute [rw] currency_code - # @return [::String] - # The three-letter currency code defined in ISO 4217. - # @!attribute [rw] units - # @return [::Integer] - # The whole units of the amount. - # For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. - # @!attribute [rw] nanos - # @return [::Integer] - # Number of nano (10^-9) units of the amount. - # The value must be between -999,999,999 and +999,999,999 inclusive. - # If `units` is positive, `nanos` must be positive or zero. - # If `units` is zero, `nanos` can be positive, zero, or negative. - # If `units` is negative, `nanos` must be negative or zero. - # For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. - class Money - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/Gemfile b/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/Gemfile deleted file mode 100644 index d8679b2677ba..000000000000 --- a/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -source "https://rubygems.org" - -if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" - gem "google-cloud-commerce_producer-v1beta", path: "../" -else - gem "google-cloud-commerce_producer-v1beta" -end - -group :test do - gem "google-style", "~> 1.26.1" - gem "minitest", "~> 5.16" - gem "minitest-focus", "~> 1.1" - gem "minitest-hooks", "~> 1.5" -end diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/cancel_private_offer.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/cancel_private_offer.rb deleted file mode 100644 index b29c41d26557..000000000000 --- a/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/cancel_private_offer.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START commerceproducer_v1beta_generated_CommerceTransaction_CancelPrivateOffer_sync] -require "google/cloud/commerce_producer/v1beta" - -## -# Snippet for the cancel_private_offer call in the CommerceTransaction service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#cancel_private_offer. -# -def cancel_private_offer - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CommerceProducer::V1beta::CancelPrivateOfferRequest.new - - # Call the cancel_private_offer method. - result = client.cancel_private_offer request - - # The returned object is of type Google::Cloud::CommerceProducer::V1beta::PrivateOffer. - p result -end -# [END commerceproducer_v1beta_generated_CommerceTransaction_CancelPrivateOffer_sync] diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/create_private_offer.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/create_private_offer.rb deleted file mode 100644 index 717d8cfc38fd..000000000000 --- a/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/create_private_offer.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START commerceproducer_v1beta_generated_CommerceTransaction_CreatePrivateOffer_sync] -require "google/cloud/commerce_producer/v1beta" - -## -# Snippet for the create_private_offer call in the CommerceTransaction service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#create_private_offer. -# -def create_private_offer - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CommerceProducer::V1beta::CreatePrivateOfferRequest.new - - # Call the create_private_offer method. - result = client.create_private_offer request - - # The returned object is of type Google::Cloud::CommerceProducer::V1beta::PrivateOffer. - p result -end -# [END commerceproducer_v1beta_generated_CommerceTransaction_CreatePrivateOffer_sync] diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/create_private_offer_document.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/create_private_offer_document.rb deleted file mode 100644 index 2fbf7a354da7..000000000000 --- a/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/create_private_offer_document.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START commerceproducer_v1beta_generated_CommerceTransaction_CreatePrivateOfferDocument_sync] -require "google/cloud/commerce_producer/v1beta" - -## -# Snippet for the create_private_offer_document call in the CommerceTransaction service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#create_private_offer_document. -# -def create_private_offer_document - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CommerceProducer::V1beta::CreatePrivateOfferDocumentRequest.new - - # Call the create_private_offer_document method. - result = client.create_private_offer_document request - - # The returned object is of type Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument. - p result -end -# [END commerceproducer_v1beta_generated_CommerceTransaction_CreatePrivateOfferDocument_sync] diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/delete_private_offer.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/delete_private_offer.rb deleted file mode 100644 index d9043334fa0e..000000000000 --- a/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/delete_private_offer.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START commerceproducer_v1beta_generated_CommerceTransaction_DeletePrivateOffer_sync] -require "google/cloud/commerce_producer/v1beta" - -## -# Snippet for the delete_private_offer call in the CommerceTransaction service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#delete_private_offer. -# -def delete_private_offer - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CommerceProducer::V1beta::DeletePrivateOfferRequest.new - - # Call the delete_private_offer method. - result = client.delete_private_offer request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END commerceproducer_v1beta_generated_CommerceTransaction_DeletePrivateOffer_sync] diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/delete_private_offer_document.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/delete_private_offer_document.rb deleted file mode 100644 index a2a45518df24..000000000000 --- a/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/delete_private_offer_document.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START commerceproducer_v1beta_generated_CommerceTransaction_DeletePrivateOfferDocument_sync] -require "google/cloud/commerce_producer/v1beta" - -## -# Snippet for the delete_private_offer_document call in the CommerceTransaction service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#delete_private_offer_document. -# -def delete_private_offer_document - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CommerceProducer::V1beta::DeletePrivateOfferDocumentRequest.new - - # Call the delete_private_offer_document method. - result = client.delete_private_offer_document request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END commerceproducer_v1beta_generated_CommerceTransaction_DeletePrivateOfferDocument_sync] diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/get_private_offer.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/get_private_offer.rb deleted file mode 100644 index f426fd9bf6f6..000000000000 --- a/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/get_private_offer.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START commerceproducer_v1beta_generated_CommerceTransaction_GetPrivateOffer_sync] -require "google/cloud/commerce_producer/v1beta" - -## -# Snippet for the get_private_offer call in the CommerceTransaction service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#get_private_offer. -# -def get_private_offer - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CommerceProducer::V1beta::GetPrivateOfferRequest.new - - # Call the get_private_offer method. - result = client.get_private_offer request - - # The returned object is of type Google::Cloud::CommerceProducer::V1beta::PrivateOffer. - p result -end -# [END commerceproducer_v1beta_generated_CommerceTransaction_GetPrivateOffer_sync] diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/get_private_offer_document.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/get_private_offer_document.rb deleted file mode 100644 index 2ee91eb5dba5..000000000000 --- a/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/get_private_offer_document.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START commerceproducer_v1beta_generated_CommerceTransaction_GetPrivateOfferDocument_sync] -require "google/cloud/commerce_producer/v1beta" - -## -# Snippet for the get_private_offer_document call in the CommerceTransaction service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#get_private_offer_document. -# -def get_private_offer_document - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CommerceProducer::V1beta::GetPrivateOfferDocumentRequest.new - - # Call the get_private_offer_document method. - result = client.get_private_offer_document request - - # The returned object is of type Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument. - p result -end -# [END commerceproducer_v1beta_generated_CommerceTransaction_GetPrivateOfferDocument_sync] diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/get_service.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/get_service.rb deleted file mode 100644 index ea66e846642c..000000000000 --- a/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/get_service.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START commerceproducer_v1beta_generated_CommerceTransaction_GetService_sync] -require "google/cloud/commerce_producer/v1beta" - -## -# Snippet for the get_service call in the CommerceTransaction service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#get_service. -# -def get_service - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CommerceProducer::V1beta::GetServiceRequest.new - - # Call the get_service method. - result = client.get_service request - - # The returned object is of type Google::Cloud::CommerceProducer::V1beta::Service. - p result -end -# [END commerceproducer_v1beta_generated_CommerceTransaction_GetService_sync] diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/get_sku.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/get_sku.rb deleted file mode 100644 index 6a01f721fa6e..000000000000 --- a/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/get_sku.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START commerceproducer_v1beta_generated_CommerceTransaction_GetSku_sync] -require "google/cloud/commerce_producer/v1beta" - -## -# Snippet for the get_sku call in the CommerceTransaction service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#get_sku. -# -def get_sku - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CommerceProducer::V1beta::GetSkuRequest.new - - # Call the get_sku method. - result = client.get_sku request - - # The returned object is of type Google::Cloud::CommerceProducer::V1beta::Sku. - p result -end -# [END commerceproducer_v1beta_generated_CommerceTransaction_GetSku_sync] diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/get_sku_group.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/get_sku_group.rb deleted file mode 100644 index f3f1cfe49856..000000000000 --- a/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/get_sku_group.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START commerceproducer_v1beta_generated_CommerceTransaction_GetSkuGroup_sync] -require "google/cloud/commerce_producer/v1beta" - -## -# Snippet for the get_sku_group call in the CommerceTransaction service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#get_sku_group. -# -def get_sku_group - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CommerceProducer::V1beta::GetSkuGroupRequest.new - - # Call the get_sku_group method. - result = client.get_sku_group request - - # The returned object is of type Google::Cloud::CommerceProducer::V1beta::SkuGroup. - p result -end -# [END commerceproducer_v1beta_generated_CommerceTransaction_GetSkuGroup_sync] diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/get_standard_offer.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/get_standard_offer.rb deleted file mode 100644 index 30bb3d82db00..000000000000 --- a/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/get_standard_offer.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START commerceproducer_v1beta_generated_CommerceTransaction_GetStandardOffer_sync] -require "google/cloud/commerce_producer/v1beta" - -## -# Snippet for the get_standard_offer call in the CommerceTransaction service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#get_standard_offer. -# -def get_standard_offer - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CommerceProducer::V1beta::GetStandardOfferRequest.new - - # Call the get_standard_offer method. - result = client.get_standard_offer request - - # The returned object is of type Google::Cloud::CommerceProducer::V1beta::StandardOffer. - p result -end -# [END commerceproducer_v1beta_generated_CommerceTransaction_GetStandardOffer_sync] diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/list_private_offer_documents.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/list_private_offer_documents.rb deleted file mode 100644 index 90be76588c1f..000000000000 --- a/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/list_private_offer_documents.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START commerceproducer_v1beta_generated_CommerceTransaction_ListPrivateOfferDocuments_sync] -require "google/cloud/commerce_producer/v1beta" - -## -# Snippet for the list_private_offer_documents call in the CommerceTransaction service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#list_private_offer_documents. -# -def list_private_offer_documents - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CommerceProducer::V1beta::ListPrivateOfferDocumentsRequest.new - - # Call the list_private_offer_documents method. - result = client.list_private_offer_documents request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument. - p item - end -end -# [END commerceproducer_v1beta_generated_CommerceTransaction_ListPrivateOfferDocuments_sync] diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/list_private_offers.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/list_private_offers.rb deleted file mode 100644 index 69eebe671065..000000000000 --- a/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/list_private_offers.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START commerceproducer_v1beta_generated_CommerceTransaction_ListPrivateOffers_sync] -require "google/cloud/commerce_producer/v1beta" - -## -# Snippet for the list_private_offers call in the CommerceTransaction service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#list_private_offers. -# -def list_private_offers - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CommerceProducer::V1beta::ListPrivateOffersRequest.new - - # Call the list_private_offers method. - result = client.list_private_offers request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::CommerceProducer::V1beta::PrivateOffer. - p item - end -end -# [END commerceproducer_v1beta_generated_CommerceTransaction_ListPrivateOffers_sync] diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/list_services.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/list_services.rb deleted file mode 100644 index 1d7fbc02c82e..000000000000 --- a/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/list_services.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START commerceproducer_v1beta_generated_CommerceTransaction_ListServices_sync] -require "google/cloud/commerce_producer/v1beta" - -## -# Snippet for the list_services call in the CommerceTransaction service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#list_services. -# -def list_services - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CommerceProducer::V1beta::ListServicesRequest.new - - # Call the list_services method. - result = client.list_services request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::CommerceProducer::V1beta::Service. - p item - end -end -# [END commerceproducer_v1beta_generated_CommerceTransaction_ListServices_sync] diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/list_sku_groups.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/list_sku_groups.rb deleted file mode 100644 index 1a3ed475eab3..000000000000 --- a/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/list_sku_groups.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START commerceproducer_v1beta_generated_CommerceTransaction_ListSkuGroups_sync] -require "google/cloud/commerce_producer/v1beta" - -## -# Snippet for the list_sku_groups call in the CommerceTransaction service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#list_sku_groups. -# -def list_sku_groups - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CommerceProducer::V1beta::ListSkuGroupsRequest.new - - # Call the list_sku_groups method. - result = client.list_sku_groups request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::CommerceProducer::V1beta::SkuGroup. - p item - end -end -# [END commerceproducer_v1beta_generated_CommerceTransaction_ListSkuGroups_sync] diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/list_skus.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/list_skus.rb deleted file mode 100644 index 0f4ed20c182e..000000000000 --- a/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/list_skus.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START commerceproducer_v1beta_generated_CommerceTransaction_ListSkus_sync] -require "google/cloud/commerce_producer/v1beta" - -## -# Snippet for the list_skus call in the CommerceTransaction service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#list_skus. -# -def list_skus - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CommerceProducer::V1beta::ListSkusRequest.new - - # Call the list_skus method. - result = client.list_skus request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::CommerceProducer::V1beta::Sku. - p item - end -end -# [END commerceproducer_v1beta_generated_CommerceTransaction_ListSkus_sync] diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/list_standard_offers.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/list_standard_offers.rb deleted file mode 100644 index 3ea41da0474d..000000000000 --- a/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/list_standard_offers.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START commerceproducer_v1beta_generated_CommerceTransaction_ListStandardOffers_sync] -require "google/cloud/commerce_producer/v1beta" - -## -# Snippet for the list_standard_offers call in the CommerceTransaction service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#list_standard_offers. -# -def list_standard_offers - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CommerceProducer::V1beta::ListStandardOffersRequest.new - - # Call the list_standard_offers method. - result = client.list_standard_offers request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::CommerceProducer::V1beta::StandardOffer. - p item - end -end -# [END commerceproducer_v1beta_generated_CommerceTransaction_ListStandardOffers_sync] diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/publish_private_offer.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/publish_private_offer.rb deleted file mode 100644 index e46a86871be8..000000000000 --- a/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/publish_private_offer.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START commerceproducer_v1beta_generated_CommerceTransaction_PublishPrivateOffer_sync] -require "google/cloud/commerce_producer/v1beta" - -## -# Snippet for the publish_private_offer call in the CommerceTransaction service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#publish_private_offer. -# -def publish_private_offer - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CommerceProducer::V1beta::PublishPrivateOfferRequest.new - - # Call the publish_private_offer method. - result = client.publish_private_offer request - - # The returned object is of type Google::Cloud::CommerceProducer::V1beta::PrivateOffer. - p result -end -# [END commerceproducer_v1beta_generated_CommerceTransaction_PublishPrivateOffer_sync] diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/resolve_amendment_target.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/resolve_amendment_target.rb deleted file mode 100644 index b9a314fa9449..000000000000 --- a/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/resolve_amendment_target.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START commerceproducer_v1beta_generated_CommerceTransaction_ResolveAmendmentTarget_sync] -require "google/cloud/commerce_producer/v1beta" - -## -# Snippet for the resolve_amendment_target call in the CommerceTransaction service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#resolve_amendment_target. -# -def resolve_amendment_target - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CommerceProducer::V1beta::ResolveAmendmentTargetRequest.new - - # Call the resolve_amendment_target method. - result = client.resolve_amendment_target request - - # The returned object is of type Google::Cloud::CommerceProducer::V1beta::ResolveAmendmentTargetResponse. - p result -end -# [END commerceproducer_v1beta_generated_CommerceTransaction_ResolveAmendmentTarget_sync] diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/update_private_offer.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/update_private_offer.rb deleted file mode 100644 index 4ce3fe737a2c..000000000000 --- a/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/update_private_offer.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START commerceproducer_v1beta_generated_CommerceTransaction_UpdatePrivateOffer_sync] -require "google/cloud/commerce_producer/v1beta" - -## -# Snippet for the update_private_offer call in the CommerceTransaction service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#update_private_offer. -# -def update_private_offer - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CommerceProducer::V1beta::UpdatePrivateOfferRequest.new - - # Call the update_private_offer method. - result = client.update_private_offer request - - # The returned object is of type Google::Cloud::CommerceProducer::V1beta::PrivateOffer. - p result -end -# [END commerceproducer_v1beta_generated_CommerceTransaction_UpdatePrivateOffer_sync] diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/update_private_offer_document.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/update_private_offer_document.rb deleted file mode 100644 index 1c02c7e033bd..000000000000 --- a/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/commerce_transaction/update_private_offer_document.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START commerceproducer_v1beta_generated_CommerceTransaction_UpdatePrivateOfferDocument_sync] -require "google/cloud/commerce_producer/v1beta" - -## -# Snippet for the update_private_offer_document call in the CommerceTransaction service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#update_private_offer_document. -# -def update_private_offer_document - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::CommerceProducer::V1beta::UpdatePrivateOfferDocumentRequest.new - - # Call the update_private_offer_document method. - result = client.update_private_offer_document request - - # The returned object is of type Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument. - p result -end -# [END commerceproducer_v1beta_generated_CommerceTransaction_UpdatePrivateOfferDocument_sync] diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/snippet_metadata_google.cloud.commerceproducer.v1beta.json b/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/snippet_metadata_google.cloud.commerceproducer.v1beta.json deleted file mode 100644 index 6e1a305a5059..000000000000 --- a/owl-bot-staging/google-cloud-commerce_producer-v1beta/snippets/snippet_metadata_google.cloud.commerceproducer.v1beta.json +++ /dev/null @@ -1,855 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-commerce_producer-v1beta", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.commerceproducer.v1beta", - "version": "v1beta" - } - ] - }, - "snippets": [ - { - "region_tag": "commerceproducer_v1beta_generated_CommerceTransaction_ListServices_sync", - "title": "Snippet for the list_services call in the CommerceTransaction service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#list_services.", - "file": "commerce_transaction/list_services.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_services", - "full_name": "::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#list_services", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CommerceProducer::V1beta::ListServicesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::CommerceProducer::V1beta::ListServicesResponse", - "client": { - "short_name": "CommerceTransaction::Client", - "full_name": "::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client" - }, - "method": { - "short_name": "ListServices", - "full_name": "google.cloud.commerceproducer.v1beta.CommerceTransaction.ListServices", - "service": { - "short_name": "CommerceTransaction", - "full_name": "google.cloud.commerceproducer.v1beta.CommerceTransaction" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "commerceproducer_v1beta_generated_CommerceTransaction_GetService_sync", - "title": "Snippet for the get_service call in the CommerceTransaction service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#get_service.", - "file": "commerce_transaction/get_service.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_service", - "full_name": "::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#get_service", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CommerceProducer::V1beta::GetServiceRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::CommerceProducer::V1beta::Service", - "client": { - "short_name": "CommerceTransaction::Client", - "full_name": "::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client" - }, - "method": { - "short_name": "GetService", - "full_name": "google.cloud.commerceproducer.v1beta.CommerceTransaction.GetService", - "service": { - "short_name": "CommerceTransaction", - "full_name": "google.cloud.commerceproducer.v1beta.CommerceTransaction" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "commerceproducer_v1beta_generated_CommerceTransaction_ListPrivateOffers_sync", - "title": "Snippet for the list_private_offers call in the CommerceTransaction service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#list_private_offers.", - "file": "commerce_transaction/list_private_offers.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_private_offers", - "full_name": "::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#list_private_offers", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CommerceProducer::V1beta::ListPrivateOffersRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::CommerceProducer::V1beta::ListPrivateOffersResponse", - "client": { - "short_name": "CommerceTransaction::Client", - "full_name": "::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client" - }, - "method": { - "short_name": "ListPrivateOffers", - "full_name": "google.cloud.commerceproducer.v1beta.CommerceTransaction.ListPrivateOffers", - "service": { - "short_name": "CommerceTransaction", - "full_name": "google.cloud.commerceproducer.v1beta.CommerceTransaction" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "commerceproducer_v1beta_generated_CommerceTransaction_GetPrivateOffer_sync", - "title": "Snippet for the get_private_offer call in the CommerceTransaction service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#get_private_offer.", - "file": "commerce_transaction/get_private_offer.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_private_offer", - "full_name": "::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#get_private_offer", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CommerceProducer::V1beta::GetPrivateOfferRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::CommerceProducer::V1beta::PrivateOffer", - "client": { - "short_name": "CommerceTransaction::Client", - "full_name": "::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client" - }, - "method": { - "short_name": "GetPrivateOffer", - "full_name": "google.cloud.commerceproducer.v1beta.CommerceTransaction.GetPrivateOffer", - "service": { - "short_name": "CommerceTransaction", - "full_name": "google.cloud.commerceproducer.v1beta.CommerceTransaction" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "commerceproducer_v1beta_generated_CommerceTransaction_ResolveAmendmentTarget_sync", - "title": "Snippet for the resolve_amendment_target call in the CommerceTransaction service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#resolve_amendment_target.", - "file": "commerce_transaction/resolve_amendment_target.rb", - "language": "RUBY", - "client_method": { - "short_name": "resolve_amendment_target", - "full_name": "::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#resolve_amendment_target", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CommerceProducer::V1beta::ResolveAmendmentTargetRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::CommerceProducer::V1beta::ResolveAmendmentTargetResponse", - "client": { - "short_name": "CommerceTransaction::Client", - "full_name": "::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client" - }, - "method": { - "short_name": "ResolveAmendmentTarget", - "full_name": "google.cloud.commerceproducer.v1beta.CommerceTransaction.ResolveAmendmentTarget", - "service": { - "short_name": "CommerceTransaction", - "full_name": "google.cloud.commerceproducer.v1beta.CommerceTransaction" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "commerceproducer_v1beta_generated_CommerceTransaction_CreatePrivateOffer_sync", - "title": "Snippet for the create_private_offer call in the CommerceTransaction service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#create_private_offer.", - "file": "commerce_transaction/create_private_offer.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_private_offer", - "full_name": "::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#create_private_offer", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CommerceProducer::V1beta::CreatePrivateOfferRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::CommerceProducer::V1beta::PrivateOffer", - "client": { - "short_name": "CommerceTransaction::Client", - "full_name": "::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client" - }, - "method": { - "short_name": "CreatePrivateOffer", - "full_name": "google.cloud.commerceproducer.v1beta.CommerceTransaction.CreatePrivateOffer", - "service": { - "short_name": "CommerceTransaction", - "full_name": "google.cloud.commerceproducer.v1beta.CommerceTransaction" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "commerceproducer_v1beta_generated_CommerceTransaction_UpdatePrivateOffer_sync", - "title": "Snippet for the update_private_offer call in the CommerceTransaction service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#update_private_offer.", - "file": "commerce_transaction/update_private_offer.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_private_offer", - "full_name": "::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#update_private_offer", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CommerceProducer::V1beta::UpdatePrivateOfferRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::CommerceProducer::V1beta::PrivateOffer", - "client": { - "short_name": "CommerceTransaction::Client", - "full_name": "::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client" - }, - "method": { - "short_name": "UpdatePrivateOffer", - "full_name": "google.cloud.commerceproducer.v1beta.CommerceTransaction.UpdatePrivateOffer", - "service": { - "short_name": "CommerceTransaction", - "full_name": "google.cloud.commerceproducer.v1beta.CommerceTransaction" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "commerceproducer_v1beta_generated_CommerceTransaction_PublishPrivateOffer_sync", - "title": "Snippet for the publish_private_offer call in the CommerceTransaction service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#publish_private_offer.", - "file": "commerce_transaction/publish_private_offer.rb", - "language": "RUBY", - "client_method": { - "short_name": "publish_private_offer", - "full_name": "::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#publish_private_offer", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CommerceProducer::V1beta::PublishPrivateOfferRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::CommerceProducer::V1beta::PrivateOffer", - "client": { - "short_name": "CommerceTransaction::Client", - "full_name": "::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client" - }, - "method": { - "short_name": "PublishPrivateOffer", - "full_name": "google.cloud.commerceproducer.v1beta.CommerceTransaction.PublishPrivateOffer", - "service": { - "short_name": "CommerceTransaction", - "full_name": "google.cloud.commerceproducer.v1beta.CommerceTransaction" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "commerceproducer_v1beta_generated_CommerceTransaction_CancelPrivateOffer_sync", - "title": "Snippet for the cancel_private_offer call in the CommerceTransaction service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#cancel_private_offer.", - "file": "commerce_transaction/cancel_private_offer.rb", - "language": "RUBY", - "client_method": { - "short_name": "cancel_private_offer", - "full_name": "::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#cancel_private_offer", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CommerceProducer::V1beta::CancelPrivateOfferRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::CommerceProducer::V1beta::PrivateOffer", - "client": { - "short_name": "CommerceTransaction::Client", - "full_name": "::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client" - }, - "method": { - "short_name": "CancelPrivateOffer", - "full_name": "google.cloud.commerceproducer.v1beta.CommerceTransaction.CancelPrivateOffer", - "service": { - "short_name": "CommerceTransaction", - "full_name": "google.cloud.commerceproducer.v1beta.CommerceTransaction" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "commerceproducer_v1beta_generated_CommerceTransaction_DeletePrivateOffer_sync", - "title": "Snippet for the delete_private_offer call in the CommerceTransaction service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#delete_private_offer.", - "file": "commerce_transaction/delete_private_offer.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_private_offer", - "full_name": "::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#delete_private_offer", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CommerceProducer::V1beta::DeletePrivateOfferRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "CommerceTransaction::Client", - "full_name": "::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client" - }, - "method": { - "short_name": "DeletePrivateOffer", - "full_name": "google.cloud.commerceproducer.v1beta.CommerceTransaction.DeletePrivateOffer", - "service": { - "short_name": "CommerceTransaction", - "full_name": "google.cloud.commerceproducer.v1beta.CommerceTransaction" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "commerceproducer_v1beta_generated_CommerceTransaction_ListPrivateOfferDocuments_sync", - "title": "Snippet for the list_private_offer_documents call in the CommerceTransaction service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#list_private_offer_documents.", - "file": "commerce_transaction/list_private_offer_documents.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_private_offer_documents", - "full_name": "::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#list_private_offer_documents", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CommerceProducer::V1beta::ListPrivateOfferDocumentsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::CommerceProducer::V1beta::ListPrivateOfferDocumentsResponse", - "client": { - "short_name": "CommerceTransaction::Client", - "full_name": "::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client" - }, - "method": { - "short_name": "ListPrivateOfferDocuments", - "full_name": "google.cloud.commerceproducer.v1beta.CommerceTransaction.ListPrivateOfferDocuments", - "service": { - "short_name": "CommerceTransaction", - "full_name": "google.cloud.commerceproducer.v1beta.CommerceTransaction" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "commerceproducer_v1beta_generated_CommerceTransaction_GetPrivateOfferDocument_sync", - "title": "Snippet for the get_private_offer_document call in the CommerceTransaction service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#get_private_offer_document.", - "file": "commerce_transaction/get_private_offer_document.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_private_offer_document", - "full_name": "::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#get_private_offer_document", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CommerceProducer::V1beta::GetPrivateOfferDocumentRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument", - "client": { - "short_name": "CommerceTransaction::Client", - "full_name": "::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client" - }, - "method": { - "short_name": "GetPrivateOfferDocument", - "full_name": "google.cloud.commerceproducer.v1beta.CommerceTransaction.GetPrivateOfferDocument", - "service": { - "short_name": "CommerceTransaction", - "full_name": "google.cloud.commerceproducer.v1beta.CommerceTransaction" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "commerceproducer_v1beta_generated_CommerceTransaction_CreatePrivateOfferDocument_sync", - "title": "Snippet for the create_private_offer_document call in the CommerceTransaction service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#create_private_offer_document.", - "file": "commerce_transaction/create_private_offer_document.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_private_offer_document", - "full_name": "::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#create_private_offer_document", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CommerceProducer::V1beta::CreatePrivateOfferDocumentRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument", - "client": { - "short_name": "CommerceTransaction::Client", - "full_name": "::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client" - }, - "method": { - "short_name": "CreatePrivateOfferDocument", - "full_name": "google.cloud.commerceproducer.v1beta.CommerceTransaction.CreatePrivateOfferDocument", - "service": { - "short_name": "CommerceTransaction", - "full_name": "google.cloud.commerceproducer.v1beta.CommerceTransaction" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "commerceproducer_v1beta_generated_CommerceTransaction_UpdatePrivateOfferDocument_sync", - "title": "Snippet for the update_private_offer_document call in the CommerceTransaction service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#update_private_offer_document.", - "file": "commerce_transaction/update_private_offer_document.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_private_offer_document", - "full_name": "::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#update_private_offer_document", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CommerceProducer::V1beta::UpdatePrivateOfferDocumentRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument", - "client": { - "short_name": "CommerceTransaction::Client", - "full_name": "::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client" - }, - "method": { - "short_name": "UpdatePrivateOfferDocument", - "full_name": "google.cloud.commerceproducer.v1beta.CommerceTransaction.UpdatePrivateOfferDocument", - "service": { - "short_name": "CommerceTransaction", - "full_name": "google.cloud.commerceproducer.v1beta.CommerceTransaction" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "commerceproducer_v1beta_generated_CommerceTransaction_DeletePrivateOfferDocument_sync", - "title": "Snippet for the delete_private_offer_document call in the CommerceTransaction service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#delete_private_offer_document.", - "file": "commerce_transaction/delete_private_offer_document.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_private_offer_document", - "full_name": "::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#delete_private_offer_document", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CommerceProducer::V1beta::DeletePrivateOfferDocumentRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "CommerceTransaction::Client", - "full_name": "::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client" - }, - "method": { - "short_name": "DeletePrivateOfferDocument", - "full_name": "google.cloud.commerceproducer.v1beta.CommerceTransaction.DeletePrivateOfferDocument", - "service": { - "short_name": "CommerceTransaction", - "full_name": "google.cloud.commerceproducer.v1beta.CommerceTransaction" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "commerceproducer_v1beta_generated_CommerceTransaction_ListStandardOffers_sync", - "title": "Snippet for the list_standard_offers call in the CommerceTransaction service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#list_standard_offers.", - "file": "commerce_transaction/list_standard_offers.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_standard_offers", - "full_name": "::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#list_standard_offers", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CommerceProducer::V1beta::ListStandardOffersRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::CommerceProducer::V1beta::ListStandardOffersResponse", - "client": { - "short_name": "CommerceTransaction::Client", - "full_name": "::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client" - }, - "method": { - "short_name": "ListStandardOffers", - "full_name": "google.cloud.commerceproducer.v1beta.CommerceTransaction.ListStandardOffers", - "service": { - "short_name": "CommerceTransaction", - "full_name": "google.cloud.commerceproducer.v1beta.CommerceTransaction" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "commerceproducer_v1beta_generated_CommerceTransaction_GetStandardOffer_sync", - "title": "Snippet for the get_standard_offer call in the CommerceTransaction service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#get_standard_offer.", - "file": "commerce_transaction/get_standard_offer.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_standard_offer", - "full_name": "::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#get_standard_offer", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CommerceProducer::V1beta::GetStandardOfferRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::CommerceProducer::V1beta::StandardOffer", - "client": { - "short_name": "CommerceTransaction::Client", - "full_name": "::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client" - }, - "method": { - "short_name": "GetStandardOffer", - "full_name": "google.cloud.commerceproducer.v1beta.CommerceTransaction.GetStandardOffer", - "service": { - "short_name": "CommerceTransaction", - "full_name": "google.cloud.commerceproducer.v1beta.CommerceTransaction" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "commerceproducer_v1beta_generated_CommerceTransaction_GetSku_sync", - "title": "Snippet for the get_sku call in the CommerceTransaction service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#get_sku.", - "file": "commerce_transaction/get_sku.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_sku", - "full_name": "::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#get_sku", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CommerceProducer::V1beta::GetSkuRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::CommerceProducer::V1beta::Sku", - "client": { - "short_name": "CommerceTransaction::Client", - "full_name": "::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client" - }, - "method": { - "short_name": "GetSku", - "full_name": "google.cloud.commerceproducer.v1beta.CommerceTransaction.GetSku", - "service": { - "short_name": "CommerceTransaction", - "full_name": "google.cloud.commerceproducer.v1beta.CommerceTransaction" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "commerceproducer_v1beta_generated_CommerceTransaction_ListSkus_sync", - "title": "Snippet for the list_skus call in the CommerceTransaction service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#list_skus.", - "file": "commerce_transaction/list_skus.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_skus", - "full_name": "::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#list_skus", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CommerceProducer::V1beta::ListSkusRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::CommerceProducer::V1beta::ListSkusResponse", - "client": { - "short_name": "CommerceTransaction::Client", - "full_name": "::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client" - }, - "method": { - "short_name": "ListSkus", - "full_name": "google.cloud.commerceproducer.v1beta.CommerceTransaction.ListSkus", - "service": { - "short_name": "CommerceTransaction", - "full_name": "google.cloud.commerceproducer.v1beta.CommerceTransaction" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "commerceproducer_v1beta_generated_CommerceTransaction_GetSkuGroup_sync", - "title": "Snippet for the get_sku_group call in the CommerceTransaction service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#get_sku_group.", - "file": "commerce_transaction/get_sku_group.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_sku_group", - "full_name": "::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#get_sku_group", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CommerceProducer::V1beta::GetSkuGroupRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::CommerceProducer::V1beta::SkuGroup", - "client": { - "short_name": "CommerceTransaction::Client", - "full_name": "::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client" - }, - "method": { - "short_name": "GetSkuGroup", - "full_name": "google.cloud.commerceproducer.v1beta.CommerceTransaction.GetSkuGroup", - "service": { - "short_name": "CommerceTransaction", - "full_name": "google.cloud.commerceproducer.v1beta.CommerceTransaction" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "commerceproducer_v1beta_generated_CommerceTransaction_ListSkuGroups_sync", - "title": "Snippet for the list_sku_groups call in the CommerceTransaction service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#list_sku_groups.", - "file": "commerce_transaction/list_sku_groups.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_sku_groups", - "full_name": "::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client#list_sku_groups", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::CommerceProducer::V1beta::ListSkuGroupsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::CommerceProducer::V1beta::ListSkuGroupsResponse", - "client": { - "short_name": "CommerceTransaction::Client", - "full_name": "::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client" - }, - "method": { - "short_name": "ListSkuGroups", - "full_name": "google.cloud.commerceproducer.v1beta.CommerceTransaction.ListSkuGroups", - "service": { - "short_name": "CommerceTransaction", - "full_name": "google.cloud.commerceproducer.v1beta.CommerceTransaction" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - } - ] -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/test/google/cloud/commerce_producer/v1beta/commerce_transaction_paths_test.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/test/google/cloud/commerce_producer/v1beta/commerce_transaction_paths_test.rb deleted file mode 100644 index f104260060f1..000000000000 --- a/owl-bot-staging/google-cloud-commerce_producer-v1beta/test/google/cloud/commerce_producer/v1beta/commerce_transaction_paths_test.rb +++ /dev/null @@ -1,139 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/commerce_producer/v1beta/commerce_transaction" - -class ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_billing_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.billing_account_path billing_account: "value0" - assert_equal "billingAccounts/value0", path - end - end - - def test_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.location_path project: "value0", location: "value1" - assert_equal "projects/value0/locations/value1", path - end - end - - def test_private_offer_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.private_offer_path project: "value0", location: "value1", private_offer: "value2" - assert_equal "projects/value0/locations/value1/privateOffers/value2", path - end - end - - def test_private_offer_document_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.private_offer_document_path project: "value0", location: "value1", private_offer: "value2", document: "value3" - assert_equal "projects/value0/locations/value1/privateOffers/value2/documents/value3", path - end - end - - def test_service_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.service_path project: "value0", location: "value1", service: "value2" - assert_equal "projects/value0/locations/value1/services/value2", path - end - end - - def test_sku_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.sku_path project: "value0", location: "value1", service: "value2", sku: "value3" - assert_equal "projects/value0/locations/value1/services/value2/skus/value3", path - end - end - - def test_sku_group_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.sku_group_path project: "value0", location: "value1", sku_group: "value2" - assert_equal "projects/value0/locations/value1/skuGroups/value2", path - end - end - - def test_standard_offer_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.standard_offer_path project: "value0", location: "value1", service: "value2", standard_offer: "value3" - assert_equal "projects/value0/locations/value1/services/value2/standardOffers/value3", path - end - end -end diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/test/google/cloud/commerce_producer/v1beta/commerce_transaction_rest_test.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/test/google/cloud/commerce_producer/v1beta/commerce_transaction_rest_test.rb deleted file mode 100644 index ec7162fbeb3b..000000000000 --- a/owl-bot-staging/google-cloud-commerce_producer-v1beta/test/google/cloud/commerce_producer/v1beta/commerce_transaction_rest_test.rb +++ /dev/null @@ -1,1261 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/cloud/commerceproducer/v1beta/commerce_transaction_pb" -require "google/cloud/commerce_producer/v1beta/commerce_transaction/rest" - - -class ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_services - # Create test objects. - client_result = ::Google::Cloud::CommerceProducer::V1beta::ListServicesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_services_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::ServiceStub.stub :transcode_list_services_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_services_client_stub do - # Create client - c = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_services({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_services parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_services ::Google::Cloud::CommerceProducer::V1beta::ListServicesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_services({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_services(::Google::Cloud::CommerceProducer::V1beta::ListServicesRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_services_client_stub.call_count - end - end - end - - def test_get_service - # Create test objects. - client_result = ::Google::Cloud::CommerceProducer::V1beta::Service.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - view = :SERVICE_VIEW_UNSPECIFIED - - get_service_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::ServiceStub.stub :transcode_get_service_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_service_client_stub do - # Create client - c = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_service({ name: name, view: view }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_service name: name, view: view do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_service ::Google::Cloud::CommerceProducer::V1beta::GetServiceRequest.new(name: name, view: view) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_service({ name: name, view: view }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_service(::Google::Cloud::CommerceProducer::V1beta::GetServiceRequest.new(name: name, view: view), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_service_client_stub.call_count - end - end - end - - def test_list_private_offers - # Create test objects. - client_result = ::Google::Cloud::CommerceProducer::V1beta::ListPrivateOffersResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_private_offers_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::ServiceStub.stub :transcode_list_private_offers_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_private_offers_client_stub do - # Create client - c = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_private_offers({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_private_offers parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_private_offers ::Google::Cloud::CommerceProducer::V1beta::ListPrivateOffersRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_private_offers({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_private_offers(::Google::Cloud::CommerceProducer::V1beta::ListPrivateOffersRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_private_offers_client_stub.call_count - end - end - end - - def test_get_private_offer - # Create test objects. - client_result = ::Google::Cloud::CommerceProducer::V1beta::PrivateOffer.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - view = :PRIVATE_OFFER_VIEW_UNSPECIFIED - - get_private_offer_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::ServiceStub.stub :transcode_get_private_offer_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_private_offer_client_stub do - # Create client - c = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_private_offer({ name: name, view: view }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_private_offer name: name, view: view do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_private_offer ::Google::Cloud::CommerceProducer::V1beta::GetPrivateOfferRequest.new(name: name, view: view) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_private_offer({ name: name, view: view }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_private_offer(::Google::Cloud::CommerceProducer::V1beta::GetPrivateOfferRequest.new(name: name, view: view), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_private_offer_client_stub.call_count - end - end - end - - def test_resolve_amendment_target - # Create test objects. - client_result = ::Google::Cloud::CommerceProducer::V1beta::ResolveAmendmentTargetResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - target_billing_account = "hello world" - base_standard_offer = "hello world" - - resolve_amendment_target_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::ServiceStub.stub :transcode_resolve_amendment_target_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, resolve_amendment_target_client_stub do - # Create client - c = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.resolve_amendment_target({ parent: parent, target_billing_account: target_billing_account, base_standard_offer: base_standard_offer }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.resolve_amendment_target parent: parent, target_billing_account: target_billing_account, base_standard_offer: base_standard_offer do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.resolve_amendment_target ::Google::Cloud::CommerceProducer::V1beta::ResolveAmendmentTargetRequest.new(parent: parent, target_billing_account: target_billing_account, base_standard_offer: base_standard_offer) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.resolve_amendment_target({ parent: parent, target_billing_account: target_billing_account, base_standard_offer: base_standard_offer }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.resolve_amendment_target(::Google::Cloud::CommerceProducer::V1beta::ResolveAmendmentTargetRequest.new(parent: parent, target_billing_account: target_billing_account, base_standard_offer: base_standard_offer), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, resolve_amendment_target_client_stub.call_count - end - end - end - - def test_create_private_offer - # Create test objects. - client_result = ::Google::Cloud::CommerceProducer::V1beta::PrivateOffer.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - private_offer = {} - - create_private_offer_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::ServiceStub.stub :transcode_create_private_offer_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_private_offer_client_stub do - # Create client - c = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_private_offer({ parent: parent, private_offer: private_offer }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_private_offer parent: parent, private_offer: private_offer do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_private_offer ::Google::Cloud::CommerceProducer::V1beta::CreatePrivateOfferRequest.new(parent: parent, private_offer: private_offer) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_private_offer({ parent: parent, private_offer: private_offer }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_private_offer(::Google::Cloud::CommerceProducer::V1beta::CreatePrivateOfferRequest.new(parent: parent, private_offer: private_offer), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_private_offer_client_stub.call_count - end - end - end - - def test_update_private_offer - # Create test objects. - client_result = ::Google::Cloud::CommerceProducer::V1beta::PrivateOffer.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - update_mask = {} - private_offer = {} - - update_private_offer_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::ServiceStub.stub :transcode_update_private_offer_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_private_offer_client_stub do - # Create client - c = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_private_offer({ update_mask: update_mask, private_offer: private_offer }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_private_offer update_mask: update_mask, private_offer: private_offer do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_private_offer ::Google::Cloud::CommerceProducer::V1beta::UpdatePrivateOfferRequest.new(update_mask: update_mask, private_offer: private_offer) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_private_offer({ update_mask: update_mask, private_offer: private_offer }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_private_offer(::Google::Cloud::CommerceProducer::V1beta::UpdatePrivateOfferRequest.new(update_mask: update_mask, private_offer: private_offer), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_private_offer_client_stub.call_count - end - end - end - - def test_publish_private_offer - # Create test objects. - client_result = ::Google::Cloud::CommerceProducer::V1beta::PrivateOffer.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - validate_only = true - - publish_private_offer_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::ServiceStub.stub :transcode_publish_private_offer_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, publish_private_offer_client_stub do - # Create client - c = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.publish_private_offer({ name: name, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.publish_private_offer name: name, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.publish_private_offer ::Google::Cloud::CommerceProducer::V1beta::PublishPrivateOfferRequest.new(name: name, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.publish_private_offer({ name: name, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.publish_private_offer(::Google::Cloud::CommerceProducer::V1beta::PublishPrivateOfferRequest.new(name: name, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, publish_private_offer_client_stub.call_count - end - end - end - - def test_cancel_private_offer - # Create test objects. - client_result = ::Google::Cloud::CommerceProducer::V1beta::PrivateOffer.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - cancellation_note = "hello world" - - cancel_private_offer_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::ServiceStub.stub :transcode_cancel_private_offer_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, cancel_private_offer_client_stub do - # Create client - c = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.cancel_private_offer({ name: name, cancellation_note: cancellation_note }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.cancel_private_offer name: name, cancellation_note: cancellation_note do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.cancel_private_offer ::Google::Cloud::CommerceProducer::V1beta::CancelPrivateOfferRequest.new(name: name, cancellation_note: cancellation_note) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.cancel_private_offer({ name: name, cancellation_note: cancellation_note }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.cancel_private_offer(::Google::Cloud::CommerceProducer::V1beta::CancelPrivateOfferRequest.new(name: name, cancellation_note: cancellation_note), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, cancel_private_offer_client_stub.call_count - end - end - end - - def test_delete_private_offer - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - force = true - - delete_private_offer_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::ServiceStub.stub :transcode_delete_private_offer_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_private_offer_client_stub do - # Create client - c = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_private_offer({ name: name, force: force }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_private_offer name: name, force: force do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_private_offer ::Google::Cloud::CommerceProducer::V1beta::DeletePrivateOfferRequest.new(name: name, force: force) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_private_offer({ name: name, force: force }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_private_offer(::Google::Cloud::CommerceProducer::V1beta::DeletePrivateOfferRequest.new(name: name, force: force), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_private_offer_client_stub.call_count - end - end - end - - def test_list_private_offer_documents - # Create test objects. - client_result = ::Google::Cloud::CommerceProducer::V1beta::ListPrivateOfferDocumentsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_private_offer_documents_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::ServiceStub.stub :transcode_list_private_offer_documents_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_private_offer_documents_client_stub do - # Create client - c = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_private_offer_documents({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_private_offer_documents parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_private_offer_documents ::Google::Cloud::CommerceProducer::V1beta::ListPrivateOfferDocumentsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_private_offer_documents({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_private_offer_documents(::Google::Cloud::CommerceProducer::V1beta::ListPrivateOfferDocumentsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_private_offer_documents_client_stub.call_count - end - end - end - - def test_get_private_offer_document - # Create test objects. - client_result = ::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_private_offer_document_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::ServiceStub.stub :transcode_get_private_offer_document_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_private_offer_document_client_stub do - # Create client - c = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_private_offer_document({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_private_offer_document name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_private_offer_document ::Google::Cloud::CommerceProducer::V1beta::GetPrivateOfferDocumentRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_private_offer_document({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_private_offer_document(::Google::Cloud::CommerceProducer::V1beta::GetPrivateOfferDocumentRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_private_offer_document_client_stub.call_count - end - end - end - - def test_create_private_offer_document - # Create test objects. - client_result = ::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - private_offer_document = {} - - create_private_offer_document_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::ServiceStub.stub :transcode_create_private_offer_document_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_private_offer_document_client_stub do - # Create client - c = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_private_offer_document({ parent: parent, private_offer_document: private_offer_document }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_private_offer_document parent: parent, private_offer_document: private_offer_document do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_private_offer_document ::Google::Cloud::CommerceProducer::V1beta::CreatePrivateOfferDocumentRequest.new(parent: parent, private_offer_document: private_offer_document) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_private_offer_document({ parent: parent, private_offer_document: private_offer_document }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_private_offer_document(::Google::Cloud::CommerceProducer::V1beta::CreatePrivateOfferDocumentRequest.new(parent: parent, private_offer_document: private_offer_document), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_private_offer_document_client_stub.call_count - end - end - end - - def test_update_private_offer_document - # Create test objects. - client_result = ::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - private_offer_document = {} - update_mask = {} - - update_private_offer_document_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::ServiceStub.stub :transcode_update_private_offer_document_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_private_offer_document_client_stub do - # Create client - c = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_private_offer_document({ private_offer_document: private_offer_document, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_private_offer_document private_offer_document: private_offer_document, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_private_offer_document ::Google::Cloud::CommerceProducer::V1beta::UpdatePrivateOfferDocumentRequest.new(private_offer_document: private_offer_document, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_private_offer_document({ private_offer_document: private_offer_document, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_private_offer_document(::Google::Cloud::CommerceProducer::V1beta::UpdatePrivateOfferDocumentRequest.new(private_offer_document: private_offer_document, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_private_offer_document_client_stub.call_count - end - end - end - - def test_delete_private_offer_document - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_private_offer_document_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::ServiceStub.stub :transcode_delete_private_offer_document_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_private_offer_document_client_stub do - # Create client - c = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_private_offer_document({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_private_offer_document name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_private_offer_document ::Google::Cloud::CommerceProducer::V1beta::DeletePrivateOfferDocumentRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_private_offer_document({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_private_offer_document(::Google::Cloud::CommerceProducer::V1beta::DeletePrivateOfferDocumentRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_private_offer_document_client_stub.call_count - end - end - end - - def test_list_standard_offers - # Create test objects. - client_result = ::Google::Cloud::CommerceProducer::V1beta::ListStandardOffersResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_standard_offers_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::ServiceStub.stub :transcode_list_standard_offers_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_standard_offers_client_stub do - # Create client - c = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_standard_offers({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_standard_offers parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_standard_offers ::Google::Cloud::CommerceProducer::V1beta::ListStandardOffersRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_standard_offers({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_standard_offers(::Google::Cloud::CommerceProducer::V1beta::ListStandardOffersRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_standard_offers_client_stub.call_count - end - end - end - - def test_get_standard_offer - # Create test objects. - client_result = ::Google::Cloud::CommerceProducer::V1beta::StandardOffer.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - view = :STANDARD_OFFER_VIEW_UNSPECIFIED - - get_standard_offer_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::ServiceStub.stub :transcode_get_standard_offer_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_standard_offer_client_stub do - # Create client - c = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_standard_offer({ name: name, view: view }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_standard_offer name: name, view: view do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_standard_offer ::Google::Cloud::CommerceProducer::V1beta::GetStandardOfferRequest.new(name: name, view: view) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_standard_offer({ name: name, view: view }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_standard_offer(::Google::Cloud::CommerceProducer::V1beta::GetStandardOfferRequest.new(name: name, view: view), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_standard_offer_client_stub.call_count - end - end - end - - def test_get_sku - # Create test objects. - client_result = ::Google::Cloud::CommerceProducer::V1beta::Sku.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_sku_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::ServiceStub.stub :transcode_get_sku_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_sku_client_stub do - # Create client - c = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_sku({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_sku name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_sku ::Google::Cloud::CommerceProducer::V1beta::GetSkuRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_sku({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_sku(::Google::Cloud::CommerceProducer::V1beta::GetSkuRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_sku_client_stub.call_count - end - end - end - - def test_list_skus - # Create test objects. - client_result = ::Google::Cloud::CommerceProducer::V1beta::ListSkusResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_skus_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::ServiceStub.stub :transcode_list_skus_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_skus_client_stub do - # Create client - c = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_skus({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_skus parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_skus ::Google::Cloud::CommerceProducer::V1beta::ListSkusRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_skus({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_skus(::Google::Cloud::CommerceProducer::V1beta::ListSkusRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_skus_client_stub.call_count - end - end - end - - def test_get_sku_group - # Create test objects. - client_result = ::Google::Cloud::CommerceProducer::V1beta::SkuGroup.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_sku_group_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::ServiceStub.stub :transcode_get_sku_group_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_sku_group_client_stub do - # Create client - c = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_sku_group({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_sku_group name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_sku_group ::Google::Cloud::CommerceProducer::V1beta::GetSkuGroupRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_sku_group({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_sku_group(::Google::Cloud::CommerceProducer::V1beta::GetSkuGroupRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_sku_group_client_stub.call_count - end - end - end - - def test_list_sku_groups - # Create test objects. - client_result = ::Google::Cloud::CommerceProducer::V1beta::ListSkuGroupsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_sku_groups_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::ServiceStub.stub :transcode_list_sku_groups_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_sku_groups_client_stub do - # Create client - c = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_sku_groups({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_sku_groups parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_sku_groups ::Google::Cloud::CommerceProducer::V1beta::ListSkuGroupsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.list_sku_groups({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.list_sku_groups(::Google::Cloud::CommerceProducer::V1beta::ListSkuGroupsRequest.new(parent: parent, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_sku_groups_client_stub.call_count - end - end - end - - def test_configure - credentials_token = :dummy_value - - client = block_config = config = nil - dummy_stub = ClientStub.new nil - Gapic::Rest::ClientStub.stub :new, dummy_stub do - client = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client.new do |config| - config.credentials = credentials_token - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/test/google/cloud/commerce_producer/v1beta/commerce_transaction_test.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/test/google/cloud/commerce_producer/v1beta/commerce_transaction_test.rb deleted file mode 100644 index c33bb10dda26..000000000000 --- a/owl-bot-staging/google-cloud-commerce_producer-v1beta/test/google/cloud/commerce_producer/v1beta/commerce_transaction_test.rb +++ /dev/null @@ -1,1408 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/commerceproducer/v1beta/commerce_transaction_pb" -require "google/cloud/commerce_producer/v1beta/commerce_transaction" - -class ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_services - # Create GRPC objects. - grpc_response = ::Google::Cloud::CommerceProducer::V1beta::ListServicesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_services_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_services, name - assert_kind_of ::Google::Cloud::CommerceProducer::V1beta::ListServicesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_services_client_stub do - # Create client - c = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_services({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_services parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_services ::Google::Cloud::CommerceProducer::V1beta::ListServicesRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_services({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_services(::Google::Cloud::CommerceProducer::V1beta::ListServicesRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_services_client_stub.call_rpc_count - end - end - - def test_get_service - # Create GRPC objects. - grpc_response = ::Google::Cloud::CommerceProducer::V1beta::Service.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - view = :SERVICE_VIEW_UNSPECIFIED - - get_service_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_service, name - assert_kind_of ::Google::Cloud::CommerceProducer::V1beta::GetServiceRequest, request - assert_equal "hello world", request["name"] - assert_equal :SERVICE_VIEW_UNSPECIFIED, request["view"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_service_client_stub do - # Create client - c = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_service({ name: name, view: view }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_service name: name, view: view do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_service ::Google::Cloud::CommerceProducer::V1beta::GetServiceRequest.new(name: name, view: view) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_service({ name: name, view: view }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_service(::Google::Cloud::CommerceProducer::V1beta::GetServiceRequest.new(name: name, view: view), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_service_client_stub.call_rpc_count - end - end - - def test_list_private_offers - # Create GRPC objects. - grpc_response = ::Google::Cloud::CommerceProducer::V1beta::ListPrivateOffersResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_private_offers_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_private_offers, name - assert_kind_of ::Google::Cloud::CommerceProducer::V1beta::ListPrivateOffersRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_private_offers_client_stub do - # Create client - c = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_private_offers({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_private_offers parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_private_offers ::Google::Cloud::CommerceProducer::V1beta::ListPrivateOffersRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_private_offers({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_private_offers(::Google::Cloud::CommerceProducer::V1beta::ListPrivateOffersRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_private_offers_client_stub.call_rpc_count - end - end - - def test_get_private_offer - # Create GRPC objects. - grpc_response = ::Google::Cloud::CommerceProducer::V1beta::PrivateOffer.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - view = :PRIVATE_OFFER_VIEW_UNSPECIFIED - - get_private_offer_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_private_offer, name - assert_kind_of ::Google::Cloud::CommerceProducer::V1beta::GetPrivateOfferRequest, request - assert_equal "hello world", request["name"] - assert_equal :PRIVATE_OFFER_VIEW_UNSPECIFIED, request["view"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_private_offer_client_stub do - # Create client - c = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_private_offer({ name: name, view: view }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_private_offer name: name, view: view do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_private_offer ::Google::Cloud::CommerceProducer::V1beta::GetPrivateOfferRequest.new(name: name, view: view) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_private_offer({ name: name, view: view }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_private_offer(::Google::Cloud::CommerceProducer::V1beta::GetPrivateOfferRequest.new(name: name, view: view), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_private_offer_client_stub.call_rpc_count - end - end - - def test_resolve_amendment_target - # Create GRPC objects. - grpc_response = ::Google::Cloud::CommerceProducer::V1beta::ResolveAmendmentTargetResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - target_billing_account = "hello world" - base_standard_offer = "hello world" - - resolve_amendment_target_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :resolve_amendment_target, name - assert_kind_of ::Google::Cloud::CommerceProducer::V1beta::ResolveAmendmentTargetRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["target_billing_account"] - assert_equal "hello world", request["base_standard_offer"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, resolve_amendment_target_client_stub do - # Create client - c = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.resolve_amendment_target({ parent: parent, target_billing_account: target_billing_account, base_standard_offer: base_standard_offer }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.resolve_amendment_target parent: parent, target_billing_account: target_billing_account, base_standard_offer: base_standard_offer do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.resolve_amendment_target ::Google::Cloud::CommerceProducer::V1beta::ResolveAmendmentTargetRequest.new(parent: parent, target_billing_account: target_billing_account, base_standard_offer: base_standard_offer) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.resolve_amendment_target({ parent: parent, target_billing_account: target_billing_account, base_standard_offer: base_standard_offer }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.resolve_amendment_target(::Google::Cloud::CommerceProducer::V1beta::ResolveAmendmentTargetRequest.new(parent: parent, target_billing_account: target_billing_account, base_standard_offer: base_standard_offer), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, resolve_amendment_target_client_stub.call_rpc_count - end - end - - def test_create_private_offer - # Create GRPC objects. - grpc_response = ::Google::Cloud::CommerceProducer::V1beta::PrivateOffer.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - private_offer = {} - - create_private_offer_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_private_offer, name - assert_kind_of ::Google::Cloud::CommerceProducer::V1beta::CreatePrivateOfferRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::CommerceProducer::V1beta::PrivateOffer), request["private_offer"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_private_offer_client_stub do - # Create client - c = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_private_offer({ parent: parent, private_offer: private_offer }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_private_offer parent: parent, private_offer: private_offer do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_private_offer ::Google::Cloud::CommerceProducer::V1beta::CreatePrivateOfferRequest.new(parent: parent, private_offer: private_offer) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_private_offer({ parent: parent, private_offer: private_offer }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_private_offer(::Google::Cloud::CommerceProducer::V1beta::CreatePrivateOfferRequest.new(parent: parent, private_offer: private_offer), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_private_offer_client_stub.call_rpc_count - end - end - - def test_update_private_offer - # Create GRPC objects. - grpc_response = ::Google::Cloud::CommerceProducer::V1beta::PrivateOffer.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - update_mask = {} - private_offer = {} - - update_private_offer_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_private_offer, name - assert_kind_of ::Google::Cloud::CommerceProducer::V1beta::UpdatePrivateOfferRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::CommerceProducer::V1beta::PrivateOffer), request["private_offer"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_private_offer_client_stub do - # Create client - c = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_private_offer({ update_mask: update_mask, private_offer: private_offer }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_private_offer update_mask: update_mask, private_offer: private_offer do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_private_offer ::Google::Cloud::CommerceProducer::V1beta::UpdatePrivateOfferRequest.new(update_mask: update_mask, private_offer: private_offer) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_private_offer({ update_mask: update_mask, private_offer: private_offer }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_private_offer(::Google::Cloud::CommerceProducer::V1beta::UpdatePrivateOfferRequest.new(update_mask: update_mask, private_offer: private_offer), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_private_offer_client_stub.call_rpc_count - end - end - - def test_publish_private_offer - # Create GRPC objects. - grpc_response = ::Google::Cloud::CommerceProducer::V1beta::PrivateOffer.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - validate_only = true - - publish_private_offer_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :publish_private_offer, name - assert_kind_of ::Google::Cloud::CommerceProducer::V1beta::PublishPrivateOfferRequest, request - assert_equal "hello world", request["name"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, publish_private_offer_client_stub do - # Create client - c = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.publish_private_offer({ name: name, validate_only: validate_only }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.publish_private_offer name: name, validate_only: validate_only do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.publish_private_offer ::Google::Cloud::CommerceProducer::V1beta::PublishPrivateOfferRequest.new(name: name, validate_only: validate_only) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.publish_private_offer({ name: name, validate_only: validate_only }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.publish_private_offer(::Google::Cloud::CommerceProducer::V1beta::PublishPrivateOfferRequest.new(name: name, validate_only: validate_only), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, publish_private_offer_client_stub.call_rpc_count - end - end - - def test_cancel_private_offer - # Create GRPC objects. - grpc_response = ::Google::Cloud::CommerceProducer::V1beta::PrivateOffer.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - cancellation_note = "hello world" - - cancel_private_offer_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_private_offer, name - assert_kind_of ::Google::Cloud::CommerceProducer::V1beta::CancelPrivateOfferRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["cancellation_note"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_private_offer_client_stub do - # Create client - c = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.cancel_private_offer({ name: name, cancellation_note: cancellation_note }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.cancel_private_offer name: name, cancellation_note: cancellation_note do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.cancel_private_offer ::Google::Cloud::CommerceProducer::V1beta::CancelPrivateOfferRequest.new(name: name, cancellation_note: cancellation_note) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.cancel_private_offer({ name: name, cancellation_note: cancellation_note }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.cancel_private_offer(::Google::Cloud::CommerceProducer::V1beta::CancelPrivateOfferRequest.new(name: name, cancellation_note: cancellation_note), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_private_offer_client_stub.call_rpc_count - end - end - - def test_delete_private_offer - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - force = true - - delete_private_offer_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_private_offer, name - assert_kind_of ::Google::Cloud::CommerceProducer::V1beta::DeletePrivateOfferRequest, request - assert_equal "hello world", request["name"] - assert_equal true, request["force"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_private_offer_client_stub do - # Create client - c = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_private_offer({ name: name, force: force }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_private_offer name: name, force: force do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_private_offer ::Google::Cloud::CommerceProducer::V1beta::DeletePrivateOfferRequest.new(name: name, force: force) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_private_offer({ name: name, force: force }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_private_offer(::Google::Cloud::CommerceProducer::V1beta::DeletePrivateOfferRequest.new(name: name, force: force), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_private_offer_client_stub.call_rpc_count - end - end - - def test_list_private_offer_documents - # Create GRPC objects. - grpc_response = ::Google::Cloud::CommerceProducer::V1beta::ListPrivateOfferDocumentsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_private_offer_documents_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_private_offer_documents, name - assert_kind_of ::Google::Cloud::CommerceProducer::V1beta::ListPrivateOfferDocumentsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_private_offer_documents_client_stub do - # Create client - c = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_private_offer_documents({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_private_offer_documents parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_private_offer_documents ::Google::Cloud::CommerceProducer::V1beta::ListPrivateOfferDocumentsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_private_offer_documents({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_private_offer_documents(::Google::Cloud::CommerceProducer::V1beta::ListPrivateOfferDocumentsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_private_offer_documents_client_stub.call_rpc_count - end - end - - def test_get_private_offer_document - # Create GRPC objects. - grpc_response = ::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_private_offer_document_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_private_offer_document, name - assert_kind_of ::Google::Cloud::CommerceProducer::V1beta::GetPrivateOfferDocumentRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_private_offer_document_client_stub do - # Create client - c = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_private_offer_document({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_private_offer_document name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_private_offer_document ::Google::Cloud::CommerceProducer::V1beta::GetPrivateOfferDocumentRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_private_offer_document({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_private_offer_document(::Google::Cloud::CommerceProducer::V1beta::GetPrivateOfferDocumentRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_private_offer_document_client_stub.call_rpc_count - end - end - - def test_create_private_offer_document - # Create GRPC objects. - grpc_response = ::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - private_offer_document = {} - - create_private_offer_document_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_private_offer_document, name - assert_kind_of ::Google::Cloud::CommerceProducer::V1beta::CreatePrivateOfferDocumentRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument), request["private_offer_document"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_private_offer_document_client_stub do - # Create client - c = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_private_offer_document({ parent: parent, private_offer_document: private_offer_document }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_private_offer_document parent: parent, private_offer_document: private_offer_document do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_private_offer_document ::Google::Cloud::CommerceProducer::V1beta::CreatePrivateOfferDocumentRequest.new(parent: parent, private_offer_document: private_offer_document) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_private_offer_document({ parent: parent, private_offer_document: private_offer_document }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_private_offer_document(::Google::Cloud::CommerceProducer::V1beta::CreatePrivateOfferDocumentRequest.new(parent: parent, private_offer_document: private_offer_document), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_private_offer_document_client_stub.call_rpc_count - end - end - - def test_update_private_offer_document - # Create GRPC objects. - grpc_response = ::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - private_offer_document = {} - update_mask = {} - - update_private_offer_document_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_private_offer_document, name - assert_kind_of ::Google::Cloud::CommerceProducer::V1beta::UpdatePrivateOfferDocumentRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::CommerceProducer::V1beta::PrivateOfferDocument), request["private_offer_document"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_private_offer_document_client_stub do - # Create client - c = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_private_offer_document({ private_offer_document: private_offer_document, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_private_offer_document private_offer_document: private_offer_document, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_private_offer_document ::Google::Cloud::CommerceProducer::V1beta::UpdatePrivateOfferDocumentRequest.new(private_offer_document: private_offer_document, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_private_offer_document({ private_offer_document: private_offer_document, update_mask: update_mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_private_offer_document(::Google::Cloud::CommerceProducer::V1beta::UpdatePrivateOfferDocumentRequest.new(private_offer_document: private_offer_document, update_mask: update_mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_private_offer_document_client_stub.call_rpc_count - end - end - - def test_delete_private_offer_document - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_private_offer_document_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_private_offer_document, name - assert_kind_of ::Google::Cloud::CommerceProducer::V1beta::DeletePrivateOfferDocumentRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_private_offer_document_client_stub do - # Create client - c = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_private_offer_document({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_private_offer_document name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_private_offer_document ::Google::Cloud::CommerceProducer::V1beta::DeletePrivateOfferDocumentRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_private_offer_document({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_private_offer_document(::Google::Cloud::CommerceProducer::V1beta::DeletePrivateOfferDocumentRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_private_offer_document_client_stub.call_rpc_count - end - end - - def test_list_standard_offers - # Create GRPC objects. - grpc_response = ::Google::Cloud::CommerceProducer::V1beta::ListStandardOffersResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_standard_offers_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_standard_offers, name - assert_kind_of ::Google::Cloud::CommerceProducer::V1beta::ListStandardOffersRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_standard_offers_client_stub do - # Create client - c = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_standard_offers({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_standard_offers parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_standard_offers ::Google::Cloud::CommerceProducer::V1beta::ListStandardOffersRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_standard_offers({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_standard_offers(::Google::Cloud::CommerceProducer::V1beta::ListStandardOffersRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_standard_offers_client_stub.call_rpc_count - end - end - - def test_get_standard_offer - # Create GRPC objects. - grpc_response = ::Google::Cloud::CommerceProducer::V1beta::StandardOffer.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - view = :STANDARD_OFFER_VIEW_UNSPECIFIED - - get_standard_offer_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_standard_offer, name - assert_kind_of ::Google::Cloud::CommerceProducer::V1beta::GetStandardOfferRequest, request - assert_equal "hello world", request["name"] - assert_equal :STANDARD_OFFER_VIEW_UNSPECIFIED, request["view"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_standard_offer_client_stub do - # Create client - c = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_standard_offer({ name: name, view: view }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_standard_offer name: name, view: view do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_standard_offer ::Google::Cloud::CommerceProducer::V1beta::GetStandardOfferRequest.new(name: name, view: view) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_standard_offer({ name: name, view: view }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_standard_offer(::Google::Cloud::CommerceProducer::V1beta::GetStandardOfferRequest.new(name: name, view: view), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_standard_offer_client_stub.call_rpc_count - end - end - - def test_get_sku - # Create GRPC objects. - grpc_response = ::Google::Cloud::CommerceProducer::V1beta::Sku.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_sku_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_sku, name - assert_kind_of ::Google::Cloud::CommerceProducer::V1beta::GetSkuRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_sku_client_stub do - # Create client - c = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_sku({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_sku name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_sku ::Google::Cloud::CommerceProducer::V1beta::GetSkuRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_sku({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_sku(::Google::Cloud::CommerceProducer::V1beta::GetSkuRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_sku_client_stub.call_rpc_count - end - end - - def test_list_skus - # Create GRPC objects. - grpc_response = ::Google::Cloud::CommerceProducer::V1beta::ListSkusResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_skus_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_skus, name - assert_kind_of ::Google::Cloud::CommerceProducer::V1beta::ListSkusRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_skus_client_stub do - # Create client - c = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_skus({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_skus parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_skus ::Google::Cloud::CommerceProducer::V1beta::ListSkusRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_skus({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_skus(::Google::Cloud::CommerceProducer::V1beta::ListSkusRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_skus_client_stub.call_rpc_count - end - end - - def test_get_sku_group - # Create GRPC objects. - grpc_response = ::Google::Cloud::CommerceProducer::V1beta::SkuGroup.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_sku_group_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_sku_group, name - assert_kind_of ::Google::Cloud::CommerceProducer::V1beta::GetSkuGroupRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_sku_group_client_stub do - # Create client - c = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_sku_group({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_sku_group name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_sku_group ::Google::Cloud::CommerceProducer::V1beta::GetSkuGroupRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_sku_group({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.get_sku_group(::Google::Cloud::CommerceProducer::V1beta::GetSkuGroupRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_sku_group_client_stub.call_rpc_count - end - end - - def test_list_sku_groups - # Create GRPC objects. - grpc_response = ::Google::Cloud::CommerceProducer::V1beta::ListSkuGroupsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - - list_sku_groups_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_sku_groups, name - assert_kind_of ::Google::Cloud::CommerceProducer::V1beta::ListSkuGroupsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_sku_groups_client_stub do - # Create client - c = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_sku_groups({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.list_sku_groups parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.list_sku_groups ::Google::Cloud::CommerceProducer::V1beta::ListSkuGroupsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.list_sku_groups({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.list_sku_groups(::Google::Cloud::CommerceProducer::V1beta::ListSkuGroupsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_sku_groups_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new do |config| - config.credentials = grpc_channel - end - end - - config = client.configure do |c| - block_config = c - end - - assert_same block_config, config - assert_kind_of ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client::Configuration, config - end - - def test_credentials - key = OpenSSL::PKey::RSA.new 2048 - cred_json = { - "private_key" => key.to_pem, - "client_email" => "app@developer.gserviceaccount.com", - "type" => "service_account" - } - key_file = StringIO.new cred_json.to_json - creds = Google::Auth::ServiceAccountCredentials.make_creds({ json_key_io: key_file }) - - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::CommerceProducer::V1beta::CommerceTransaction::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-commerce_producer-v1beta/test/helper.rb b/owl-bot-staging/google-cloud-commerce_producer-v1beta/test/helper.rb deleted file mode 100644 index 4fb6756ac7e2..000000000000 --- a/owl-bot-staging/google-cloud-commerce_producer-v1beta/test/helper.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Load JUnit XML formatter from googleapis/ruby-common-tools to write -# tmp/reports/sponge_log.xml for Kokoro/TestGrid build health tracking. -if ENV["CI"] || ENV["KOKORO_JOB_NAME"] - begin - require "gapic/minitest_junit_preloader" - rescue LoadError - end -end - -require "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct"