From bdf8de2aa15e40b7e3d8015425377084ed733796 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Tue, 7 Jul 2026 22:54:45 +0000 Subject: [PATCH 1/2] chore: Configure Ruby clients for Cloud Product Registry API PiperOrigin-RevId: 944033838 Source-Link: https://github.com/googleapis/googleapis/commit/c087e2206c6a253985fe06a9dc60dcc6a4eb1526 Source-Link: https://github.com/googleapis/googleapis-gen/commit/ef63e84b28f189fa8ab8e739b642687558192616 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXByb2R1Y3RfcmVnaXN0cnktdjEvLk93bEJvdC55YW1sIiwiaCI6ImVmNjNlODRiMjhmMTg5ZmE4YWI4ZTczOWI2NDI2ODc1NTgxOTI2MTYifQ== --- .../.gitignore | 22 + .../.repo-metadata.json | 17 + .../.rubocop.yml | 33 + .../google-cloud-product_registry-v1/.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 ++ .../CHANGELOG.md | 2 + .../google-cloud-product_registry-v1/Gemfile | 14 + .../LICENSE.md | 201 +++ .../README.md | 153 +++ .../google-cloud-product_registry-v1/Rakefile | 169 +++ .../gapic_metadata.json | 53 + .../google-cloud-product_registry-v1.gemspec | 28 + .../lib/google-cloud-product_registry-v1.rb | 21 + .../lib/google/cloud/product_registry/v1.rb | 45 + .../v1/cloud_product_registry_read_service.rb | 56 + .../client.rb | 1108 +++++++++++++++++ .../credentials.rb | 44 + .../paths.rb | 78 ++ .../rest.rb | 53 + .../rest/client.rb | 1032 +++++++++++++++ .../rest/service_stub.rb | 518 ++++++++ .../google/cloud/product_registry/v1/rest.rb | 37 + .../cloud/product_registry/v1/version.rb | 28 + .../cloud_product_registry_read_service_pb.rb | 39 + ...oduct_registry_read_service_services_pb.rb | 58 + .../productregistry/v1/lifecycle_state_pb.rb | 21 + .../productregistry/v1/logical_product_pb.rb | 25 + .../v1/logical_product_variant_pb.rb | 25 + .../productregistry/v1/product_suite_pb.rb | 24 + .../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 ++++ .../v1/cloud_product_registry_read_service.rb | 196 +++ .../productregistry/v1/lifecycle_state.rb | 48 + .../productregistry/v1/logical_product.rb | 64 + .../v1/logical_product_variant.rb | 57 + .../cloud/productregistry/v1/product_suite.rb | 56 + .../proto_docs/google/protobuf/duration.rb | 98 ++ .../snippets/Gemfile | 32 + .../get_logical_product.rb | 47 + .../get_logical_product_variant.rb | 47 + .../get_product_suite.rb | 47 + .../list_logical_product_variants.rb | 51 + .../list_logical_products.rb | 51 + .../list_product_suites.rb | 51 + .../lookup_entity.rb | 47 + ...adata_google.cloud.productregistry.v1.json | 295 +++++ ...roduct_registry_read_service_paths_test.rb | 79 ++ ...product_registry_read_service_rest_test.rb | 482 +++++++ ...loud_product_registry_read_service_test.rb | 535 ++++++++ .../test/helper.rb | 26 + 54 files changed, 7355 insertions(+) create mode 100644 owl-bot-staging/google-cloud-product_registry-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-product_registry-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-product_registry-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-product_registry-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-product_registry-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-product_registry-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-product_registry-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-product_registry-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-product_registry-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-product_registry-v1/README.md create mode 100644 owl-bot-staging/google-cloud-product_registry-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-product_registry-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-product_registry-v1/google-cloud-product_registry-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-product_registry-v1/lib/google-cloud-product_registry-v1.rb create mode 100644 owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/product_registry/v1.rb create mode 100644 owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/product_registry/v1/cloud_product_registry_read_service.rb create mode 100644 owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/product_registry/v1/cloud_product_registry_read_service/client.rb create mode 100644 owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/product_registry/v1/cloud_product_registry_read_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/product_registry/v1/cloud_product_registry_read_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/product_registry/v1/cloud_product_registry_read_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/product_registry/v1/cloud_product_registry_read_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/product_registry/v1/cloud_product_registry_read_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/product_registry/v1/rest.rb create mode 100644 owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/product_registry/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/productregistry/v1/cloud_product_registry_read_service_pb.rb create mode 100644 owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/productregistry/v1/cloud_product_registry_read_service_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/productregistry/v1/lifecycle_state_pb.rb create mode 100644 owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/productregistry/v1/logical_product_pb.rb create mode 100644 owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/productregistry/v1/logical_product_variant_pb.rb create mode 100644 owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/productregistry/v1/product_suite_pb.rb create mode 100644 owl-bot-staging/google-cloud-product_registry-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-product_registry-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-product_registry-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-product_registry-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-product_registry-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-product_registry-v1/proto_docs/google/cloud/productregistry/v1/cloud_product_registry_read_service.rb create mode 100644 owl-bot-staging/google-cloud-product_registry-v1/proto_docs/google/cloud/productregistry/v1/lifecycle_state.rb create mode 100644 owl-bot-staging/google-cloud-product_registry-v1/proto_docs/google/cloud/productregistry/v1/logical_product.rb create mode 100644 owl-bot-staging/google-cloud-product_registry-v1/proto_docs/google/cloud/productregistry/v1/logical_product_variant.rb create mode 100644 owl-bot-staging/google-cloud-product_registry-v1/proto_docs/google/cloud/productregistry/v1/product_suite.rb create mode 100644 owl-bot-staging/google-cloud-product_registry-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-product_registry-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-product_registry-v1/snippets/cloud_product_registry_read_service/get_logical_product.rb create mode 100644 owl-bot-staging/google-cloud-product_registry-v1/snippets/cloud_product_registry_read_service/get_logical_product_variant.rb create mode 100644 owl-bot-staging/google-cloud-product_registry-v1/snippets/cloud_product_registry_read_service/get_product_suite.rb create mode 100644 owl-bot-staging/google-cloud-product_registry-v1/snippets/cloud_product_registry_read_service/list_logical_product_variants.rb create mode 100644 owl-bot-staging/google-cloud-product_registry-v1/snippets/cloud_product_registry_read_service/list_logical_products.rb create mode 100644 owl-bot-staging/google-cloud-product_registry-v1/snippets/cloud_product_registry_read_service/list_product_suites.rb create mode 100644 owl-bot-staging/google-cloud-product_registry-v1/snippets/cloud_product_registry_read_service/lookup_entity.rb create mode 100644 owl-bot-staging/google-cloud-product_registry-v1/snippets/snippet_metadata_google.cloud.productregistry.v1.json create mode 100644 owl-bot-staging/google-cloud-product_registry-v1/test/google/cloud/product_registry/v1/cloud_product_registry_read_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-product_registry-v1/test/google/cloud/product_registry/v1/cloud_product_registry_read_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-product_registry-v1/test/google/cloud/product_registry/v1/cloud_product_registry_read_service_test.rb create mode 100644 owl-bot-staging/google-cloud-product_registry-v1/test/helper.rb diff --git a/owl-bot-staging/google-cloud-product_registry-v1/.gitignore b/owl-bot-staging/google-cloud-product_registry-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-product_registry-v1/.gitignore @@ -0,0 +1,22 @@ +# Ignore bundler lockfiles +Gemfile.lock +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-product_registry-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-product_registry-v1/.repo-metadata.json new file mode 100644 index 000000000000..e6b5ce1c10ff --- /dev/null +++ b/owl-bot-staging/google-cloud-product_registry-v1/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "cloudproductregistry.googleapis.com", + "api_shortname": "cloudproductregistry", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-product_registry-v1/latest", + "distribution_name": "google-cloud-product_registry-v1", + "is_cloud": true, + "language": "ruby", + "name": "cloudproductregistry", + "name_pretty": "Cloud Product Registry V1 API", + "product_documentation": "https://docs.cloud.google.com/product-registry", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "cloudproductregistry.googleapis.com API. Note that google-cloud-product_registry-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-product_registry instead. See the readme for more details.", + "ruby-cloud-product-url": "https://docs.cloud.google.com/product-registry", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-product_registry-v1/.rubocop.yml b/owl-bot-staging/google-cloud-product_registry-v1/.rubocop.yml new file mode 100644 index 000000000000..bef0fd1fa15e --- /dev/null +++ b/owl-bot-staging/google-cloud-product_registry-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-product_registry-v1.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-product_registry-v1.rb" diff --git a/owl-bot-staging/google-cloud-product_registry-v1/.toys.rb b/owl-bot-staging/google-cloud-product_registry-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-product_registry-v1/.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-product_registry-v1/.yardopts b/owl-bot-staging/google-cloud-product_registry-v1/.yardopts new file mode 100644 index 000000000000..f6854fcf1abc --- /dev/null +++ b/owl-bot-staging/google-cloud-product_registry-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Cloud Product Registry V1 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-product_registry-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-product_registry-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..d7d79fc6a6ac --- /dev/null +++ b/owl-bot-staging/google-cloud-product_registry-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-product_registry-v1 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-product_registry-v1 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/product_registry/v1" + +client = ::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/product_registry/v1" + +::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::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-product_registry-v1 +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/product_registry/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::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-product_registry-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-product_registry-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-product_registry-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-product_registry-v1/Gemfile b/owl-bot-staging/google-cloud-product_registry-v1/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-cloud-product_registry-v1/Gemfile @@ -0,0 +1,14 @@ +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-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-product_registry-v1/LICENSE.md b/owl-bot-staging/google-cloud-product_registry-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-product_registry-v1/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-product_registry-v1/README.md b/owl-bot-staging/google-cloud-product_registry-v1/README.md new file mode 100644 index 000000000000..6c525a64e5e3 --- /dev/null +++ b/owl-bot-staging/google-cloud-product_registry-v1/README.md @@ -0,0 +1,153 @@ +# Ruby Client for the Cloud Product Registry V1 API + +cloudproductregistry.googleapis.com API. + + +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 Product Registry V1 API. Most users should consider using +the main client gem, +[google-cloud-product_registry](https://rubygems.org/gems/google-cloud-product_registry). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-product_registry-v1 +``` + +## 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/cloudproductregistry.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/product_registry/v1" + +client = ::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client.new +request = ::Google::Cloud::ProductRegistry::V1::GetProductSuiteRequest.new # (request fields as keyword arguments...) +response = client.get_product_suite request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-product_registry-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://docs.cloud.google.com/product-registry) +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/product_registry/v1" +require "logger" + +client = ::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::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-product_registry`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-product_registry-v1`. +_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-product_registry`. +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-product_registry-v1`. + +### 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-product_registry-v1/Rakefile b/owl-bot-staging/google-cloud-product_registry-v1/Rakefile new file mode 100644 index 000000000000..f75c8566740c --- /dev/null +++ b/owl-bot-staging/google-cloud-product_registry-v1/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-product_registry-v1 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/product_registry/v1/cloud_product_registry_read_service/credentials" + ::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::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-product_registry-v1 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-product_registry-v1 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-product_registry-v1 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-product_registry-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-product_registry-v1" + header "google-cloud-product_registry-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-product_registry-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-product_registry-v1 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-product_registry-v1 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-product_registry-v1 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-product_registry-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-product_registry-v1/gapic_metadata.json new file mode 100644 index 000000000000..36eed386208a --- /dev/null +++ b/owl-bot-staging/google-cloud-product_registry-v1/gapic_metadata.json @@ -0,0 +1,53 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.productregistry.v1", + "libraryPackage": "::Google::Cloud::ProductRegistry::V1", + "services": { + "CloudProductRegistryReadService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client", + "rpcs": { + "GetProductSuite": { + "methods": [ + "get_product_suite" + ] + }, + "ListProductSuites": { + "methods": [ + "list_product_suites" + ] + }, + "GetLogicalProduct": { + "methods": [ + "get_logical_product" + ] + }, + "ListLogicalProducts": { + "methods": [ + "list_logical_products" + ] + }, + "GetLogicalProductVariant": { + "methods": [ + "get_logical_product_variant" + ] + }, + "ListLogicalProductVariants": { + "methods": [ + "list_logical_product_variants" + ] + }, + "LookupEntity": { + "methods": [ + "lookup_entity" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-product_registry-v1/google-cloud-product_registry-v1.gemspec b/owl-bot-staging/google-cloud-product_registry-v1/google-cloud-product_registry-v1.gemspec new file mode 100644 index 000000000000..05dfccece71b --- /dev/null +++ b/owl-bot-staging/google-cloud-product_registry-v1/google-cloud-product_registry-v1.gemspec @@ -0,0 +1,28 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/product_registry/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-product_registry-v1" + gem.version = Google::Cloud::ProductRegistry::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "cloudproductregistry.googleapis.com API. Note that google-cloud-product_registry-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-product_registry instead. See the readme for more details." + gem.summary = "cloudproductregistry.googleapis.com API." + 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" +end diff --git a/owl-bot-staging/google-cloud-product_registry-v1/lib/google-cloud-product_registry-v1.rb b/owl-bot-staging/google-cloud-product_registry-v1/lib/google-cloud-product_registry-v1.rb new file mode 100644 index 000000000000..db0e16721382 --- /dev/null +++ b/owl-bot-staging/google-cloud-product_registry-v1/lib/google-cloud-product_registry-v1.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/product_registry/v1" diff --git a/owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/product_registry/v1.rb b/owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/product_registry/v1.rb new file mode 100644 index 000000000000..c0e6920a5016 --- /dev/null +++ b/owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/product_registry/v1.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/product_registry/v1/cloud_product_registry_read_service" +require "google/cloud/product_registry/v1/version" + +module Google + module Cloud + module ProductRegistry + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/product_registry/v1" + # client = ::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/product_registry/v1" + # client = ::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Rest::Client.new + # + module V1 + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/product_registry/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/product_registry/v1/cloud_product_registry_read_service.rb b/owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/product_registry/v1/cloud_product_registry_read_service.rb new file mode 100644 index 000000000000..aab9fa9b8a6f --- /dev/null +++ b/owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/product_registry/v1/cloud_product_registry_read_service.rb @@ -0,0 +1,56 @@ +# 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/product_registry/v1/version" + +require "google/cloud/product_registry/v1/cloud_product_registry_read_service/credentials" +require "google/cloud/product_registry/v1/cloud_product_registry_read_service/paths" +require "google/cloud/product_registry/v1/cloud_product_registry_read_service/client" +require "google/cloud/product_registry/v1/cloud_product_registry_read_service/rest" + +module Google + module Cloud + module ProductRegistry + module V1 + ## + # Cloud Product Registry Read Service provides capabilities to access all first + # and third party Google Cloud products. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/product_registry/v1/cloud_product_registry_read_service" + # client = ::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/product_registry/v1/cloud_product_registry_read_service/rest" + # client = ::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Rest::Client.new + # + module CloudProductRegistryReadService + end + end + end + end +end + +helper_path = ::File.join __dir__, "cloud_product_registry_read_service", "helpers.rb" +require "google/cloud/product_registry/v1/cloud_product_registry_read_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/product_registry/v1/cloud_product_registry_read_service/client.rb b/owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/product_registry/v1/cloud_product_registry_read_service/client.rb new file mode 100644 index 000000000000..06940909a47c --- /dev/null +++ b/owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/product_registry/v1/cloud_product_registry_read_service/client.rb @@ -0,0 +1,1108 @@ +# 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/productregistry/v1/cloud_product_registry_read_service_pb" + +module Google + module Cloud + module ProductRegistry + module V1 + module CloudProductRegistryReadService + ## + # Client for the CloudProductRegistryReadService service. + # + # Cloud Product Registry Read Service provides capabilities to access all first + # and third party Google Cloud products. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "cloudproductregistry.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :cloud_product_registry_read_service_stub + + ## + # Configure the CloudProductRegistryReadService Client class. + # + # See {::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CloudProductRegistryReadService clients + # ::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::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", "ProductRegistry", "V1"] + 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.get_product_suite.timeout = 60.0 + default_config.rpcs.get_product_suite.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_product_suites.timeout = 60.0 + default_config.rpcs.list_product_suites.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_logical_product.timeout = 60.0 + default_config.rpcs.get_logical_product.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_logical_products.timeout = 60.0 + default_config.rpcs.list_logical_products.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_logical_product_variant.timeout = 60.0 + default_config.rpcs.get_logical_product_variant.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_logical_product_variants.timeout = 60.0 + default_config.rpcs.list_logical_product_variants.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.lookup_entity.timeout = 60.0 + default_config.rpcs.lookup_entity.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 CloudProductRegistryReadService 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::ProductRegistry::V1::CloudProductRegistryReadService::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 + @cloud_product_registry_read_service_stub.universe_domain + end + + ## + # Create a new CloudProductRegistryReadService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CloudProductRegistryReadService 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/productregistry/v1/cloud_product_registry_read_service_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 + + @cloud_product_registry_read_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::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 + ) + + @cloud_product_registry_read_service_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 + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @cloud_product_registry_read_service_stub.logger + end + + # Service calls + + ## + # Get details of a ProductSuite. + # + # @overload get_product_suite(request, options = nil) + # Pass arguments to `get_product_suite` via a request object, either of type + # {::Google::Cloud::ProductRegistry::V1::GetProductSuiteRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ProductRegistry::V1::GetProductSuiteRequest, ::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_product_suite(name: nil) + # Pass arguments to `get_product_suite` 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. The name of the ProductSuite to retrieve. + # Format: productSuites/\\{product_suite} + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ProductRegistry::V1::ProductSuite] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ProductRegistry::V1::ProductSuite] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/product_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ProductRegistry::V1::GetProductSuiteRequest.new + # + # # Call the get_product_suite method. + # result = client.get_product_suite request + # + # # The returned object is of type Google::Cloud::ProductRegistry::V1::ProductSuite. + # p result + # + def get_product_suite request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ProductRegistry::V1::GetProductSuiteRequest + + # 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_product_suite.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::ProductRegistry::V1::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_product_suite.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_product_suite.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_product_registry_read_service_stub.call_rpc :get_product_suite, 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 ProductSuites. + # + # @overload list_product_suites(request, options = nil) + # Pass arguments to `list_product_suites` via a request object, either of type + # {::Google::Cloud::ProductRegistry::V1::ListProductSuitesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ProductRegistry::V1::ListProductSuitesRequest, ::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_product_suites(page_size: nil, page_token: nil) + # Pass arguments to `list_product_suites` 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 page_size [::Integer] + # Optional. The maximum number of suites to return. The service may return + # fewer than this value. If unspecified, at most 100 suites will be returned. + # The maximum value is 500; values above 500 will be coerced to 500. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListProductSuites` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListProductSuites` must + # match the call that provided the page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ProductRegistry::V1::ProductSuite>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::ProductRegistry::V1::ProductSuite>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/product_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ProductRegistry::V1::ListProductSuitesRequest.new + # + # # Call the list_product_suites method. + # result = client.list_product_suites 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::ProductRegistry::V1::ProductSuite. + # p item + # end + # + def list_product_suites request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ProductRegistry::V1::ListProductSuitesRequest + + # 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_product_suites.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::ProductRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_product_suites.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_product_suites.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_product_registry_read_service_stub.call_rpc :list_product_suites, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @cloud_product_registry_read_service_stub, :list_product_suites, 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 LogicalProduct. + # + # @overload get_logical_product(request, options = nil) + # Pass arguments to `get_logical_product` via a request object, either of type + # {::Google::Cloud::ProductRegistry::V1::GetLogicalProductRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ProductRegistry::V1::GetLogicalProductRequest, ::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_logical_product(name: nil) + # Pass arguments to `get_logical_product` 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. The name of the LogicalProduct to retrieve. + # Format: logicalProducts/\\{logical_product} + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ProductRegistry::V1::LogicalProduct] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ProductRegistry::V1::LogicalProduct] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/product_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ProductRegistry::V1::GetLogicalProductRequest.new + # + # # Call the get_logical_product method. + # result = client.get_logical_product request + # + # # The returned object is of type Google::Cloud::ProductRegistry::V1::LogicalProduct. + # p result + # + def get_logical_product request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ProductRegistry::V1::GetLogicalProductRequest + + # 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_logical_product.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::ProductRegistry::V1::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_logical_product.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_logical_product.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_product_registry_read_service_stub.call_rpc :get_logical_product, 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 LogicalProducts matching given criteria. + # + # @overload list_logical_products(request, options = nil) + # Pass arguments to `list_logical_products` via a request object, either of type + # {::Google::Cloud::ProductRegistry::V1::ListLogicalProductsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ProductRegistry::V1::ListLogicalProductsRequest, ::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_logical_products(filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_logical_products` 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 filter [::String] + # Optional. The filter expression for listing logical products. + # Filter syntax: https://google.aip.dev/160 + # Supported fields: suite_id + # @param page_size [::Integer] + # Optional. The maximum number of logical products to return. The service may + # return fewer than this value. If unspecified, at most 100 logical products + # will be returned. The maximum value is 500; values above 500 will be + # coerced to 500. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListLogicalProducts` + # call. Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListLogicalProducts` + # must match the call that provided the page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ProductRegistry::V1::LogicalProduct>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::ProductRegistry::V1::LogicalProduct>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/product_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ProductRegistry::V1::ListLogicalProductsRequest.new + # + # # Call the list_logical_products method. + # result = client.list_logical_products 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::ProductRegistry::V1::LogicalProduct. + # p item + # end + # + def list_logical_products request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ProductRegistry::V1::ListLogicalProductsRequest + + # 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_logical_products.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::ProductRegistry::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_logical_products.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_logical_products.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_product_registry_read_service_stub.call_rpc :list_logical_products, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @cloud_product_registry_read_service_stub, :list_logical_products, 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 + + ## + # Get details of a LogicalProductVariant. + # + # @overload get_logical_product_variant(request, options = nil) + # Pass arguments to `get_logical_product_variant` via a request object, either of type + # {::Google::Cloud::ProductRegistry::V1::GetLogicalProductVariantRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ProductRegistry::V1::GetLogicalProductVariantRequest, ::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_logical_product_variant(name: nil) + # Pass arguments to `get_logical_product_variant` 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. The name of the LogicalProductVariant to retrieve. + # Format: logicalProducts/\\{logical_product}/variants/\\{variant} + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ProductRegistry::V1::LogicalProductVariant] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ProductRegistry::V1::LogicalProductVariant] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/product_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ProductRegistry::V1::GetLogicalProductVariantRequest.new + # + # # Call the get_logical_product_variant method. + # result = client.get_logical_product_variant request + # + # # The returned object is of type Google::Cloud::ProductRegistry::V1::LogicalProductVariant. + # p result + # + def get_logical_product_variant request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ProductRegistry::V1::GetLogicalProductVariantRequest + + # 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_logical_product_variant.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::ProductRegistry::V1::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_logical_product_variant.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_logical_product_variant.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_product_registry_read_service_stub.call_rpc :get_logical_product_variant, 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 LogicalProductVariants matching given criteria. + # + # @overload list_logical_product_variants(request, options = nil) + # Pass arguments to `list_logical_product_variants` via a request object, either of type + # {::Google::Cloud::ProductRegistry::V1::ListLogicalProductVariantsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ProductRegistry::V1::ListLogicalProductVariantsRequest, ::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_logical_product_variants(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_logical_product_variants` 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 logical product id. + # Format: logicalProducts/\\{logical_product} + # @param page_size [::Integer] + # Optional. The maximum number of logical product variants to return. The + # service may return fewer than this value. If unspecified, at most 100 + # logical product variants will be returned. The maximum value is 500; values + # above 500 will be coerced to 500. + # @param page_token [::String] + # Optional. A page token, received from a previous + # `ListLogicalProductVariants` call. Provide this to retrieve the subsequent + # page. + # + # When paginating, all other parameters provided to + # `ListLogicalProductVariants` must match the call that provided the page + # token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ProductRegistry::V1::LogicalProductVariant>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::ProductRegistry::V1::LogicalProductVariant>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/product_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ProductRegistry::V1::ListLogicalProductVariantsRequest.new + # + # # Call the list_logical_product_variants method. + # result = client.list_logical_product_variants 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::ProductRegistry::V1::LogicalProductVariant. + # p item + # end + # + def list_logical_product_variants request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ProductRegistry::V1::ListLogicalProductVariantsRequest + + # 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_logical_product_variants.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::ProductRegistry::V1::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_logical_product_variants.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_logical_product_variants.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_product_registry_read_service_stub.call_rpc :list_logical_product_variants, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @cloud_product_registry_read_service_stub, :list_logical_product_variants, 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 + + ## + # Look up entities. + # + # @overload lookup_entity(request, options = nil) + # Pass arguments to `lookup_entity` via a request object, either of type + # {::Google::Cloud::ProductRegistry::V1::LookupEntityRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ProductRegistry::V1::LookupEntityRequest, ::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 lookup_entity(lookup_uri: nil) + # Pass arguments to `lookup_entity` 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 lookup_uri [::String] + # Required. Entity uri to look up. + # Supported Formats: + # logicalProducts/\\{logical_product} + # logicalProducts/\\{logical_product}/variants/\\{variant} + # productSuites/\\{product_suite} + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::ProductRegistry::V1::LookupEntityResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::ProductRegistry::V1::LookupEntityResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/product_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ProductRegistry::V1::LookupEntityRequest.new + # + # # Call the lookup_entity method. + # result = client.lookup_entity request + # + # # The returned object is of type Google::Cloud::ProductRegistry::V1::LookupEntityResponse. + # p result + # + def lookup_entity request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ProductRegistry::V1::LookupEntityRequest + + # 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.lookup_entity.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::ProductRegistry::V1::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.lookup_uri + header_params["lookup_uri"] = request.lookup_uri + 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.lookup_entity.timeout, + metadata: metadata, + retry_policy: @config.rpcs.lookup_entity.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_product_registry_read_service_stub.call_rpc :lookup_entity, 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 + + ## + # Configuration class for the CloudProductRegistryReadService API. + # + # This class represents the configuration for CloudProductRegistryReadService, + # 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::ProductRegistry::V1::CloudProductRegistryReadService::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 + # # get_product_suite to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_product_suite.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_product_suite.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::ProductRegistry::V1::CloudProductRegistryReadService::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 = "cloudproductregistry.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 CloudProductRegistryReadService 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 `get_product_suite` + # @return [::Gapic::Config::Method] + # + attr_reader :get_product_suite + ## + # RPC-specific configuration for `list_product_suites` + # @return [::Gapic::Config::Method] + # + attr_reader :list_product_suites + ## + # RPC-specific configuration for `get_logical_product` + # @return [::Gapic::Config::Method] + # + attr_reader :get_logical_product + ## + # RPC-specific configuration for `list_logical_products` + # @return [::Gapic::Config::Method] + # + attr_reader :list_logical_products + ## + # RPC-specific configuration for `get_logical_product_variant` + # @return [::Gapic::Config::Method] + # + attr_reader :get_logical_product_variant + ## + # RPC-specific configuration for `list_logical_product_variants` + # @return [::Gapic::Config::Method] + # + attr_reader :list_logical_product_variants + ## + # RPC-specific configuration for `lookup_entity` + # @return [::Gapic::Config::Method] + # + attr_reader :lookup_entity + + # @private + def initialize parent_rpcs = nil + get_product_suite_config = parent_rpcs.get_product_suite if parent_rpcs.respond_to? :get_product_suite + @get_product_suite = ::Gapic::Config::Method.new get_product_suite_config + list_product_suites_config = parent_rpcs.list_product_suites if parent_rpcs.respond_to? :list_product_suites + @list_product_suites = ::Gapic::Config::Method.new list_product_suites_config + get_logical_product_config = parent_rpcs.get_logical_product if parent_rpcs.respond_to? :get_logical_product + @get_logical_product = ::Gapic::Config::Method.new get_logical_product_config + list_logical_products_config = parent_rpcs.list_logical_products if parent_rpcs.respond_to? :list_logical_products + @list_logical_products = ::Gapic::Config::Method.new list_logical_products_config + get_logical_product_variant_config = parent_rpcs.get_logical_product_variant if parent_rpcs.respond_to? :get_logical_product_variant + @get_logical_product_variant = ::Gapic::Config::Method.new get_logical_product_variant_config + list_logical_product_variants_config = parent_rpcs.list_logical_product_variants if parent_rpcs.respond_to? :list_logical_product_variants + @list_logical_product_variants = ::Gapic::Config::Method.new list_logical_product_variants_config + lookup_entity_config = parent_rpcs.lookup_entity if parent_rpcs.respond_to? :lookup_entity + @lookup_entity = ::Gapic::Config::Method.new lookup_entity_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/product_registry/v1/cloud_product_registry_read_service/credentials.rb b/owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/product_registry/v1/cloud_product_registry_read_service/credentials.rb new file mode 100644 index 000000000000..15d74e925c1f --- /dev/null +++ b/owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/product_registry/v1/cloud_product_registry_read_service/credentials.rb @@ -0,0 +1,44 @@ +# 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 ProductRegistry + module V1 + module CloudProductRegistryReadService + # Credentials for the CloudProductRegistryReadService API. + class Credentials < ::Google::Auth::Credentials + 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-product_registry-v1/lib/google/cloud/product_registry/v1/cloud_product_registry_read_service/paths.rb b/owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/product_registry/v1/cloud_product_registry_read_service/paths.rb new file mode 100644 index 000000000000..2a28bae5db3c --- /dev/null +++ b/owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/product_registry/v1/cloud_product_registry_read_service/paths.rb @@ -0,0 +1,78 @@ +# 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 ProductRegistry + module V1 + module CloudProductRegistryReadService + # Path helper methods for the CloudProductRegistryReadService API. + module Paths + ## + # Create a fully-qualified LogicalProduct resource string. + # + # The resource will be in the following format: + # + # `logicalProducts/{logical_product}` + # + # @param logical_product [String] + # + # @return [::String] + def logical_product_path logical_product: + "logicalProducts/#{logical_product}" + end + + ## + # Create a fully-qualified LogicalProductVariant resource string. + # + # The resource will be in the following format: + # + # `logicalProducts/{logical_product}/variants/{variant}` + # + # @param logical_product [String] + # @param variant [String] + # + # @return [::String] + def logical_product_variant_path logical_product:, variant: + raise ::ArgumentError, "logical_product cannot contain /" if logical_product.to_s.include? "/" + + "logicalProducts/#{logical_product}/variants/#{variant}" + end + + ## + # Create a fully-qualified ProductSuite resource string. + # + # The resource will be in the following format: + # + # `productSuites/{product_suite}` + # + # @param product_suite [String] + # + # @return [::String] + def product_suite_path product_suite: + "productSuites/#{product_suite}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/product_registry/v1/cloud_product_registry_read_service/rest.rb b/owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/product_registry/v1/cloud_product_registry_read_service/rest.rb new file mode 100644 index 000000000000..2c8db54a0dc0 --- /dev/null +++ b/owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/product_registry/v1/cloud_product_registry_read_service/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/product_registry/v1/version" + +require "google/cloud/product_registry/v1/cloud_product_registry_read_service/credentials" +require "google/cloud/product_registry/v1/cloud_product_registry_read_service/paths" +require "google/cloud/product_registry/v1/cloud_product_registry_read_service/rest/client" + +module Google + module Cloud + module ProductRegistry + module V1 + ## + # Cloud Product Registry Read Service provides capabilities to access all first + # and third party Google Cloud products. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/product_registry/v1/cloud_product_registry_read_service/rest" + # client = ::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Rest::Client.new + # + module CloudProductRegistryReadService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/product_registry/v1/cloud_product_registry_read_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/product_registry/v1/cloud_product_registry_read_service/rest/client.rb b/owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/product_registry/v1/cloud_product_registry_read_service/rest/client.rb new file mode 100644 index 000000000000..14ff48adff4b --- /dev/null +++ b/owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/product_registry/v1/cloud_product_registry_read_service/rest/client.rb @@ -0,0 +1,1032 @@ +# 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/productregistry/v1/cloud_product_registry_read_service_pb" +require "google/cloud/product_registry/v1/cloud_product_registry_read_service/rest/service_stub" + +module Google + module Cloud + module ProductRegistry + module V1 + module CloudProductRegistryReadService + module Rest + ## + # REST client for the CloudProductRegistryReadService service. + # + # Cloud Product Registry Read Service provides capabilities to access all first + # and third party Google Cloud products. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "cloudproductregistry.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :cloud_product_registry_read_service_stub + + ## + # Configure the CloudProductRegistryReadService Client class. + # + # See {::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CloudProductRegistryReadService clients + # ::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::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", "ProductRegistry", "V1"] + 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.get_product_suite.timeout = 60.0 + default_config.rpcs.get_product_suite.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_product_suites.timeout = 60.0 + default_config.rpcs.list_product_suites.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_logical_product.timeout = 60.0 + default_config.rpcs.get_logical_product.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_logical_products.timeout = 60.0 + default_config.rpcs.list_logical_products.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_logical_product_variant.timeout = 60.0 + default_config.rpcs.get_logical_product_variant.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_logical_product_variants.timeout = 60.0 + default_config.rpcs.list_logical_product_variants.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.lookup_entity.timeout = 60.0 + default_config.rpcs.lookup_entity.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 CloudProductRegistryReadService 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::ProductRegistry::V1::CloudProductRegistryReadService::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 + @cloud_product_registry_read_service_stub.universe_domain + end + + ## + # Create a new CloudProductRegistryReadService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CloudProductRegistryReadService 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 + + @cloud_product_registry_read_service_stub = ::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @cloud_product_registry_read_service_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 + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @cloud_product_registry_read_service_stub.logger + end + + # Service calls + + ## + # Get details of a ProductSuite. + # + # @overload get_product_suite(request, options = nil) + # Pass arguments to `get_product_suite` via a request object, either of type + # {::Google::Cloud::ProductRegistry::V1::GetProductSuiteRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ProductRegistry::V1::GetProductSuiteRequest, ::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_product_suite(name: nil) + # Pass arguments to `get_product_suite` 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. The name of the ProductSuite to retrieve. + # Format: productSuites/\\{product_suite} + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ProductRegistry::V1::ProductSuite] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ProductRegistry::V1::ProductSuite] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/product_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ProductRegistry::V1::GetProductSuiteRequest.new + # + # # Call the get_product_suite method. + # result = client.get_product_suite request + # + # # The returned object is of type Google::Cloud::ProductRegistry::V1::ProductSuite. + # p result + # + def get_product_suite request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ProductRegistry::V1::GetProductSuiteRequest + + # 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_product_suite.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::ProductRegistry::V1::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_product_suite.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_product_suite.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_product_registry_read_service_stub.get_product_suite 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 ProductSuites. + # + # @overload list_product_suites(request, options = nil) + # Pass arguments to `list_product_suites` via a request object, either of type + # {::Google::Cloud::ProductRegistry::V1::ListProductSuitesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ProductRegistry::V1::ListProductSuitesRequest, ::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_product_suites(page_size: nil, page_token: nil) + # Pass arguments to `list_product_suites` 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 page_size [::Integer] + # Optional. The maximum number of suites to return. The service may return + # fewer than this value. If unspecified, at most 100 suites will be returned. + # The maximum value is 500; values above 500 will be coerced to 500. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListProductSuites` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListProductSuites` must + # match the call that provided the page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ProductRegistry::V1::ProductSuite>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ProductRegistry::V1::ProductSuite>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/product_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ProductRegistry::V1::ListProductSuitesRequest.new + # + # # Call the list_product_suites method. + # result = client.list_product_suites 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::ProductRegistry::V1::ProductSuite. + # p item + # end + # + def list_product_suites request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ProductRegistry::V1::ListProductSuitesRequest + + # 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_product_suites.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::ProductRegistry::V1::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_product_suites.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_product_suites.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_product_registry_read_service_stub.list_product_suites request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @cloud_product_registry_read_service_stub, :list_product_suites, "product_suites", 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 LogicalProduct. + # + # @overload get_logical_product(request, options = nil) + # Pass arguments to `get_logical_product` via a request object, either of type + # {::Google::Cloud::ProductRegistry::V1::GetLogicalProductRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ProductRegistry::V1::GetLogicalProductRequest, ::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_logical_product(name: nil) + # Pass arguments to `get_logical_product` 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. The name of the LogicalProduct to retrieve. + # Format: logicalProducts/\\{logical_product} + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ProductRegistry::V1::LogicalProduct] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ProductRegistry::V1::LogicalProduct] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/product_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ProductRegistry::V1::GetLogicalProductRequest.new + # + # # Call the get_logical_product method. + # result = client.get_logical_product request + # + # # The returned object is of type Google::Cloud::ProductRegistry::V1::LogicalProduct. + # p result + # + def get_logical_product request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ProductRegistry::V1::GetLogicalProductRequest + + # 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_logical_product.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::ProductRegistry::V1::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_logical_product.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_logical_product.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_product_registry_read_service_stub.get_logical_product 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 LogicalProducts matching given criteria. + # + # @overload list_logical_products(request, options = nil) + # Pass arguments to `list_logical_products` via a request object, either of type + # {::Google::Cloud::ProductRegistry::V1::ListLogicalProductsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ProductRegistry::V1::ListLogicalProductsRequest, ::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_logical_products(filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_logical_products` 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 filter [::String] + # Optional. The filter expression for listing logical products. + # Filter syntax: https://google.aip.dev/160 + # Supported fields: suite_id + # @param page_size [::Integer] + # Optional. The maximum number of logical products to return. The service may + # return fewer than this value. If unspecified, at most 100 logical products + # will be returned. The maximum value is 500; values above 500 will be + # coerced to 500. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListLogicalProducts` + # call. Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListLogicalProducts` + # must match the call that provided the page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ProductRegistry::V1::LogicalProduct>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ProductRegistry::V1::LogicalProduct>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/product_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ProductRegistry::V1::ListLogicalProductsRequest.new + # + # # Call the list_logical_products method. + # result = client.list_logical_products 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::ProductRegistry::V1::LogicalProduct. + # p item + # end + # + def list_logical_products request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ProductRegistry::V1::ListLogicalProductsRequest + + # 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_logical_products.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::ProductRegistry::V1::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_logical_products.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_logical_products.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_product_registry_read_service_stub.list_logical_products request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @cloud_product_registry_read_service_stub, :list_logical_products, "logical_products", 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 + + ## + # Get details of a LogicalProductVariant. + # + # @overload get_logical_product_variant(request, options = nil) + # Pass arguments to `get_logical_product_variant` via a request object, either of type + # {::Google::Cloud::ProductRegistry::V1::GetLogicalProductVariantRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ProductRegistry::V1::GetLogicalProductVariantRequest, ::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_logical_product_variant(name: nil) + # Pass arguments to `get_logical_product_variant` 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. The name of the LogicalProductVariant to retrieve. + # Format: logicalProducts/\\{logical_product}/variants/\\{variant} + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ProductRegistry::V1::LogicalProductVariant] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ProductRegistry::V1::LogicalProductVariant] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/product_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ProductRegistry::V1::GetLogicalProductVariantRequest.new + # + # # Call the get_logical_product_variant method. + # result = client.get_logical_product_variant request + # + # # The returned object is of type Google::Cloud::ProductRegistry::V1::LogicalProductVariant. + # p result + # + def get_logical_product_variant request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ProductRegistry::V1::GetLogicalProductVariantRequest + + # 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_logical_product_variant.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::ProductRegistry::V1::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_logical_product_variant.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_logical_product_variant.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_product_registry_read_service_stub.get_logical_product_variant 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 LogicalProductVariants matching given criteria. + # + # @overload list_logical_product_variants(request, options = nil) + # Pass arguments to `list_logical_product_variants` via a request object, either of type + # {::Google::Cloud::ProductRegistry::V1::ListLogicalProductVariantsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ProductRegistry::V1::ListLogicalProductVariantsRequest, ::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_logical_product_variants(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_logical_product_variants` 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 logical product id. + # Format: logicalProducts/\\{logical_product} + # @param page_size [::Integer] + # Optional. The maximum number of logical product variants to return. The + # service may return fewer than this value. If unspecified, at most 100 + # logical product variants will be returned. The maximum value is 500; values + # above 500 will be coerced to 500. + # @param page_token [::String] + # Optional. A page token, received from a previous + # `ListLogicalProductVariants` call. Provide this to retrieve the subsequent + # page. + # + # When paginating, all other parameters provided to + # `ListLogicalProductVariants` must match the call that provided the page + # token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ProductRegistry::V1::LogicalProductVariant>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ProductRegistry::V1::LogicalProductVariant>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/product_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ProductRegistry::V1::ListLogicalProductVariantsRequest.new + # + # # Call the list_logical_product_variants method. + # result = client.list_logical_product_variants 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::ProductRegistry::V1::LogicalProductVariant. + # p item + # end + # + def list_logical_product_variants request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ProductRegistry::V1::ListLogicalProductVariantsRequest + + # 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_logical_product_variants.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::ProductRegistry::V1::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_logical_product_variants.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_logical_product_variants.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_product_registry_read_service_stub.list_logical_product_variants request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @cloud_product_registry_read_service_stub, :list_logical_product_variants, "logical_product_variants", 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 + + ## + # Look up entities. + # + # @overload lookup_entity(request, options = nil) + # Pass arguments to `lookup_entity` via a request object, either of type + # {::Google::Cloud::ProductRegistry::V1::LookupEntityRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::ProductRegistry::V1::LookupEntityRequest, ::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 lookup_entity(lookup_uri: nil) + # Pass arguments to `lookup_entity` 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 lookup_uri [::String] + # Required. Entity uri to look up. + # Supported Formats: + # logicalProducts/\\{logical_product} + # logicalProducts/\\{logical_product}/variants/\\{variant} + # productSuites/\\{product_suite} + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::ProductRegistry::V1::LookupEntityResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ProductRegistry::V1::LookupEntityResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/product_registry/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::ProductRegistry::V1::LookupEntityRequest.new + # + # # Call the lookup_entity method. + # result = client.lookup_entity request + # + # # The returned object is of type Google::Cloud::ProductRegistry::V1::LookupEntityResponse. + # p result + # + def lookup_entity request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ProductRegistry::V1::LookupEntityRequest + + # 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.lookup_entity.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::ProductRegistry::V1::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.lookup_entity.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.lookup_entity.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_product_registry_read_service_stub.lookup_entity 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 + + ## + # Configuration class for the CloudProductRegistryReadService REST API. + # + # This class represents the configuration for CloudProductRegistryReadService 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::ProductRegistry::V1::CloudProductRegistryReadService::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 + # # get_product_suite to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_product_suite.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_product_suite.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 = "cloudproductregistry.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 + 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 CloudProductRegistryReadService 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 `get_product_suite` + # @return [::Gapic::Config::Method] + # + attr_reader :get_product_suite + ## + # RPC-specific configuration for `list_product_suites` + # @return [::Gapic::Config::Method] + # + attr_reader :list_product_suites + ## + # RPC-specific configuration for `get_logical_product` + # @return [::Gapic::Config::Method] + # + attr_reader :get_logical_product + ## + # RPC-specific configuration for `list_logical_products` + # @return [::Gapic::Config::Method] + # + attr_reader :list_logical_products + ## + # RPC-specific configuration for `get_logical_product_variant` + # @return [::Gapic::Config::Method] + # + attr_reader :get_logical_product_variant + ## + # RPC-specific configuration for `list_logical_product_variants` + # @return [::Gapic::Config::Method] + # + attr_reader :list_logical_product_variants + ## + # RPC-specific configuration for `lookup_entity` + # @return [::Gapic::Config::Method] + # + attr_reader :lookup_entity + + # @private + def initialize parent_rpcs = nil + get_product_suite_config = parent_rpcs.get_product_suite if parent_rpcs.respond_to? :get_product_suite + @get_product_suite = ::Gapic::Config::Method.new get_product_suite_config + list_product_suites_config = parent_rpcs.list_product_suites if parent_rpcs.respond_to? :list_product_suites + @list_product_suites = ::Gapic::Config::Method.new list_product_suites_config + get_logical_product_config = parent_rpcs.get_logical_product if parent_rpcs.respond_to? :get_logical_product + @get_logical_product = ::Gapic::Config::Method.new get_logical_product_config + list_logical_products_config = parent_rpcs.list_logical_products if parent_rpcs.respond_to? :list_logical_products + @list_logical_products = ::Gapic::Config::Method.new list_logical_products_config + get_logical_product_variant_config = parent_rpcs.get_logical_product_variant if parent_rpcs.respond_to? :get_logical_product_variant + @get_logical_product_variant = ::Gapic::Config::Method.new get_logical_product_variant_config + list_logical_product_variants_config = parent_rpcs.list_logical_product_variants if parent_rpcs.respond_to? :list_logical_product_variants + @list_logical_product_variants = ::Gapic::Config::Method.new list_logical_product_variants_config + lookup_entity_config = parent_rpcs.lookup_entity if parent_rpcs.respond_to? :lookup_entity + @lookup_entity = ::Gapic::Config::Method.new lookup_entity_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/product_registry/v1/cloud_product_registry_read_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/product_registry/v1/cloud_product_registry_read_service/rest/service_stub.rb new file mode 100644 index 000000000000..56c62b993655 --- /dev/null +++ b/owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/product_registry/v1/cloud_product_registry_read_service/rest/service_stub.rb @@ -0,0 +1,518 @@ +# 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/productregistry/v1/cloud_product_registry_read_service_pb" + +module Google + module Cloud + module ProductRegistry + module V1 + module CloudProductRegistryReadService + module Rest + ## + # REST service stub for the CloudProductRegistryReadService 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 get_product_suite REST call + # + # @param request_pb [::Google::Cloud::ProductRegistry::V1::GetProductSuiteRequest] + # 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::ProductRegistry::V1::ProductSuite] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ProductRegistry::V1::ProductSuite] + # A result object deserialized from the server's reply + def get_product_suite request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_product_suite_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_product_suite", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ProductRegistry::V1::ProductSuite.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_product_suites REST call + # + # @param request_pb [::Google::Cloud::ProductRegistry::V1::ListProductSuitesRequest] + # 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::ProductRegistry::V1::ListProductSuitesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ProductRegistry::V1::ListProductSuitesResponse] + # A result object deserialized from the server's reply + def list_product_suites request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_product_suites_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_product_suites", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ProductRegistry::V1::ListProductSuitesResponse.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_logical_product REST call + # + # @param request_pb [::Google::Cloud::ProductRegistry::V1::GetLogicalProductRequest] + # 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::ProductRegistry::V1::LogicalProduct] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ProductRegistry::V1::LogicalProduct] + # A result object deserialized from the server's reply + def get_logical_product request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_logical_product_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_logical_product", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ProductRegistry::V1::LogicalProduct.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_logical_products REST call + # + # @param request_pb [::Google::Cloud::ProductRegistry::V1::ListLogicalProductsRequest] + # 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::ProductRegistry::V1::ListLogicalProductsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ProductRegistry::V1::ListLogicalProductsResponse] + # A result object deserialized from the server's reply + def list_logical_products request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_logical_products_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_logical_products", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ProductRegistry::V1::ListLogicalProductsResponse.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_logical_product_variant REST call + # + # @param request_pb [::Google::Cloud::ProductRegistry::V1::GetLogicalProductVariantRequest] + # 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::ProductRegistry::V1::LogicalProductVariant] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ProductRegistry::V1::LogicalProductVariant] + # A result object deserialized from the server's reply + def get_logical_product_variant request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_logical_product_variant_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_logical_product_variant", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ProductRegistry::V1::LogicalProductVariant.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_logical_product_variants REST call + # + # @param request_pb [::Google::Cloud::ProductRegistry::V1::ListLogicalProductVariantsRequest] + # 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::ProductRegistry::V1::ListLogicalProductVariantsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ProductRegistry::V1::ListLogicalProductVariantsResponse] + # A result object deserialized from the server's reply + def list_logical_product_variants request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_logical_product_variants_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_logical_product_variants", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ProductRegistry::V1::ListLogicalProductVariantsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the lookup_entity REST call + # + # @param request_pb [::Google::Cloud::ProductRegistry::V1::LookupEntityRequest] + # 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::ProductRegistry::V1::LookupEntityResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::ProductRegistry::V1::LookupEntityResponse] + # A result object deserialized from the server's reply + def lookup_entity request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_lookup_entity_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: "lookup_entity", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::ProductRegistry::V1::LookupEntityResponse.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 get_product_suite REST call + # + # @param request_pb [::Google::Cloud::ProductRegistry::V1::GetProductSuiteRequest] + # 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_product_suite_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^productSuites/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_product_suites REST call + # + # @param request_pb [::Google::Cloud::ProductRegistry::V1::ListProductSuitesRequest] + # 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_product_suites_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/productSuites", + matches: [] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_logical_product REST call + # + # @param request_pb [::Google::Cloud::ProductRegistry::V1::GetLogicalProductRequest] + # 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_logical_product_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^logicalProducts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_logical_products REST call + # + # @param request_pb [::Google::Cloud::ProductRegistry::V1::ListLogicalProductsRequest] + # 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_logical_products_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/logicalProducts", + matches: [] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_logical_product_variant REST call + # + # @param request_pb [::Google::Cloud::ProductRegistry::V1::GetLogicalProductVariantRequest] + # 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_logical_product_variant_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^logicalProducts/[^/]+/variants/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_logical_product_variants REST call + # + # @param request_pb [::Google::Cloud::ProductRegistry::V1::ListLogicalProductVariantsRequest] + # 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_logical_product_variants_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/variants", + matches: [ + ["parent", %r{^logicalProducts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the lookup_entity REST call + # + # @param request_pb [::Google::Cloud::ProductRegistry::V1::LookupEntityRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_lookup_entity_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{lookup_uri}:lookupEntity", + matches: [ + ["lookup_uri", %r{^logicalProducts/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{lookup_uri}:lookupEntity", + matches: [ + ["lookup_uri", %r{^logicalProducts/[^/]+/variants/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{lookup_uri}:lookupEntity", + matches: [ + ["lookup_uri", %r{^productSuites/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/product_registry/v1/rest.rb b/owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/product_registry/v1/rest.rb new file mode 100644 index 000000000000..e1aceb76240c --- /dev/null +++ b/owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/product_registry/v1/rest.rb @@ -0,0 +1,37 @@ +# 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/product_registry/v1/cloud_product_registry_read_service/rest" +require "google/cloud/product_registry/v1/version" + +module Google + module Cloud + module ProductRegistry + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/product_registry/v1/rest" + # client = ::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Rest::Client.new + # + module V1 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/product_registry/v1/version.rb b/owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/product_registry/v1/version.rb new file mode 100644 index 000000000000..a2a6cfaad035 --- /dev/null +++ b/owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/product_registry/v1/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 ProductRegistry + module V1 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/productregistry/v1/cloud_product_registry_read_service_pb.rb b/owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/productregistry/v1/cloud_product_registry_read_service_pb.rb new file mode 100644 index 000000000000..d3406aac6233 --- /dev/null +++ b/owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/productregistry/v1/cloud_product_registry_read_service_pb.rb @@ -0,0 +1,39 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/productregistry/v1/cloud_product_registry_read_service.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/productregistry/v1/logical_product_pb' +require 'google/cloud/productregistry/v1/logical_product_variant_pb' +require 'google/cloud/productregistry/v1/product_suite_pb' + + +descriptor_data = "\nIgoogle/cloud/productregistry/v1/cloud_product_registry_read_service.proto\x12\x1fgoogle.cloud.productregistry.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x35google/cloud/productregistry/v1/logical_product.proto\x1a=google/cloud/productregistry/v1/logical_product_variant.proto\x1a\x33google/cloud/productregistry/v1/product_suite.proto\"`\n\x16GetProductSuiteRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0cloudproductregistry.googleapis.com/ProductSuite\"d\n\x18GetLogicalProductRequest\x12H\n\x04name\x18\x01 \x01(\tB:\xe0\x41\x02\xfa\x41\x34\n2cloudproductregistry.googleapis.com/LogicalProduct\"r\n\x1fGetLogicalProductVariantRequest\x12O\n\x04name\x18\x01 \x01(\tBA\xe0\x41\x02\xfa\x41;\n9cloudproductregistry.googleapis.com/LogicalProductVariant\"K\n\x18ListProductSuitesRequest\x12\x16\n\tpage_size\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\"{\n\x19ListProductSuitesResponse\x12\x45\n\x0eproduct_suites\x18\x01 \x03(\x0b\x32-.google.cloud.productregistry.v1.ProductSuite\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"b\n\x1aListLogicalProductsRequest\x12\x13\n\x06\x66ilter\x18\x01 \x01(\tB\x03\xe0\x41\x01\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\"\x81\x01\n\x1bListLogicalProductsResponse\x12I\n\x10logical_products\x18\x01 \x03(\x0b\x32/.google.cloud.productregistry.v1.LogicalProduct\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xa7\x01\n!ListLogicalProductVariantsRequest\x12Q\n\x06parent\x18\x01 \x01(\tBA\xe0\x41\x02\xfa\x41;\x12\x39\x63loudproductregistry.googleapis.com/LogicalProductVariant\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\"\x97\x01\n\"ListLogicalProductVariantsResponse\x12X\n\x18logical_product_variants\x18\x01 \x03(\x0b\x32\x36.google.cloud.productregistry.v1.LogicalProductVariant\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\".\n\x13LookupEntityRequest\x12\x17\n\nlookup_uri\x18\x01 \x01(\tB\x03\xe0\x41\x02\"\x8f\x02\n\x14LookupEntityResponse\x12J\n\x0flogical_product\x18\x01 \x01(\x0b\x32/.google.cloud.productregistry.v1.LogicalProductH\x00\x12Y\n\x17logical_product_variant\x18\x02 \x01(\x0b\x32\x36.google.cloud.productregistry.v1.LogicalProductVariantH\x00\x12\x46\n\rproduct_suite\x18\x03 \x01(\x0b\x32-.google.cloud.productregistry.v1.ProductSuiteH\x00\x42\x08\n\x06\x65ntity2\xd0\x0b\n\x1f\x43loudProductRegistryReadService\x12\xa4\x01\n\x0fGetProductSuite\x12\x37.google.cloud.productregistry.v1.GetProductSuiteRequest\x1a-.google.cloud.productregistry.v1.ProductSuite\")\xda\x41\x04name\x82\xd3\xe4\x93\x02\x1c\x12\x1a/v1/{name=productSuites/*}\x12\xa5\x01\n\x11ListProductSuites\x12\x39.google.cloud.productregistry.v1.ListProductSuitesRequest\x1a:.google.cloud.productregistry.v1.ListProductSuitesResponse\"\x19\x82\xd3\xe4\x93\x02\x13\x12\x11/v1/productSuites\x12\xac\x01\n\x11GetLogicalProduct\x12\x39.google.cloud.productregistry.v1.GetLogicalProductRequest\x1a/.google.cloud.productregistry.v1.LogicalProduct\"+\xda\x41\x04name\x82\xd3\xe4\x93\x02\x1e\x12\x1c/v1/{name=logicalProducts/*}\x12\xad\x01\n\x13ListLogicalProducts\x12;.google.cloud.productregistry.v1.ListLogicalProductsRequest\x1a<.google.cloud.productregistry.v1.ListLogicalProductsResponse\"\x1b\x82\xd3\xe4\x93\x02\x15\x12\x13/v1/logicalProducts\x12\xcc\x01\n\x18GetLogicalProductVariant\x12@.google.cloud.productregistry.v1.GetLogicalProductVariantRequest\x1a\x36.google.cloud.productregistry.v1.LogicalProductVariant\"6\xda\x41\x04name\x82\xd3\xe4\x93\x02)\x12\'/v1/{name=logicalProducts/*/variants/*}\x12\xdf\x01\n\x1aListLogicalProductVariants\x12\x42.google.cloud.productregistry.v1.ListLogicalProductVariantsRequest\x1a\x43.google.cloud.productregistry.v1.ListLogicalProductVariantsResponse\"8\xda\x41\x06parent\x82\xd3\xe4\x93\x02)\x12\'/v1/{parent=logicalProducts/*}/variants\x12\xa5\x02\n\x0cLookupEntity\x12\x34.google.cloud.productregistry.v1.LookupEntityRequest\x1a\x35.google.cloud.productregistry.v1.LookupEntityResponse\"\xa7\x01\x82\xd3\xe4\x93\x02\xa0\x01\x12//v1/{lookup_uri=logicalProducts/*}:lookupEntityZ<\x12:/v1/{lookup_uri=logicalProducts/*/variants/*}:lookupEntityZ/\x12-/v1/{lookup_uri=productSuites/*}:lookupEntity\x1a&\xca\x41#cloudproductregistry.googleapis.comB\x85\x02\n#com.google.cloud.productregistry.v1B$CloudProductRegistryReadServiceProtoP\x01ZMcloud.google.com/go/productregistry/apiv1/productregistrypb;productregistrypb\xaa\x02\x1fGoogle.Cloud.ProductRegistry.V1\xca\x02\x1fGoogle\\Cloud\\ProductRegistry\\V1\xea\x02\"Google::Cloud::ProductRegistry::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module ProductRegistry + module V1 + GetProductSuiteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.productregistry.v1.GetProductSuiteRequest").msgclass + GetLogicalProductRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.productregistry.v1.GetLogicalProductRequest").msgclass + GetLogicalProductVariantRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.productregistry.v1.GetLogicalProductVariantRequest").msgclass + ListProductSuitesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.productregistry.v1.ListProductSuitesRequest").msgclass + ListProductSuitesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.productregistry.v1.ListProductSuitesResponse").msgclass + ListLogicalProductsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.productregistry.v1.ListLogicalProductsRequest").msgclass + ListLogicalProductsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.productregistry.v1.ListLogicalProductsResponse").msgclass + ListLogicalProductVariantsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.productregistry.v1.ListLogicalProductVariantsRequest").msgclass + ListLogicalProductVariantsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.productregistry.v1.ListLogicalProductVariantsResponse").msgclass + LookupEntityRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.productregistry.v1.LookupEntityRequest").msgclass + LookupEntityResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.productregistry.v1.LookupEntityResponse").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/productregistry/v1/cloud_product_registry_read_service_services_pb.rb b/owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/productregistry/v1/cloud_product_registry_read_service_services_pb.rb new file mode 100644 index 000000000000..aa191645f417 --- /dev/null +++ b/owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/productregistry/v1/cloud_product_registry_read_service_services_pb.rb @@ -0,0 +1,58 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/productregistry/v1/cloud_product_registry_read_service.proto for package 'Google.Cloud.ProductRegistry.V1' +# Original file comments: +# 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 +# +# 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. +# + +require 'grpc' +require 'google/cloud/productregistry/v1/cloud_product_registry_read_service_pb' + +module Google + module Cloud + module ProductRegistry + module V1 + module CloudProductRegistryReadService + # Cloud Product Registry Read Service provides capabilities to access all first + # and third party Google Cloud products. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.productregistry.v1.CloudProductRegistryReadService' + + # Get details of a ProductSuite. + rpc :GetProductSuite, ::Google::Cloud::ProductRegistry::V1::GetProductSuiteRequest, ::Google::Cloud::ProductRegistry::V1::ProductSuite + # Lists ProductSuites. + rpc :ListProductSuites, ::Google::Cloud::ProductRegistry::V1::ListProductSuitesRequest, ::Google::Cloud::ProductRegistry::V1::ListProductSuitesResponse + # Gets details of a LogicalProduct. + rpc :GetLogicalProduct, ::Google::Cloud::ProductRegistry::V1::GetLogicalProductRequest, ::Google::Cloud::ProductRegistry::V1::LogicalProduct + # Lists LogicalProducts matching given criteria. + rpc :ListLogicalProducts, ::Google::Cloud::ProductRegistry::V1::ListLogicalProductsRequest, ::Google::Cloud::ProductRegistry::V1::ListLogicalProductsResponse + # Get details of a LogicalProductVariant. + rpc :GetLogicalProductVariant, ::Google::Cloud::ProductRegistry::V1::GetLogicalProductVariantRequest, ::Google::Cloud::ProductRegistry::V1::LogicalProductVariant + # Lists LogicalProductVariants matching given criteria. + rpc :ListLogicalProductVariants, ::Google::Cloud::ProductRegistry::V1::ListLogicalProductVariantsRequest, ::Google::Cloud::ProductRegistry::V1::ListLogicalProductVariantsResponse + # Look up entities. + rpc :LookupEntity, ::Google::Cloud::ProductRegistry::V1::LookupEntityRequest, ::Google::Cloud::ProductRegistry::V1::LookupEntityResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/productregistry/v1/lifecycle_state_pb.rb b/owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/productregistry/v1/lifecycle_state_pb.rb new file mode 100644 index 000000000000..330b38ac4f93 --- /dev/null +++ b/owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/productregistry/v1/lifecycle_state_pb.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/productregistry/v1/lifecycle_state.proto + +require 'google/protobuf' + + +descriptor_data = "\n5google/cloud/productregistry/v1/lifecycle_state.proto\x12\x1fgoogle.cloud.productregistry.v1*\xad\x01\n\x0eLifecycleState\x12\x1f\n\x1bLIFECYCLE_STATE_UNSPECIFIED\x10\x00\x12\"\n\x1eLIFECYCLE_STATE_PUBLIC_PREVIEW\x10\x01\x12\x1e\n\x1aLIFECYCLE_STATE_PRIVATE_GA\x10\x02\x12\x16\n\x12LIFECYCLE_STATE_GA\x10\x03\x12\x1e\n\x1aLIFECYCLE_STATE_DEPRECATED\x10\x04\x42\xf4\x01\n#com.google.cloud.productregistry.v1B\x13LifecycleStateProtoP\x01ZMcloud.google.com/go/productregistry/apiv1/productregistrypb;productregistrypb\xaa\x02\x1fGoogle.Cloud.ProductRegistry.V1\xca\x02\x1fGoogle\\Cloud\\ProductRegistry\\V1\xea\x02\"Google::Cloud::ProductRegistry::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module ProductRegistry + module V1 + LifecycleState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.productregistry.v1.LifecycleState").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/productregistry/v1/logical_product_pb.rb b/owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/productregistry/v1/logical_product_pb.rb new file mode 100644 index 000000000000..ce445dd9e745 --- /dev/null +++ b/owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/productregistry/v1/logical_product_pb.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/productregistry/v1/logical_product.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/productregistry/v1/lifecycle_state_pb' + + +descriptor_data = "\n5google/cloud/productregistry/v1/logical_product.proto\x12\x1fgoogle.cloud.productregistry.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x35google/cloud/productregistry/v1/lifecycle_state.proto\"\xd8\x03\n\x0eLogicalProduct\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\r\n\x05title\x18\x02 \x01(\t\x12L\n\rproduct_suite\x18\x03 \x01(\tB5\xfa\x41\x32\n0cloudproductregistry.googleapis.com/ProductSuite\x12S\n\x08variants\x18\x04 \x03(\tBA\xe0\x41\x03\xfa\x41;\n9cloudproductregistry.googleapis.com/LogicalProductVariant\x12M\n\x0flifecycle_state\x18\x05 \x01(\x0e\x32/.google.cloud.productregistry.v1.LifecycleStateB\x03\xe0\x41\x03\x12\x15\n\x08replaced\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x1e\n\x0breplacement\x18\x07 \x01(\tB\t\xe0\x41\x03\xfa\x41\x03\n\x01*:{\xea\x41x\n2cloudproductregistry.googleapis.com/LogicalProduct\x12!logicalProducts/{logical_product}*\x0flogicalProducts2\x0elogicalProductB\xf4\x01\n#com.google.cloud.productregistry.v1B\x13LogicalProductProtoP\x01ZMcloud.google.com/go/productregistry/apiv1/productregistrypb;productregistrypb\xaa\x02\x1fGoogle.Cloud.ProductRegistry.V1\xca\x02\x1fGoogle\\Cloud\\ProductRegistry\\V1\xea\x02\"Google::Cloud::ProductRegistry::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module ProductRegistry + module V1 + LogicalProduct = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.productregistry.v1.LogicalProduct").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/productregistry/v1/logical_product_variant_pb.rb b/owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/productregistry/v1/logical_product_variant_pb.rb new file mode 100644 index 000000000000..74726eb17b74 --- /dev/null +++ b/owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/productregistry/v1/logical_product_variant_pb.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/productregistry/v1/logical_product_variant.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/productregistry/v1/lifecycle_state_pb' + + +descriptor_data = "\n=google/cloud/productregistry/v1/logical_product_variant.proto\x12\x1fgoogle.cloud.productregistry.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x35google/cloud/productregistry/v1/lifecycle_state.proto\"\xe6\x02\n\x15LogicalProductVariant\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\r\n\x05title\x18\x02 \x01(\t\x12M\n\x0flifecycle_state\x18\x03 \x01(\x0e\x32/.google.cloud.productregistry.v1.LifecycleStateB\x03\xe0\x41\x03\x12\x15\n\x08replaced\x18\x04 \x01(\x08\x42\x03\xe0\x41\x03\x12\x1e\n\x0breplacement\x18\x05 \x01(\tB\t\xe0\x41\x03\xfa\x41\x03\n\x01*:\xa4\x01\xea\x41\xa0\x01\n9cloudproductregistry.googleapis.com/LogicalProductVariant\x12\x34logicalProducts/{logical_product}/variants/{variant}*\x16logicalProductVariants2\x15logicalProductVariantB\xfb\x01\n#com.google.cloud.productregistry.v1B\x1aLogicalProductVariantProtoP\x01ZMcloud.google.com/go/productregistry/apiv1/productregistrypb;productregistrypb\xaa\x02\x1fGoogle.Cloud.ProductRegistry.V1\xca\x02\x1fGoogle\\Cloud\\ProductRegistry\\V1\xea\x02\"Google::Cloud::ProductRegistry::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module ProductRegistry + module V1 + LogicalProductVariant = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.productregistry.v1.LogicalProductVariant").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/productregistry/v1/product_suite_pb.rb b/owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/productregistry/v1/product_suite_pb.rb new file mode 100644 index 000000000000..eb5a5e3d127c --- /dev/null +++ b/owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/productregistry/v1/product_suite_pb.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/productregistry/v1/product_suite.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n3google/cloud/productregistry/v1/product_suite.proto\x12\x1fgoogle.cloud.productregistry.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xb0\x02\n\x0cProductSuite\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\r\n\x05title\x18\x02 \x01(\t\x12T\n\x10logical_products\x18\x03 \x03(\tB:\xe0\x41\x03\xfa\x41\x34\n2cloudproductregistry.googleapis.com/LogicalProduct\x12\x15\n\x08replaced\x18\x04 \x01(\x08\x42\x03\xe0\x41\x03\x12\x1e\n\x0breplacement\x18\x05 \x01(\tB\t\xe0\x41\x03\xfa\x41\x03\n\x01*:q\xea\x41n\n0cloudproductregistry.googleapis.com/ProductSuite\x12\x1dproductSuites/{product_suite}*\rproductSuites2\x0cproductSuiteB\xf2\x01\n#com.google.cloud.productregistry.v1B\x11ProductSuiteProtoP\x01ZMcloud.google.com/go/productregistry/apiv1/productregistrypb;productregistrypb\xaa\x02\x1fGoogle.Cloud.ProductRegistry.V1\xca\x02\x1fGoogle\\Cloud\\ProductRegistry\\V1\xea\x02\"Google::Cloud::ProductRegistry::V1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module ProductRegistry + module V1 + ProductSuite = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.productregistry.v1.ProductSuite").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-product_registry-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-product_registry-v1/proto_docs/README.md new file mode 100644 index 000000000000..b3eedc5e8699 --- /dev/null +++ b/owl-bot-staging/google-cloud-product_registry-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Cloud Product Registry V1 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-product_registry-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-product_registry-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-cloud-product_registry-v1/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-product_registry-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-product_registry-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-product_registry-v1/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-product_registry-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-product_registry-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-product_registry-v1/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-product_registry-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-product_registry-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-product_registry-v1/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-product_registry-v1/proto_docs/google/cloud/productregistry/v1/cloud_product_registry_read_service.rb b/owl-bot-staging/google-cloud-product_registry-v1/proto_docs/google/cloud/productregistry/v1/cloud_product_registry_read_service.rb new file mode 100644 index 000000000000..a6c22408d98c --- /dev/null +++ b/owl-bot-staging/google-cloud-product_registry-v1/proto_docs/google/cloud/productregistry/v1/cloud_product_registry_read_service.rb @@ -0,0 +1,196 @@ +# 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 ProductRegistry + module V1 + # Request message for GetProductSuite. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the ProductSuite to retrieve. + # Format: productSuites/\\{product_suite} + class GetProductSuiteRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for GetLogicalProduct. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the LogicalProduct to retrieve. + # Format: logicalProducts/\\{logical_product} + class GetLogicalProductRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for GetLogicalProductVariant. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the LogicalProductVariant to retrieve. + # Format: logicalProducts/\\{logical_product}/variants/\\{variant} + class GetLogicalProductVariantRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for ListProductSuites. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of suites to return. The service may return + # fewer than this value. If unspecified, at most 100 suites will be returned. + # The maximum value is 500; values above 500 will be coerced to 500. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `ListProductSuites` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListProductSuites` must + # match the call that provided the page token. + class ListProductSuitesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for ListProductSuites. + # @!attribute [rw] product_suites + # @return [::Array<::Google::Cloud::ProductRegistry::V1::ProductSuite>] + # Matched ProductSuites + # @!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 ListProductSuitesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for ListLogicalProducts. + # @!attribute [rw] filter + # @return [::String] + # Optional. The filter expression for listing logical products. + # Filter syntax: https://google.aip.dev/160 + # Supported fields: suite_id + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of logical products to return. The service may + # return fewer than this value. If unspecified, at most 100 logical products + # will be returned. The maximum value is 500; values above 500 will be + # coerced to 500. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `ListLogicalProducts` + # call. Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListLogicalProducts` + # must match the call that provided the page token. + class ListLogicalProductsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for ListLogicalProducts. + # @!attribute [rw] logical_products + # @return [::Array<::Google::Cloud::ProductRegistry::V1::LogicalProduct>] + # Matched LogicalProducts + # @!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 ListLogicalProductsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for ListLogicalProductVariants. + # @!attribute [rw] parent + # @return [::String] + # Required. Parent logical product id. + # Format: logicalProducts/\\{logical_product} + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of logical product variants to return. The + # service may return fewer than this value. If unspecified, at most 100 + # logical product variants will be returned. The maximum value is 500; values + # above 500 will be coerced to 500. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous + # `ListLogicalProductVariants` call. Provide this to retrieve the subsequent + # page. + # + # When paginating, all other parameters provided to + # `ListLogicalProductVariants` must match the call that provided the page + # token. + class ListLogicalProductVariantsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for ListLogicalProductVariants. + # @!attribute [rw] logical_product_variants + # @return [::Array<::Google::Cloud::ProductRegistry::V1::LogicalProductVariant>] + # Matched LogicalProductVariants + # @!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 ListLogicalProductVariantsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for LookupEntity. + # @!attribute [rw] lookup_uri + # @return [::String] + # Required. Entity uri to look up. + # Supported Formats: + # logicalProducts/\\{logical_product} + # logicalProducts/\\{logical_product}/variants/\\{variant} + # productSuites/\\{product_suite} + class LookupEntityRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for LookupEntity. + # @!attribute [rw] logical_product + # @return [::Google::Cloud::ProductRegistry::V1::LogicalProduct] + # Matched LogicalProduct. + # + # Note: The following fields are mutually exclusive: `logical_product`, `logical_product_variant`, `product_suite`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] logical_product_variant + # @return [::Google::Cloud::ProductRegistry::V1::LogicalProductVariant] + # Matched LogicalProductVariant. + # + # Note: The following fields are mutually exclusive: `logical_product_variant`, `logical_product`, `product_suite`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] product_suite + # @return [::Google::Cloud::ProductRegistry::V1::ProductSuite] + # Matched ProductSuite. + # + # Note: The following fields are mutually exclusive: `product_suite`, `logical_product`, `logical_product_variant`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class LookupEntityResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-product_registry-v1/proto_docs/google/cloud/productregistry/v1/lifecycle_state.rb b/owl-bot-staging/google-cloud-product_registry-v1/proto_docs/google/cloud/productregistry/v1/lifecycle_state.rb new file mode 100644 index 000000000000..449d8d54bcd6 --- /dev/null +++ b/owl-bot-staging/google-cloud-product_registry-v1/proto_docs/google/cloud/productregistry/v1/lifecycle_state.rb @@ -0,0 +1,48 @@ +# 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 ProductRegistry + module V1 + # Enum representing the lifecycle state of the underlying entity. + module LifecycleState + # The default value. This value is used if the lifecycle state is not set. + LIFECYCLE_STATE_UNSPECIFIED = 0 + + # The entity is in Public Preview. It is available to all + # customers, but may not be feature-complete or have full support guarantees. + LIFECYCLE_STATE_PUBLIC_PREVIEW = 1 + + # The entity is in Private General Availability. It is fully + # supported and stable, but only available to a select group of customers. + LIFECYCLE_STATE_PRIVATE_GA = 2 + + # The entity is Generally Available. It is fully supported, stable, and + # available to all customers. + LIFECYCLE_STATE_GA = 3 + + # The entity is deprecated. It is no longer recommended for use + # and may be removed in a future version. + LIFECYCLE_STATE_DEPRECATED = 4 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-product_registry-v1/proto_docs/google/cloud/productregistry/v1/logical_product.rb b/owl-bot-staging/google-cloud-product_registry-v1/proto_docs/google/cloud/productregistry/v1/logical_product.rb new file mode 100644 index 000000000000..9deae4028d05 --- /dev/null +++ b/owl-bot-staging/google-cloud-product_registry-v1/proto_docs/google/cloud/productregistry/v1/logical_product.rb @@ -0,0 +1,64 @@ +# 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 ProductRegistry + module V1 + # Represents an independent service offering that can be + # provisioned by a customer. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the LogicalProduct. + # Format: logicalProducts/\\{logical_product}. + # @!attribute [rw] title + # @return [::String] + # Display name of the LogicalProduct. + # @!attribute [rw] product_suite + # @return [::String] + # Product suite associated with the logical product. + # Format: productSuites/\\{product_suite}. + # @!attribute [r] variants + # @return [::Array<::String>] + # Output only. Child variant resource references. + # Format: logicalProducts/\\{logical_product}/variants/\\{variant} + # @!attribute [r] lifecycle_state + # @return [::Google::Cloud::ProductRegistry::V1::LifecycleState] + # Output only. Current Lifecycle state of the logical product. + # @!attribute [r] replaced + # @return [::Boolean] + # Output only. Indicates whether the logical product has been replaced. If + # `false`, the product is active. If `true`, the product has been replaced by + # another type, and the `replacement` field contains the resource name of + # that replacement. + # @!attribute [r] replacement + # @return [::String] + # Output only. The resource name of the Logical Entity that the logical + # product is replaced by. This field is only populated when this logical + # product is replaced by some other type. Eg: + # logicalProducts/\\{logical_product}/variants/\\{variant}, + # productSuites/\\{product_suite}, etc. + class LogicalProduct + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-product_registry-v1/proto_docs/google/cloud/productregistry/v1/logical_product_variant.rb b/owl-bot-staging/google-cloud-product_registry-v1/proto_docs/google/cloud/productregistry/v1/logical_product_variant.rb new file mode 100644 index 000000000000..11bd5c42f169 --- /dev/null +++ b/owl-bot-staging/google-cloud-product_registry-v1/proto_docs/google/cloud/productregistry/v1/logical_product_variant.rb @@ -0,0 +1,57 @@ +# 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 ProductRegistry + module V1 + # Represents a distinct offering derived from a primary product that retains + # core functionalities but offers specialized features for a specific market + # segment. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the LogicalProductVariant. + # Format: + # logicalProducts/\\{logical_product}/variants/\\{variant} + # @!attribute [rw] title + # @return [::String] + # Display name of the LogicalProductVariant. + # @!attribute [r] lifecycle_state + # @return [::Google::Cloud::ProductRegistry::V1::LifecycleState] + # Output only. Current Lifecycle state of the logical product variant. + # @!attribute [r] replaced + # @return [::Boolean] + # Output only. Indicates whether the logical product variant has been + # replaced. If `false`, the variant is active. If `true`, the variant has + # been replaced by another type, and the `replacement` field contains the + # resource name of that replacement. + # @!attribute [r] replacement + # @return [::String] + # Output only. The resource name of the Logical Entity that the logical + # product variant is replaced by. This field is only populated when this + # logical product variant is replaced by some other type. Eg: + # logicalProducts/\\{logical_product}, productSuites/\\{product_suite}, etc. + class LogicalProductVariant + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-product_registry-v1/proto_docs/google/cloud/productregistry/v1/product_suite.rb b/owl-bot-staging/google-cloud-product_registry-v1/proto_docs/google/cloud/productregistry/v1/product_suite.rb new file mode 100644 index 000000000000..6803430cec21 --- /dev/null +++ b/owl-bot-staging/google-cloud-product_registry-v1/proto_docs/google/cloud/productregistry/v1/product_suite.rb @@ -0,0 +1,56 @@ +# 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 ProductRegistry + module V1 + # Represents a unified grouping of products sharing a common brand and market + # positioning. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the ProductSuite. + # Format: productSuites/\\{product_suite} + # @!attribute [rw] title + # @return [::String] + # Title of the ProductSuite. + # @!attribute [r] logical_products + # @return [::Array<::String>] + # Output only. LogicalProducts under this suite. + # Format: logicalProducts/\\{logical_product} + # @!attribute [r] replaced + # @return [::Boolean] + # Output only. Indicates whether the product suite has been replaced. If + # `false`, the product suite is active. If `true`, the product suite has been + # replaced by another type, and the `replacement` field contains the resource + # name of that replacement. + # @!attribute [r] replacement + # @return [::String] + # Output only. The resource name of the Logical Entity that the product suite + # is replaced by. This field is only populated when this product suite is + # replaced by some other type. Eg: logicalProducts/\\{logical_product}, + # logicalProducts/\\{logical_product}/variants/\\{variant}, etc. + class ProductSuite + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-product_registry-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-product_registry-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-product_registry-v1/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-product_registry-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-product_registry-v1/snippets/Gemfile new file mode 100644 index 000000000000..baabd4704165 --- /dev/null +++ b/owl-bot-staging/google-cloud-product_registry-v1/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-product_registry-v1", path: "../" +else + gem "google-cloud-product_registry-v1" +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-product_registry-v1/snippets/cloud_product_registry_read_service/get_logical_product.rb b/owl-bot-staging/google-cloud-product_registry-v1/snippets/cloud_product_registry_read_service/get_logical_product.rb new file mode 100644 index 000000000000..2bba9db7318d --- /dev/null +++ b/owl-bot-staging/google-cloud-product_registry-v1/snippets/cloud_product_registry_read_service/get_logical_product.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 cloudproductregistry_v1_generated_CloudProductRegistryReadService_GetLogicalProduct_sync] +require "google/cloud/product_registry/v1" + +## +# Snippet for the get_logical_product call in the CloudProductRegistryReadService 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::ProductRegistry::V1::CloudProductRegistryReadService::Client#get_logical_product. +# +def get_logical_product + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ProductRegistry::V1::GetLogicalProductRequest.new + + # Call the get_logical_product method. + result = client.get_logical_product request + + # The returned object is of type Google::Cloud::ProductRegistry::V1::LogicalProduct. + p result +end +# [END cloudproductregistry_v1_generated_CloudProductRegistryReadService_GetLogicalProduct_sync] diff --git a/owl-bot-staging/google-cloud-product_registry-v1/snippets/cloud_product_registry_read_service/get_logical_product_variant.rb b/owl-bot-staging/google-cloud-product_registry-v1/snippets/cloud_product_registry_read_service/get_logical_product_variant.rb new file mode 100644 index 000000000000..1b873cc010fe --- /dev/null +++ b/owl-bot-staging/google-cloud-product_registry-v1/snippets/cloud_product_registry_read_service/get_logical_product_variant.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 cloudproductregistry_v1_generated_CloudProductRegistryReadService_GetLogicalProductVariant_sync] +require "google/cloud/product_registry/v1" + +## +# Snippet for the get_logical_product_variant call in the CloudProductRegistryReadService 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::ProductRegistry::V1::CloudProductRegistryReadService::Client#get_logical_product_variant. +# +def get_logical_product_variant + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ProductRegistry::V1::GetLogicalProductVariantRequest.new + + # Call the get_logical_product_variant method. + result = client.get_logical_product_variant request + + # The returned object is of type Google::Cloud::ProductRegistry::V1::LogicalProductVariant. + p result +end +# [END cloudproductregistry_v1_generated_CloudProductRegistryReadService_GetLogicalProductVariant_sync] diff --git a/owl-bot-staging/google-cloud-product_registry-v1/snippets/cloud_product_registry_read_service/get_product_suite.rb b/owl-bot-staging/google-cloud-product_registry-v1/snippets/cloud_product_registry_read_service/get_product_suite.rb new file mode 100644 index 000000000000..b91b896b3ccf --- /dev/null +++ b/owl-bot-staging/google-cloud-product_registry-v1/snippets/cloud_product_registry_read_service/get_product_suite.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 cloudproductregistry_v1_generated_CloudProductRegistryReadService_GetProductSuite_sync] +require "google/cloud/product_registry/v1" + +## +# Snippet for the get_product_suite call in the CloudProductRegistryReadService 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::ProductRegistry::V1::CloudProductRegistryReadService::Client#get_product_suite. +# +def get_product_suite + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ProductRegistry::V1::GetProductSuiteRequest.new + + # Call the get_product_suite method. + result = client.get_product_suite request + + # The returned object is of type Google::Cloud::ProductRegistry::V1::ProductSuite. + p result +end +# [END cloudproductregistry_v1_generated_CloudProductRegistryReadService_GetProductSuite_sync] diff --git a/owl-bot-staging/google-cloud-product_registry-v1/snippets/cloud_product_registry_read_service/list_logical_product_variants.rb b/owl-bot-staging/google-cloud-product_registry-v1/snippets/cloud_product_registry_read_service/list_logical_product_variants.rb new file mode 100644 index 000000000000..88e42fb16025 --- /dev/null +++ b/owl-bot-staging/google-cloud-product_registry-v1/snippets/cloud_product_registry_read_service/list_logical_product_variants.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 cloudproductregistry_v1_generated_CloudProductRegistryReadService_ListLogicalProductVariants_sync] +require "google/cloud/product_registry/v1" + +## +# Snippet for the list_logical_product_variants call in the CloudProductRegistryReadService 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::ProductRegistry::V1::CloudProductRegistryReadService::Client#list_logical_product_variants. +# +def list_logical_product_variants + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ProductRegistry::V1::ListLogicalProductVariantsRequest.new + + # Call the list_logical_product_variants method. + result = client.list_logical_product_variants 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::ProductRegistry::V1::LogicalProductVariant. + p item + end +end +# [END cloudproductregistry_v1_generated_CloudProductRegistryReadService_ListLogicalProductVariants_sync] diff --git a/owl-bot-staging/google-cloud-product_registry-v1/snippets/cloud_product_registry_read_service/list_logical_products.rb b/owl-bot-staging/google-cloud-product_registry-v1/snippets/cloud_product_registry_read_service/list_logical_products.rb new file mode 100644 index 000000000000..5d8927e70ce8 --- /dev/null +++ b/owl-bot-staging/google-cloud-product_registry-v1/snippets/cloud_product_registry_read_service/list_logical_products.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 cloudproductregistry_v1_generated_CloudProductRegistryReadService_ListLogicalProducts_sync] +require "google/cloud/product_registry/v1" + +## +# Snippet for the list_logical_products call in the CloudProductRegistryReadService 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::ProductRegistry::V1::CloudProductRegistryReadService::Client#list_logical_products. +# +def list_logical_products + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ProductRegistry::V1::ListLogicalProductsRequest.new + + # Call the list_logical_products method. + result = client.list_logical_products 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::ProductRegistry::V1::LogicalProduct. + p item + end +end +# [END cloudproductregistry_v1_generated_CloudProductRegistryReadService_ListLogicalProducts_sync] diff --git a/owl-bot-staging/google-cloud-product_registry-v1/snippets/cloud_product_registry_read_service/list_product_suites.rb b/owl-bot-staging/google-cloud-product_registry-v1/snippets/cloud_product_registry_read_service/list_product_suites.rb new file mode 100644 index 000000000000..eeeb222e0cd9 --- /dev/null +++ b/owl-bot-staging/google-cloud-product_registry-v1/snippets/cloud_product_registry_read_service/list_product_suites.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 cloudproductregistry_v1_generated_CloudProductRegistryReadService_ListProductSuites_sync] +require "google/cloud/product_registry/v1" + +## +# Snippet for the list_product_suites call in the CloudProductRegistryReadService 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::ProductRegistry::V1::CloudProductRegistryReadService::Client#list_product_suites. +# +def list_product_suites + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ProductRegistry::V1::ListProductSuitesRequest.new + + # Call the list_product_suites method. + result = client.list_product_suites 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::ProductRegistry::V1::ProductSuite. + p item + end +end +# [END cloudproductregistry_v1_generated_CloudProductRegistryReadService_ListProductSuites_sync] diff --git a/owl-bot-staging/google-cloud-product_registry-v1/snippets/cloud_product_registry_read_service/lookup_entity.rb b/owl-bot-staging/google-cloud-product_registry-v1/snippets/cloud_product_registry_read_service/lookup_entity.rb new file mode 100644 index 000000000000..bd90b7a12bc2 --- /dev/null +++ b/owl-bot-staging/google-cloud-product_registry-v1/snippets/cloud_product_registry_read_service/lookup_entity.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 cloudproductregistry_v1_generated_CloudProductRegistryReadService_LookupEntity_sync] +require "google/cloud/product_registry/v1" + +## +# Snippet for the lookup_entity call in the CloudProductRegistryReadService 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::ProductRegistry::V1::CloudProductRegistryReadService::Client#lookup_entity. +# +def lookup_entity + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::ProductRegistry::V1::LookupEntityRequest.new + + # Call the lookup_entity method. + result = client.lookup_entity request + + # The returned object is of type Google::Cloud::ProductRegistry::V1::LookupEntityResponse. + p result +end +# [END cloudproductregistry_v1_generated_CloudProductRegistryReadService_LookupEntity_sync] diff --git a/owl-bot-staging/google-cloud-product_registry-v1/snippets/snippet_metadata_google.cloud.productregistry.v1.json b/owl-bot-staging/google-cloud-product_registry-v1/snippets/snippet_metadata_google.cloud.productregistry.v1.json new file mode 100644 index 000000000000..9981334338aa --- /dev/null +++ b/owl-bot-staging/google-cloud-product_registry-v1/snippets/snippet_metadata_google.cloud.productregistry.v1.json @@ -0,0 +1,295 @@ +{ + "client_library": { + "name": "google-cloud-product_registry-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.productregistry.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "cloudproductregistry_v1_generated_CloudProductRegistryReadService_GetProductSuite_sync", + "title": "Snippet for the get_product_suite call in the CloudProductRegistryReadService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client#get_product_suite.", + "file": "cloud_product_registry_read_service/get_product_suite.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_product_suite", + "full_name": "::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client#get_product_suite", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ProductRegistry::V1::GetProductSuiteRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ProductRegistry::V1::ProductSuite", + "client": { + "short_name": "CloudProductRegistryReadService::Client", + "full_name": "::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client" + }, + "method": { + "short_name": "GetProductSuite", + "full_name": "google.cloud.productregistry.v1.CloudProductRegistryReadService.GetProductSuite", + "service": { + "short_name": "CloudProductRegistryReadService", + "full_name": "google.cloud.productregistry.v1.CloudProductRegistryReadService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudproductregistry_v1_generated_CloudProductRegistryReadService_ListProductSuites_sync", + "title": "Snippet for the list_product_suites call in the CloudProductRegistryReadService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client#list_product_suites.", + "file": "cloud_product_registry_read_service/list_product_suites.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_product_suites", + "full_name": "::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client#list_product_suites", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ProductRegistry::V1::ListProductSuitesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ProductRegistry::V1::ListProductSuitesResponse", + "client": { + "short_name": "CloudProductRegistryReadService::Client", + "full_name": "::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client" + }, + "method": { + "short_name": "ListProductSuites", + "full_name": "google.cloud.productregistry.v1.CloudProductRegistryReadService.ListProductSuites", + "service": { + "short_name": "CloudProductRegistryReadService", + "full_name": "google.cloud.productregistry.v1.CloudProductRegistryReadService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudproductregistry_v1_generated_CloudProductRegistryReadService_GetLogicalProduct_sync", + "title": "Snippet for the get_logical_product call in the CloudProductRegistryReadService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client#get_logical_product.", + "file": "cloud_product_registry_read_service/get_logical_product.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_logical_product", + "full_name": "::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client#get_logical_product", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ProductRegistry::V1::GetLogicalProductRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ProductRegistry::V1::LogicalProduct", + "client": { + "short_name": "CloudProductRegistryReadService::Client", + "full_name": "::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client" + }, + "method": { + "short_name": "GetLogicalProduct", + "full_name": "google.cloud.productregistry.v1.CloudProductRegistryReadService.GetLogicalProduct", + "service": { + "short_name": "CloudProductRegistryReadService", + "full_name": "google.cloud.productregistry.v1.CloudProductRegistryReadService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudproductregistry_v1_generated_CloudProductRegistryReadService_ListLogicalProducts_sync", + "title": "Snippet for the list_logical_products call in the CloudProductRegistryReadService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client#list_logical_products.", + "file": "cloud_product_registry_read_service/list_logical_products.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_logical_products", + "full_name": "::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client#list_logical_products", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ProductRegistry::V1::ListLogicalProductsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ProductRegistry::V1::ListLogicalProductsResponse", + "client": { + "short_name": "CloudProductRegistryReadService::Client", + "full_name": "::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client" + }, + "method": { + "short_name": "ListLogicalProducts", + "full_name": "google.cloud.productregistry.v1.CloudProductRegistryReadService.ListLogicalProducts", + "service": { + "short_name": "CloudProductRegistryReadService", + "full_name": "google.cloud.productregistry.v1.CloudProductRegistryReadService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudproductregistry_v1_generated_CloudProductRegistryReadService_GetLogicalProductVariant_sync", + "title": "Snippet for the get_logical_product_variant call in the CloudProductRegistryReadService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client#get_logical_product_variant.", + "file": "cloud_product_registry_read_service/get_logical_product_variant.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_logical_product_variant", + "full_name": "::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client#get_logical_product_variant", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ProductRegistry::V1::GetLogicalProductVariantRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ProductRegistry::V1::LogicalProductVariant", + "client": { + "short_name": "CloudProductRegistryReadService::Client", + "full_name": "::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client" + }, + "method": { + "short_name": "GetLogicalProductVariant", + "full_name": "google.cloud.productregistry.v1.CloudProductRegistryReadService.GetLogicalProductVariant", + "service": { + "short_name": "CloudProductRegistryReadService", + "full_name": "google.cloud.productregistry.v1.CloudProductRegistryReadService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudproductregistry_v1_generated_CloudProductRegistryReadService_ListLogicalProductVariants_sync", + "title": "Snippet for the list_logical_product_variants call in the CloudProductRegistryReadService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client#list_logical_product_variants.", + "file": "cloud_product_registry_read_service/list_logical_product_variants.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_logical_product_variants", + "full_name": "::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client#list_logical_product_variants", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ProductRegistry::V1::ListLogicalProductVariantsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ProductRegistry::V1::ListLogicalProductVariantsResponse", + "client": { + "short_name": "CloudProductRegistryReadService::Client", + "full_name": "::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client" + }, + "method": { + "short_name": "ListLogicalProductVariants", + "full_name": "google.cloud.productregistry.v1.CloudProductRegistryReadService.ListLogicalProductVariants", + "service": { + "short_name": "CloudProductRegistryReadService", + "full_name": "google.cloud.productregistry.v1.CloudProductRegistryReadService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudproductregistry_v1_generated_CloudProductRegistryReadService_LookupEntity_sync", + "title": "Snippet for the lookup_entity call in the CloudProductRegistryReadService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client#lookup_entity.", + "file": "cloud_product_registry_read_service/lookup_entity.rb", + "language": "RUBY", + "client_method": { + "short_name": "lookup_entity", + "full_name": "::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client#lookup_entity", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::ProductRegistry::V1::LookupEntityRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::ProductRegistry::V1::LookupEntityResponse", + "client": { + "short_name": "CloudProductRegistryReadService::Client", + "full_name": "::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client" + }, + "method": { + "short_name": "LookupEntity", + "full_name": "google.cloud.productregistry.v1.CloudProductRegistryReadService.LookupEntity", + "service": { + "short_name": "CloudProductRegistryReadService", + "full_name": "google.cloud.productregistry.v1.CloudProductRegistryReadService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-product_registry-v1/test/google/cloud/product_registry/v1/cloud_product_registry_read_service_paths_test.rb b/owl-bot-staging/google-cloud-product_registry-v1/test/google/cloud/product_registry/v1/cloud_product_registry_read_service_paths_test.rb new file mode 100644 index 000000000000..8ff414ea1ebb --- /dev/null +++ b/owl-bot-staging/google-cloud-product_registry-v1/test/google/cloud/product_registry/v1/cloud_product_registry_read_service_paths_test.rb @@ -0,0 +1,79 @@ +# 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/product_registry/v1/cloud_product_registry_read_service" + +class ::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::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_logical_product_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.logical_product_path logical_product: "value0" + assert_equal "logicalProducts/value0", path + end + end + + def test_logical_product_variant_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.logical_product_variant_path logical_product: "value0", variant: "value1" + assert_equal "logicalProducts/value0/variants/value1", path + end + end + + def test_product_suite_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.product_suite_path product_suite: "value0" + assert_equal "productSuites/value0", path + end + end +end diff --git a/owl-bot-staging/google-cloud-product_registry-v1/test/google/cloud/product_registry/v1/cloud_product_registry_read_service_rest_test.rb b/owl-bot-staging/google-cloud-product_registry-v1/test/google/cloud/product_registry/v1/cloud_product_registry_read_service_rest_test.rb new file mode 100644 index 000000000000..66783fb7cf35 --- /dev/null +++ b/owl-bot-staging/google-cloud-product_registry-v1/test/google/cloud/product_registry/v1/cloud_product_registry_read_service_rest_test.rb @@ -0,0 +1,482 @@ +# 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/productregistry/v1/cloud_product_registry_read_service_pb" +require "google/cloud/product_registry/v1/cloud_product_registry_read_service/rest" + + +class ::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::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_get_product_suite + # Create test objects. + client_result = ::Google::Cloud::ProductRegistry::V1::ProductSuite.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_product_suite_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::ProductRegistry::V1::CloudProductRegistryReadService::Rest::ServiceStub.stub :transcode_get_product_suite_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_product_suite_client_stub do + # Create client + c = ::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_product_suite({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_product_suite name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_product_suite ::Google::Cloud::ProductRegistry::V1::GetProductSuiteRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_product_suite({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_product_suite(::Google::Cloud::ProductRegistry::V1::GetProductSuiteRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_product_suite_client_stub.call_count + end + end + end + + def test_list_product_suites + # Create test objects. + client_result = ::Google::Cloud::ProductRegistry::V1::ListProductSuitesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + page_size = 42 + page_token = "hello world" + + list_product_suites_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::ProductRegistry::V1::CloudProductRegistryReadService::Rest::ServiceStub.stub :transcode_list_product_suites_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_product_suites_client_stub do + # Create client + c = ::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_product_suites({ page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_product_suites page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_product_suites ::Google::Cloud::ProductRegistry::V1::ListProductSuitesRequest.new(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_product_suites({ 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_product_suites(::Google::Cloud::ProductRegistry::V1::ListProductSuitesRequest.new(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_product_suites_client_stub.call_count + end + end + end + + def test_get_logical_product + # Create test objects. + client_result = ::Google::Cloud::ProductRegistry::V1::LogicalProduct.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_logical_product_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::ProductRegistry::V1::CloudProductRegistryReadService::Rest::ServiceStub.stub :transcode_get_logical_product_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_logical_product_client_stub do + # Create client + c = ::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_logical_product({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_logical_product name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_logical_product ::Google::Cloud::ProductRegistry::V1::GetLogicalProductRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_logical_product({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_logical_product(::Google::Cloud::ProductRegistry::V1::GetLogicalProductRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_logical_product_client_stub.call_count + end + end + end + + def test_list_logical_products + # Create test objects. + client_result = ::Google::Cloud::ProductRegistry::V1::ListLogicalProductsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + filter = "hello world" + page_size = 42 + page_token = "hello world" + + list_logical_products_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::ProductRegistry::V1::CloudProductRegistryReadService::Rest::ServiceStub.stub :transcode_list_logical_products_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_logical_products_client_stub do + # Create client + c = ::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_logical_products({ filter: filter, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.list_logical_products filter: filter, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.list_logical_products ::Google::Cloud::ProductRegistry::V1::ListLogicalProductsRequest.new(filter: filter, 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_logical_products({ filter: filter, 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_logical_products(::Google::Cloud::ProductRegistry::V1::ListLogicalProductsRequest.new(filter: filter, 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_logical_products_client_stub.call_count + end + end + end + + def test_get_logical_product_variant + # Create test objects. + client_result = ::Google::Cloud::ProductRegistry::V1::LogicalProductVariant.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_logical_product_variant_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::ProductRegistry::V1::CloudProductRegistryReadService::Rest::ServiceStub.stub :transcode_get_logical_product_variant_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_logical_product_variant_client_stub do + # Create client + c = ::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_logical_product_variant({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_logical_product_variant name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_logical_product_variant ::Google::Cloud::ProductRegistry::V1::GetLogicalProductVariantRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_logical_product_variant({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_logical_product_variant(::Google::Cloud::ProductRegistry::V1::GetLogicalProductVariantRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_logical_product_variant_client_stub.call_count + end + end + end + + def test_list_logical_product_variants + # Create test objects. + client_result = ::Google::Cloud::ProductRegistry::V1::ListLogicalProductVariantsResponse.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_logical_product_variants_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::ProductRegistry::V1::CloudProductRegistryReadService::Rest::ServiceStub.stub :transcode_list_logical_product_variants_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_logical_product_variants_client_stub do + # Create client + c = ::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_logical_product_variants({ 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_logical_product_variants 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_logical_product_variants ::Google::Cloud::ProductRegistry::V1::ListLogicalProductVariantsRequest.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_logical_product_variants({ 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_logical_product_variants(::Google::Cloud::ProductRegistry::V1::ListLogicalProductVariantsRequest.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_logical_product_variants_client_stub.call_count + end + end + end + + def test_lookup_entity + # Create test objects. + client_result = ::Google::Cloud::ProductRegistry::V1::LookupEntityResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + lookup_uri = "hello world" + + lookup_entity_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::ProductRegistry::V1::CloudProductRegistryReadService::Rest::ServiceStub.stub :transcode_lookup_entity_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, lookup_entity_client_stub do + # Create client + c = ::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.lookup_entity({ lookup_uri: lookup_uri }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.lookup_entity lookup_uri: lookup_uri do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.lookup_entity ::Google::Cloud::ProductRegistry::V1::LookupEntityRequest.new(lookup_uri: lookup_uri) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.lookup_entity({ lookup_uri: lookup_uri }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.lookup_entity(::Google::Cloud::ProductRegistry::V1::LookupEntityRequest.new(lookup_uri: lookup_uri), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, lookup_entity_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::ProductRegistry::V1::CloudProductRegistryReadService::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::ProductRegistry::V1::CloudProductRegistryReadService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-product_registry-v1/test/google/cloud/product_registry/v1/cloud_product_registry_read_service_test.rb b/owl-bot-staging/google-cloud-product_registry-v1/test/google/cloud/product_registry/v1/cloud_product_registry_read_service_test.rb new file mode 100644 index 000000000000..c8e9d279cfcb --- /dev/null +++ b/owl-bot-staging/google-cloud-product_registry-v1/test/google/cloud/product_registry/v1/cloud_product_registry_read_service_test.rb @@ -0,0 +1,535 @@ +# 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/productregistry/v1/cloud_product_registry_read_service_pb" +require "google/cloud/product_registry/v1/cloud_product_registry_read_service" + +class ::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::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_get_product_suite + # Create GRPC objects. + grpc_response = ::Google::Cloud::ProductRegistry::V1::ProductSuite.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_product_suite_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_product_suite, name + assert_kind_of ::Google::Cloud::ProductRegistry::V1::GetProductSuiteRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_product_suite_client_stub do + # Create client + c = ::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_product_suite({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_product_suite name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_product_suite ::Google::Cloud::ProductRegistry::V1::GetProductSuiteRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_product_suite({ 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_product_suite(::Google::Cloud::ProductRegistry::V1::GetProductSuiteRequest.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_product_suite_client_stub.call_rpc_count + end + end + + def test_list_product_suites + # Create GRPC objects. + grpc_response = ::Google::Cloud::ProductRegistry::V1::ListProductSuitesResponse.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. + page_size = 42 + page_token = "hello world" + + list_product_suites_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_product_suites, name + assert_kind_of ::Google::Cloud::ProductRegistry::V1::ListProductSuitesRequest, request + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_product_suites_client_stub do + # Create client + c = ::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_product_suites({ 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_product_suites 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_product_suites ::Google::Cloud::ProductRegistry::V1::ListProductSuitesRequest.new(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_product_suites({ 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_product_suites(::Google::Cloud::ProductRegistry::V1::ListProductSuitesRequest.new(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_product_suites_client_stub.call_rpc_count + end + end + + def test_get_logical_product + # Create GRPC objects. + grpc_response = ::Google::Cloud::ProductRegistry::V1::LogicalProduct.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_logical_product_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_logical_product, name + assert_kind_of ::Google::Cloud::ProductRegistry::V1::GetLogicalProductRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_logical_product_client_stub do + # Create client + c = ::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_logical_product({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_logical_product name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_logical_product ::Google::Cloud::ProductRegistry::V1::GetLogicalProductRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_logical_product({ 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_logical_product(::Google::Cloud::ProductRegistry::V1::GetLogicalProductRequest.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_logical_product_client_stub.call_rpc_count + end + end + + def test_list_logical_products + # Create GRPC objects. + grpc_response = ::Google::Cloud::ProductRegistry::V1::ListLogicalProductsResponse.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. + filter = "hello world" + page_size = 42 + page_token = "hello world" + + list_logical_products_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_logical_products, name + assert_kind_of ::Google::Cloud::ProductRegistry::V1::ListLogicalProductsRequest, request + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_logical_products_client_stub do + # Create client + c = ::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_logical_products({ filter: filter, 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_logical_products filter: filter, 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_logical_products ::Google::Cloud::ProductRegistry::V1::ListLogicalProductsRequest.new(filter: filter, 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_logical_products({ filter: filter, 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_logical_products(::Google::Cloud::ProductRegistry::V1::ListLogicalProductsRequest.new(filter: filter, 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_logical_products_client_stub.call_rpc_count + end + end + + def test_get_logical_product_variant + # Create GRPC objects. + grpc_response = ::Google::Cloud::ProductRegistry::V1::LogicalProductVariant.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_logical_product_variant_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_logical_product_variant, name + assert_kind_of ::Google::Cloud::ProductRegistry::V1::GetLogicalProductVariantRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_logical_product_variant_client_stub do + # Create client + c = ::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_logical_product_variant({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_logical_product_variant name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_logical_product_variant ::Google::Cloud::ProductRegistry::V1::GetLogicalProductVariantRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_logical_product_variant({ 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_logical_product_variant(::Google::Cloud::ProductRegistry::V1::GetLogicalProductVariantRequest.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_logical_product_variant_client_stub.call_rpc_count + end + end + + def test_list_logical_product_variants + # Create GRPC objects. + grpc_response = ::Google::Cloud::ProductRegistry::V1::ListLogicalProductVariantsResponse.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_logical_product_variants_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_logical_product_variants, name + assert_kind_of ::Google::Cloud::ProductRegistry::V1::ListLogicalProductVariantsRequest, 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_logical_product_variants_client_stub do + # Create client + c = ::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_logical_product_variants({ 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_logical_product_variants 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_logical_product_variants ::Google::Cloud::ProductRegistry::V1::ListLogicalProductVariantsRequest.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_logical_product_variants({ 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_logical_product_variants(::Google::Cloud::ProductRegistry::V1::ListLogicalProductVariantsRequest.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_logical_product_variants_client_stub.call_rpc_count + end + end + + def test_lookup_entity + # Create GRPC objects. + grpc_response = ::Google::Cloud::ProductRegistry::V1::LookupEntityResponse.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. + lookup_uri = "hello world" + + lookup_entity_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :lookup_entity, name + assert_kind_of ::Google::Cloud::ProductRegistry::V1::LookupEntityRequest, request + assert_equal "hello world", request["lookup_uri"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, lookup_entity_client_stub do + # Create client + c = ::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.lookup_entity({ lookup_uri: lookup_uri }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.lookup_entity lookup_uri: lookup_uri do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.lookup_entity ::Google::Cloud::ProductRegistry::V1::LookupEntityRequest.new(lookup_uri: lookup_uri) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.lookup_entity({ lookup_uri: lookup_uri }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.lookup_entity(::Google::Cloud::ProductRegistry::V1::LookupEntityRequest.new(lookup_uri: lookup_uri), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, lookup_entity_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::ProductRegistry::V1::CloudProductRegistryReadService::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::ProductRegistry::V1::CloudProductRegistryReadService::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::ProductRegistry::V1::CloudProductRegistryReadService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-product_registry-v1/test/helper.rb b/owl-bot-staging/google-cloud-product_registry-v1/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-product_registry-v1/test/helper.rb @@ -0,0 +1,26 @@ +# 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 "minitest/autorun" +require "minitest/focus" +require "minitest/mock" +require "minitest/rg" + +require "grpc" + +require "ostruct" From ad5432dc36d89318459a359d803370ca996b7e0f Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Tue, 7 Jul 2026 22:57:50 +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 --- .../.gitignore | 22 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 33 - .../google-cloud-product_registry-v1/.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 -- .../CHANGELOG.md | 2 - .../google-cloud-product_registry-v1/Gemfile | 14 - .../LICENSE.md | 201 --- .../README.md | 153 --- .../google-cloud-product_registry-v1/Rakefile | 169 --- .../gapic_metadata.json | 53 - .../google-cloud-product_registry-v1.gemspec | 28 - .../lib/google-cloud-product_registry-v1.rb | 21 - .../lib/google/cloud/product_registry/v1.rb | 45 - .../v1/cloud_product_registry_read_service.rb | 56 - .../client.rb | 1108 ----------------- .../credentials.rb | 44 - .../paths.rb | 78 -- .../rest.rb | 53 - .../rest/client.rb | 1032 --------------- .../rest/service_stub.rb | 518 -------- .../google/cloud/product_registry/v1/rest.rb | 37 - .../cloud/product_registry/v1/version.rb | 28 - .../cloud_product_registry_read_service_pb.rb | 39 - ...oduct_registry_read_service_services_pb.rb | 58 - .../productregistry/v1/lifecycle_state_pb.rb | 21 - .../productregistry/v1/logical_product_pb.rb | 25 - .../v1/logical_product_variant_pb.rb | 25 - .../productregistry/v1/product_suite_pb.rb | 24 - .../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 ---- .../v1/cloud_product_registry_read_service.rb | 196 --- .../productregistry/v1/lifecycle_state.rb | 48 - .../productregistry/v1/logical_product.rb | 64 - .../v1/logical_product_variant.rb | 57 - .../cloud/productregistry/v1/product_suite.rb | 56 - .../proto_docs/google/protobuf/duration.rb | 98 -- .../snippets/Gemfile | 32 - .../get_logical_product.rb | 47 - .../get_logical_product_variant.rb | 47 - .../get_product_suite.rb | 47 - .../list_logical_product_variants.rb | 51 - .../list_logical_products.rb | 51 - .../list_product_suites.rb | 51 - .../lookup_entity.rb | 47 - ...adata_google.cloud.productregistry.v1.json | 295 ----- ...roduct_registry_read_service_paths_test.rb | 79 -- ...product_registry_read_service_rest_test.rb | 482 ------- ...loud_product_registry_read_service_test.rb | 535 -------- .../test/helper.rb | 26 - 54 files changed, 7355 deletions(-) delete mode 100644 owl-bot-staging/google-cloud-product_registry-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-product_registry-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-product_registry-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-product_registry-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-product_registry-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-product_registry-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-product_registry-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-product_registry-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-product_registry-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-product_registry-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-product_registry-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-product_registry-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-product_registry-v1/google-cloud-product_registry-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-product_registry-v1/lib/google-cloud-product_registry-v1.rb delete mode 100644 owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/product_registry/v1.rb delete mode 100644 owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/product_registry/v1/cloud_product_registry_read_service.rb delete mode 100644 owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/product_registry/v1/cloud_product_registry_read_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/product_registry/v1/cloud_product_registry_read_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/product_registry/v1/cloud_product_registry_read_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/product_registry/v1/cloud_product_registry_read_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/product_registry/v1/cloud_product_registry_read_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/product_registry/v1/cloud_product_registry_read_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/product_registry/v1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/product_registry/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/productregistry/v1/cloud_product_registry_read_service_pb.rb delete mode 100644 owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/productregistry/v1/cloud_product_registry_read_service_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/productregistry/v1/lifecycle_state_pb.rb delete mode 100644 owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/productregistry/v1/logical_product_pb.rb delete mode 100644 owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/productregistry/v1/logical_product_variant_pb.rb delete mode 100644 owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/productregistry/v1/product_suite_pb.rb delete mode 100644 owl-bot-staging/google-cloud-product_registry-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-product_registry-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-product_registry-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-product_registry-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-product_registry-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-product_registry-v1/proto_docs/google/cloud/productregistry/v1/cloud_product_registry_read_service.rb delete mode 100644 owl-bot-staging/google-cloud-product_registry-v1/proto_docs/google/cloud/productregistry/v1/lifecycle_state.rb delete mode 100644 owl-bot-staging/google-cloud-product_registry-v1/proto_docs/google/cloud/productregistry/v1/logical_product.rb delete mode 100644 owl-bot-staging/google-cloud-product_registry-v1/proto_docs/google/cloud/productregistry/v1/logical_product_variant.rb delete mode 100644 owl-bot-staging/google-cloud-product_registry-v1/proto_docs/google/cloud/productregistry/v1/product_suite.rb delete mode 100644 owl-bot-staging/google-cloud-product_registry-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-product_registry-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-product_registry-v1/snippets/cloud_product_registry_read_service/get_logical_product.rb delete mode 100644 owl-bot-staging/google-cloud-product_registry-v1/snippets/cloud_product_registry_read_service/get_logical_product_variant.rb delete mode 100644 owl-bot-staging/google-cloud-product_registry-v1/snippets/cloud_product_registry_read_service/get_product_suite.rb delete mode 100644 owl-bot-staging/google-cloud-product_registry-v1/snippets/cloud_product_registry_read_service/list_logical_product_variants.rb delete mode 100644 owl-bot-staging/google-cloud-product_registry-v1/snippets/cloud_product_registry_read_service/list_logical_products.rb delete mode 100644 owl-bot-staging/google-cloud-product_registry-v1/snippets/cloud_product_registry_read_service/list_product_suites.rb delete mode 100644 owl-bot-staging/google-cloud-product_registry-v1/snippets/cloud_product_registry_read_service/lookup_entity.rb delete mode 100644 owl-bot-staging/google-cloud-product_registry-v1/snippets/snippet_metadata_google.cloud.productregistry.v1.json delete mode 100644 owl-bot-staging/google-cloud-product_registry-v1/test/google/cloud/product_registry/v1/cloud_product_registry_read_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-product_registry-v1/test/google/cloud/product_registry/v1/cloud_product_registry_read_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-product_registry-v1/test/google/cloud/product_registry/v1/cloud_product_registry_read_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-product_registry-v1/test/helper.rb diff --git a/owl-bot-staging/google-cloud-product_registry-v1/.gitignore b/owl-bot-staging/google-cloud-product_registry-v1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-product_registry-v1/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -# Ignore bundler lockfiles -Gemfile.lock -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-product_registry-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-product_registry-v1/.repo-metadata.json deleted file mode 100644 index e6b5ce1c10ff..000000000000 --- a/owl-bot-staging/google-cloud-product_registry-v1/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "cloudproductregistry.googleapis.com", - "api_shortname": "cloudproductregistry", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-product_registry-v1/latest", - "distribution_name": "google-cloud-product_registry-v1", - "is_cloud": true, - "language": "ruby", - "name": "cloudproductregistry", - "name_pretty": "Cloud Product Registry V1 API", - "product_documentation": "https://docs.cloud.google.com/product-registry", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "cloudproductregistry.googleapis.com API. Note that google-cloud-product_registry-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-product_registry instead. See the readme for more details.", - "ruby-cloud-product-url": "https://docs.cloud.google.com/product-registry", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-product_registry-v1/.rubocop.yml b/owl-bot-staging/google-cloud-product_registry-v1/.rubocop.yml deleted file mode 100644 index bef0fd1fa15e..000000000000 --- a/owl-bot-staging/google-cloud-product_registry-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-product_registry-v1.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-product_registry-v1.rb" diff --git a/owl-bot-staging/google-cloud-product_registry-v1/.toys.rb b/owl-bot-staging/google-cloud-product_registry-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-product_registry-v1/.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-product_registry-v1/.yardopts b/owl-bot-staging/google-cloud-product_registry-v1/.yardopts deleted file mode 100644 index f6854fcf1abc..000000000000 --- a/owl-bot-staging/google-cloud-product_registry-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Cloud Product Registry V1 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-product_registry-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-product_registry-v1/AUTHENTICATION.md deleted file mode 100644 index d7d79fc6a6ac..000000000000 --- a/owl-bot-staging/google-cloud-product_registry-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-product_registry-v1 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-product_registry-v1 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/product_registry/v1" - -client = ::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/product_registry/v1" - -::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::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-product_registry-v1 -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/product_registry/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::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-product_registry-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-product_registry-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-product_registry-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-product_registry-v1/Gemfile b/owl-bot-staging/google-cloud-product_registry-v1/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-cloud-product_registry-v1/Gemfile +++ /dev/null @@ -1,14 +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-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-product_registry-v1/LICENSE.md b/owl-bot-staging/google-cloud-product_registry-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-product_registry-v1/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-product_registry-v1/README.md b/owl-bot-staging/google-cloud-product_registry-v1/README.md deleted file mode 100644 index 6c525a64e5e3..000000000000 --- a/owl-bot-staging/google-cloud-product_registry-v1/README.md +++ /dev/null @@ -1,153 +0,0 @@ -# Ruby Client for the Cloud Product Registry V1 API - -cloudproductregistry.googleapis.com API. - - -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 Product Registry V1 API. Most users should consider using -the main client gem, -[google-cloud-product_registry](https://rubygems.org/gems/google-cloud-product_registry). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-product_registry-v1 -``` - -## 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/cloudproductregistry.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/product_registry/v1" - -client = ::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client.new -request = ::Google::Cloud::ProductRegistry::V1::GetProductSuiteRequest.new # (request fields as keyword arguments...) -response = client.get_product_suite request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-product_registry-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://docs.cloud.google.com/product-registry) -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/product_registry/v1" -require "logger" - -client = ::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::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-product_registry`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-product_registry-v1`. -_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-product_registry`. -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-product_registry-v1`. - -### 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-product_registry-v1/Rakefile b/owl-bot-staging/google-cloud-product_registry-v1/Rakefile deleted file mode 100644 index f75c8566740c..000000000000 --- a/owl-bot-staging/google-cloud-product_registry-v1/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-product_registry-v1 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/product_registry/v1/cloud_product_registry_read_service/credentials" - ::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::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-product_registry-v1 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-product_registry-v1 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-product_registry-v1 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-product_registry-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-product_registry-v1" - header "google-cloud-product_registry-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-product_registry-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-product_registry-v1 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-product_registry-v1 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-product_registry-v1 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-product_registry-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-product_registry-v1/gapic_metadata.json deleted file mode 100644 index 36eed386208a..000000000000 --- a/owl-bot-staging/google-cloud-product_registry-v1/gapic_metadata.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.productregistry.v1", - "libraryPackage": "::Google::Cloud::ProductRegistry::V1", - "services": { - "CloudProductRegistryReadService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client", - "rpcs": { - "GetProductSuite": { - "methods": [ - "get_product_suite" - ] - }, - "ListProductSuites": { - "methods": [ - "list_product_suites" - ] - }, - "GetLogicalProduct": { - "methods": [ - "get_logical_product" - ] - }, - "ListLogicalProducts": { - "methods": [ - "list_logical_products" - ] - }, - "GetLogicalProductVariant": { - "methods": [ - "get_logical_product_variant" - ] - }, - "ListLogicalProductVariants": { - "methods": [ - "list_logical_product_variants" - ] - }, - "LookupEntity": { - "methods": [ - "lookup_entity" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-product_registry-v1/google-cloud-product_registry-v1.gemspec b/owl-bot-staging/google-cloud-product_registry-v1/google-cloud-product_registry-v1.gemspec deleted file mode 100644 index 05dfccece71b..000000000000 --- a/owl-bot-staging/google-cloud-product_registry-v1/google-cloud-product_registry-v1.gemspec +++ /dev/null @@ -1,28 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/product_registry/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-product_registry-v1" - gem.version = Google::Cloud::ProductRegistry::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "cloudproductregistry.googleapis.com API. Note that google-cloud-product_registry-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-product_registry instead. See the readme for more details." - gem.summary = "cloudproductregistry.googleapis.com API." - 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" -end diff --git a/owl-bot-staging/google-cloud-product_registry-v1/lib/google-cloud-product_registry-v1.rb b/owl-bot-staging/google-cloud-product_registry-v1/lib/google-cloud-product_registry-v1.rb deleted file mode 100644 index db0e16721382..000000000000 --- a/owl-bot-staging/google-cloud-product_registry-v1/lib/google-cloud-product_registry-v1.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/product_registry/v1" diff --git a/owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/product_registry/v1.rb b/owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/product_registry/v1.rb deleted file mode 100644 index c0e6920a5016..000000000000 --- a/owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/product_registry/v1.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/product_registry/v1/cloud_product_registry_read_service" -require "google/cloud/product_registry/v1/version" - -module Google - module Cloud - module ProductRegistry - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/product_registry/v1" - # client = ::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/product_registry/v1" - # client = ::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Rest::Client.new - # - module V1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/product_registry/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/product_registry/v1/cloud_product_registry_read_service.rb b/owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/product_registry/v1/cloud_product_registry_read_service.rb deleted file mode 100644 index aab9fa9b8a6f..000000000000 --- a/owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/product_registry/v1/cloud_product_registry_read_service.rb +++ /dev/null @@ -1,56 +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/product_registry/v1/version" - -require "google/cloud/product_registry/v1/cloud_product_registry_read_service/credentials" -require "google/cloud/product_registry/v1/cloud_product_registry_read_service/paths" -require "google/cloud/product_registry/v1/cloud_product_registry_read_service/client" -require "google/cloud/product_registry/v1/cloud_product_registry_read_service/rest" - -module Google - module Cloud - module ProductRegistry - module V1 - ## - # Cloud Product Registry Read Service provides capabilities to access all first - # and third party Google Cloud products. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/product_registry/v1/cloud_product_registry_read_service" - # client = ::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/product_registry/v1/cloud_product_registry_read_service/rest" - # client = ::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Rest::Client.new - # - module CloudProductRegistryReadService - end - end - end - end -end - -helper_path = ::File.join __dir__, "cloud_product_registry_read_service", "helpers.rb" -require "google/cloud/product_registry/v1/cloud_product_registry_read_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/product_registry/v1/cloud_product_registry_read_service/client.rb b/owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/product_registry/v1/cloud_product_registry_read_service/client.rb deleted file mode 100644 index 06940909a47c..000000000000 --- a/owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/product_registry/v1/cloud_product_registry_read_service/client.rb +++ /dev/null @@ -1,1108 +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/productregistry/v1/cloud_product_registry_read_service_pb" - -module Google - module Cloud - module ProductRegistry - module V1 - module CloudProductRegistryReadService - ## - # Client for the CloudProductRegistryReadService service. - # - # Cloud Product Registry Read Service provides capabilities to access all first - # and third party Google Cloud products. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "cloudproductregistry.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :cloud_product_registry_read_service_stub - - ## - # Configure the CloudProductRegistryReadService Client class. - # - # See {::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all CloudProductRegistryReadService clients - # ::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::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", "ProductRegistry", "V1"] - 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.get_product_suite.timeout = 60.0 - default_config.rpcs.get_product_suite.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_product_suites.timeout = 60.0 - default_config.rpcs.list_product_suites.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_logical_product.timeout = 60.0 - default_config.rpcs.get_logical_product.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_logical_products.timeout = 60.0 - default_config.rpcs.list_logical_products.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_logical_product_variant.timeout = 60.0 - default_config.rpcs.get_logical_product_variant.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_logical_product_variants.timeout = 60.0 - default_config.rpcs.list_logical_product_variants.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.lookup_entity.timeout = 60.0 - default_config.rpcs.lookup_entity.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 CloudProductRegistryReadService 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::ProductRegistry::V1::CloudProductRegistryReadService::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 - @cloud_product_registry_read_service_stub.universe_domain - end - - ## - # Create a new CloudProductRegistryReadService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the CloudProductRegistryReadService 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/productregistry/v1/cloud_product_registry_read_service_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 - - @cloud_product_registry_read_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::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 - ) - - @cloud_product_registry_read_service_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 - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @cloud_product_registry_read_service_stub.logger - end - - # Service calls - - ## - # Get details of a ProductSuite. - # - # @overload get_product_suite(request, options = nil) - # Pass arguments to `get_product_suite` via a request object, either of type - # {::Google::Cloud::ProductRegistry::V1::GetProductSuiteRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ProductRegistry::V1::GetProductSuiteRequest, ::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_product_suite(name: nil) - # Pass arguments to `get_product_suite` 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. The name of the ProductSuite to retrieve. - # Format: productSuites/\\{product_suite} - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ProductRegistry::V1::ProductSuite] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ProductRegistry::V1::ProductSuite] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/product_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ProductRegistry::V1::GetProductSuiteRequest.new - # - # # Call the get_product_suite method. - # result = client.get_product_suite request - # - # # The returned object is of type Google::Cloud::ProductRegistry::V1::ProductSuite. - # p result - # - def get_product_suite request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ProductRegistry::V1::GetProductSuiteRequest - - # 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_product_suite.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::ProductRegistry::V1::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_product_suite.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_product_suite.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_product_registry_read_service_stub.call_rpc :get_product_suite, 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 ProductSuites. - # - # @overload list_product_suites(request, options = nil) - # Pass arguments to `list_product_suites` via a request object, either of type - # {::Google::Cloud::ProductRegistry::V1::ListProductSuitesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ProductRegistry::V1::ListProductSuitesRequest, ::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_product_suites(page_size: nil, page_token: nil) - # Pass arguments to `list_product_suites` 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 page_size [::Integer] - # Optional. The maximum number of suites to return. The service may return - # fewer than this value. If unspecified, at most 100 suites will be returned. - # The maximum value is 500; values above 500 will be coerced to 500. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListProductSuites` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListProductSuites` must - # match the call that provided the page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ProductRegistry::V1::ProductSuite>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::ProductRegistry::V1::ProductSuite>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/product_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ProductRegistry::V1::ListProductSuitesRequest.new - # - # # Call the list_product_suites method. - # result = client.list_product_suites 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::ProductRegistry::V1::ProductSuite. - # p item - # end - # - def list_product_suites request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ProductRegistry::V1::ListProductSuitesRequest - - # 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_product_suites.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::ProductRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_product_suites.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_product_suites.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_product_registry_read_service_stub.call_rpc :list_product_suites, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @cloud_product_registry_read_service_stub, :list_product_suites, 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 LogicalProduct. - # - # @overload get_logical_product(request, options = nil) - # Pass arguments to `get_logical_product` via a request object, either of type - # {::Google::Cloud::ProductRegistry::V1::GetLogicalProductRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ProductRegistry::V1::GetLogicalProductRequest, ::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_logical_product(name: nil) - # Pass arguments to `get_logical_product` 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. The name of the LogicalProduct to retrieve. - # Format: logicalProducts/\\{logical_product} - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ProductRegistry::V1::LogicalProduct] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ProductRegistry::V1::LogicalProduct] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/product_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ProductRegistry::V1::GetLogicalProductRequest.new - # - # # Call the get_logical_product method. - # result = client.get_logical_product request - # - # # The returned object is of type Google::Cloud::ProductRegistry::V1::LogicalProduct. - # p result - # - def get_logical_product request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ProductRegistry::V1::GetLogicalProductRequest - - # 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_logical_product.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::ProductRegistry::V1::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_logical_product.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_logical_product.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_product_registry_read_service_stub.call_rpc :get_logical_product, 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 LogicalProducts matching given criteria. - # - # @overload list_logical_products(request, options = nil) - # Pass arguments to `list_logical_products` via a request object, either of type - # {::Google::Cloud::ProductRegistry::V1::ListLogicalProductsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ProductRegistry::V1::ListLogicalProductsRequest, ::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_logical_products(filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_logical_products` 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 filter [::String] - # Optional. The filter expression for listing logical products. - # Filter syntax: https://google.aip.dev/160 - # Supported fields: suite_id - # @param page_size [::Integer] - # Optional. The maximum number of logical products to return. The service may - # return fewer than this value. If unspecified, at most 100 logical products - # will be returned. The maximum value is 500; values above 500 will be - # coerced to 500. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListLogicalProducts` - # call. Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListLogicalProducts` - # must match the call that provided the page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ProductRegistry::V1::LogicalProduct>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::ProductRegistry::V1::LogicalProduct>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/product_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ProductRegistry::V1::ListLogicalProductsRequest.new - # - # # Call the list_logical_products method. - # result = client.list_logical_products 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::ProductRegistry::V1::LogicalProduct. - # p item - # end - # - def list_logical_products request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ProductRegistry::V1::ListLogicalProductsRequest - - # 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_logical_products.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::ProductRegistry::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_logical_products.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_logical_products.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_product_registry_read_service_stub.call_rpc :list_logical_products, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @cloud_product_registry_read_service_stub, :list_logical_products, 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 - - ## - # Get details of a LogicalProductVariant. - # - # @overload get_logical_product_variant(request, options = nil) - # Pass arguments to `get_logical_product_variant` via a request object, either of type - # {::Google::Cloud::ProductRegistry::V1::GetLogicalProductVariantRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ProductRegistry::V1::GetLogicalProductVariantRequest, ::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_logical_product_variant(name: nil) - # Pass arguments to `get_logical_product_variant` 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. The name of the LogicalProductVariant to retrieve. - # Format: logicalProducts/\\{logical_product}/variants/\\{variant} - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ProductRegistry::V1::LogicalProductVariant] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ProductRegistry::V1::LogicalProductVariant] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/product_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ProductRegistry::V1::GetLogicalProductVariantRequest.new - # - # # Call the get_logical_product_variant method. - # result = client.get_logical_product_variant request - # - # # The returned object is of type Google::Cloud::ProductRegistry::V1::LogicalProductVariant. - # p result - # - def get_logical_product_variant request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ProductRegistry::V1::GetLogicalProductVariantRequest - - # 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_logical_product_variant.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::ProductRegistry::V1::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_logical_product_variant.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_logical_product_variant.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_product_registry_read_service_stub.call_rpc :get_logical_product_variant, 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 LogicalProductVariants matching given criteria. - # - # @overload list_logical_product_variants(request, options = nil) - # Pass arguments to `list_logical_product_variants` via a request object, either of type - # {::Google::Cloud::ProductRegistry::V1::ListLogicalProductVariantsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ProductRegistry::V1::ListLogicalProductVariantsRequest, ::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_logical_product_variants(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_logical_product_variants` 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 logical product id. - # Format: logicalProducts/\\{logical_product} - # @param page_size [::Integer] - # Optional. The maximum number of logical product variants to return. The - # service may return fewer than this value. If unspecified, at most 100 - # logical product variants will be returned. The maximum value is 500; values - # above 500 will be coerced to 500. - # @param page_token [::String] - # Optional. A page token, received from a previous - # `ListLogicalProductVariants` call. Provide this to retrieve the subsequent - # page. - # - # When paginating, all other parameters provided to - # `ListLogicalProductVariants` must match the call that provided the page - # token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::ProductRegistry::V1::LogicalProductVariant>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::ProductRegistry::V1::LogicalProductVariant>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/product_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ProductRegistry::V1::ListLogicalProductVariantsRequest.new - # - # # Call the list_logical_product_variants method. - # result = client.list_logical_product_variants 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::ProductRegistry::V1::LogicalProductVariant. - # p item - # end - # - def list_logical_product_variants request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ProductRegistry::V1::ListLogicalProductVariantsRequest - - # 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_logical_product_variants.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::ProductRegistry::V1::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_logical_product_variants.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_logical_product_variants.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_product_registry_read_service_stub.call_rpc :list_logical_product_variants, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @cloud_product_registry_read_service_stub, :list_logical_product_variants, 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 - - ## - # Look up entities. - # - # @overload lookup_entity(request, options = nil) - # Pass arguments to `lookup_entity` via a request object, either of type - # {::Google::Cloud::ProductRegistry::V1::LookupEntityRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ProductRegistry::V1::LookupEntityRequest, ::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 lookup_entity(lookup_uri: nil) - # Pass arguments to `lookup_entity` 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 lookup_uri [::String] - # Required. Entity uri to look up. - # Supported Formats: - # logicalProducts/\\{logical_product} - # logicalProducts/\\{logical_product}/variants/\\{variant} - # productSuites/\\{product_suite} - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::ProductRegistry::V1::LookupEntityResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::ProductRegistry::V1::LookupEntityResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/product_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ProductRegistry::V1::LookupEntityRequest.new - # - # # Call the lookup_entity method. - # result = client.lookup_entity request - # - # # The returned object is of type Google::Cloud::ProductRegistry::V1::LookupEntityResponse. - # p result - # - def lookup_entity request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ProductRegistry::V1::LookupEntityRequest - - # 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.lookup_entity.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::ProductRegistry::V1::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.lookup_uri - header_params["lookup_uri"] = request.lookup_uri - 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.lookup_entity.timeout, - metadata: metadata, - retry_policy: @config.rpcs.lookup_entity.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_product_registry_read_service_stub.call_rpc :lookup_entity, 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 - - ## - # Configuration class for the CloudProductRegistryReadService API. - # - # This class represents the configuration for CloudProductRegistryReadService, - # 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::ProductRegistry::V1::CloudProductRegistryReadService::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 - # # get_product_suite to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_product_suite.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_product_suite.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::ProductRegistry::V1::CloudProductRegistryReadService::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 = "cloudproductregistry.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 CloudProductRegistryReadService 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 `get_product_suite` - # @return [::Gapic::Config::Method] - # - attr_reader :get_product_suite - ## - # RPC-specific configuration for `list_product_suites` - # @return [::Gapic::Config::Method] - # - attr_reader :list_product_suites - ## - # RPC-specific configuration for `get_logical_product` - # @return [::Gapic::Config::Method] - # - attr_reader :get_logical_product - ## - # RPC-specific configuration for `list_logical_products` - # @return [::Gapic::Config::Method] - # - attr_reader :list_logical_products - ## - # RPC-specific configuration for `get_logical_product_variant` - # @return [::Gapic::Config::Method] - # - attr_reader :get_logical_product_variant - ## - # RPC-specific configuration for `list_logical_product_variants` - # @return [::Gapic::Config::Method] - # - attr_reader :list_logical_product_variants - ## - # RPC-specific configuration for `lookup_entity` - # @return [::Gapic::Config::Method] - # - attr_reader :lookup_entity - - # @private - def initialize parent_rpcs = nil - get_product_suite_config = parent_rpcs.get_product_suite if parent_rpcs.respond_to? :get_product_suite - @get_product_suite = ::Gapic::Config::Method.new get_product_suite_config - list_product_suites_config = parent_rpcs.list_product_suites if parent_rpcs.respond_to? :list_product_suites - @list_product_suites = ::Gapic::Config::Method.new list_product_suites_config - get_logical_product_config = parent_rpcs.get_logical_product if parent_rpcs.respond_to? :get_logical_product - @get_logical_product = ::Gapic::Config::Method.new get_logical_product_config - list_logical_products_config = parent_rpcs.list_logical_products if parent_rpcs.respond_to? :list_logical_products - @list_logical_products = ::Gapic::Config::Method.new list_logical_products_config - get_logical_product_variant_config = parent_rpcs.get_logical_product_variant if parent_rpcs.respond_to? :get_logical_product_variant - @get_logical_product_variant = ::Gapic::Config::Method.new get_logical_product_variant_config - list_logical_product_variants_config = parent_rpcs.list_logical_product_variants if parent_rpcs.respond_to? :list_logical_product_variants - @list_logical_product_variants = ::Gapic::Config::Method.new list_logical_product_variants_config - lookup_entity_config = parent_rpcs.lookup_entity if parent_rpcs.respond_to? :lookup_entity - @lookup_entity = ::Gapic::Config::Method.new lookup_entity_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/product_registry/v1/cloud_product_registry_read_service/credentials.rb b/owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/product_registry/v1/cloud_product_registry_read_service/credentials.rb deleted file mode 100644 index 15d74e925c1f..000000000000 --- a/owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/product_registry/v1/cloud_product_registry_read_service/credentials.rb +++ /dev/null @@ -1,44 +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 ProductRegistry - module V1 - module CloudProductRegistryReadService - # Credentials for the CloudProductRegistryReadService API. - class Credentials < ::Google::Auth::Credentials - 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-product_registry-v1/lib/google/cloud/product_registry/v1/cloud_product_registry_read_service/paths.rb b/owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/product_registry/v1/cloud_product_registry_read_service/paths.rb deleted file mode 100644 index 2a28bae5db3c..000000000000 --- a/owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/product_registry/v1/cloud_product_registry_read_service/paths.rb +++ /dev/null @@ -1,78 +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 ProductRegistry - module V1 - module CloudProductRegistryReadService - # Path helper methods for the CloudProductRegistryReadService API. - module Paths - ## - # Create a fully-qualified LogicalProduct resource string. - # - # The resource will be in the following format: - # - # `logicalProducts/{logical_product}` - # - # @param logical_product [String] - # - # @return [::String] - def logical_product_path logical_product: - "logicalProducts/#{logical_product}" - end - - ## - # Create a fully-qualified LogicalProductVariant resource string. - # - # The resource will be in the following format: - # - # `logicalProducts/{logical_product}/variants/{variant}` - # - # @param logical_product [String] - # @param variant [String] - # - # @return [::String] - def logical_product_variant_path logical_product:, variant: - raise ::ArgumentError, "logical_product cannot contain /" if logical_product.to_s.include? "/" - - "logicalProducts/#{logical_product}/variants/#{variant}" - end - - ## - # Create a fully-qualified ProductSuite resource string. - # - # The resource will be in the following format: - # - # `productSuites/{product_suite}` - # - # @param product_suite [String] - # - # @return [::String] - def product_suite_path product_suite: - "productSuites/#{product_suite}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/product_registry/v1/cloud_product_registry_read_service/rest.rb b/owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/product_registry/v1/cloud_product_registry_read_service/rest.rb deleted file mode 100644 index 2c8db54a0dc0..000000000000 --- a/owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/product_registry/v1/cloud_product_registry_read_service/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/product_registry/v1/version" - -require "google/cloud/product_registry/v1/cloud_product_registry_read_service/credentials" -require "google/cloud/product_registry/v1/cloud_product_registry_read_service/paths" -require "google/cloud/product_registry/v1/cloud_product_registry_read_service/rest/client" - -module Google - module Cloud - module ProductRegistry - module V1 - ## - # Cloud Product Registry Read Service provides capabilities to access all first - # and third party Google Cloud products. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/product_registry/v1/cloud_product_registry_read_service/rest" - # client = ::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Rest::Client.new - # - module CloudProductRegistryReadService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/product_registry/v1/cloud_product_registry_read_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/product_registry/v1/cloud_product_registry_read_service/rest/client.rb b/owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/product_registry/v1/cloud_product_registry_read_service/rest/client.rb deleted file mode 100644 index 14ff48adff4b..000000000000 --- a/owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/product_registry/v1/cloud_product_registry_read_service/rest/client.rb +++ /dev/null @@ -1,1032 +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/productregistry/v1/cloud_product_registry_read_service_pb" -require "google/cloud/product_registry/v1/cloud_product_registry_read_service/rest/service_stub" - -module Google - module Cloud - module ProductRegistry - module V1 - module CloudProductRegistryReadService - module Rest - ## - # REST client for the CloudProductRegistryReadService service. - # - # Cloud Product Registry Read Service provides capabilities to access all first - # and third party Google Cloud products. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "cloudproductregistry.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :cloud_product_registry_read_service_stub - - ## - # Configure the CloudProductRegistryReadService Client class. - # - # See {::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all CloudProductRegistryReadService clients - # ::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::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", "ProductRegistry", "V1"] - 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.get_product_suite.timeout = 60.0 - default_config.rpcs.get_product_suite.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_product_suites.timeout = 60.0 - default_config.rpcs.list_product_suites.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_logical_product.timeout = 60.0 - default_config.rpcs.get_logical_product.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_logical_products.timeout = 60.0 - default_config.rpcs.list_logical_products.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_logical_product_variant.timeout = 60.0 - default_config.rpcs.get_logical_product_variant.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_logical_product_variants.timeout = 60.0 - default_config.rpcs.list_logical_product_variants.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.lookup_entity.timeout = 60.0 - default_config.rpcs.lookup_entity.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 CloudProductRegistryReadService 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::ProductRegistry::V1::CloudProductRegistryReadService::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 - @cloud_product_registry_read_service_stub.universe_domain - end - - ## - # Create a new CloudProductRegistryReadService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the CloudProductRegistryReadService 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 - - @cloud_product_registry_read_service_stub = ::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @cloud_product_registry_read_service_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 - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @cloud_product_registry_read_service_stub.logger - end - - # Service calls - - ## - # Get details of a ProductSuite. - # - # @overload get_product_suite(request, options = nil) - # Pass arguments to `get_product_suite` via a request object, either of type - # {::Google::Cloud::ProductRegistry::V1::GetProductSuiteRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ProductRegistry::V1::GetProductSuiteRequest, ::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_product_suite(name: nil) - # Pass arguments to `get_product_suite` 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. The name of the ProductSuite to retrieve. - # Format: productSuites/\\{product_suite} - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ProductRegistry::V1::ProductSuite] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ProductRegistry::V1::ProductSuite] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/product_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ProductRegistry::V1::GetProductSuiteRequest.new - # - # # Call the get_product_suite method. - # result = client.get_product_suite request - # - # # The returned object is of type Google::Cloud::ProductRegistry::V1::ProductSuite. - # p result - # - def get_product_suite request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ProductRegistry::V1::GetProductSuiteRequest - - # 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_product_suite.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::ProductRegistry::V1::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_product_suite.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_product_suite.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_product_registry_read_service_stub.get_product_suite 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 ProductSuites. - # - # @overload list_product_suites(request, options = nil) - # Pass arguments to `list_product_suites` via a request object, either of type - # {::Google::Cloud::ProductRegistry::V1::ListProductSuitesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ProductRegistry::V1::ListProductSuitesRequest, ::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_product_suites(page_size: nil, page_token: nil) - # Pass arguments to `list_product_suites` 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 page_size [::Integer] - # Optional. The maximum number of suites to return. The service may return - # fewer than this value. If unspecified, at most 100 suites will be returned. - # The maximum value is 500; values above 500 will be coerced to 500. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListProductSuites` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListProductSuites` must - # match the call that provided the page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ProductRegistry::V1::ProductSuite>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ProductRegistry::V1::ProductSuite>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/product_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ProductRegistry::V1::ListProductSuitesRequest.new - # - # # Call the list_product_suites method. - # result = client.list_product_suites 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::ProductRegistry::V1::ProductSuite. - # p item - # end - # - def list_product_suites request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ProductRegistry::V1::ListProductSuitesRequest - - # 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_product_suites.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::ProductRegistry::V1::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_product_suites.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_product_suites.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_product_registry_read_service_stub.list_product_suites request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @cloud_product_registry_read_service_stub, :list_product_suites, "product_suites", 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 LogicalProduct. - # - # @overload get_logical_product(request, options = nil) - # Pass arguments to `get_logical_product` via a request object, either of type - # {::Google::Cloud::ProductRegistry::V1::GetLogicalProductRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ProductRegistry::V1::GetLogicalProductRequest, ::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_logical_product(name: nil) - # Pass arguments to `get_logical_product` 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. The name of the LogicalProduct to retrieve. - # Format: logicalProducts/\\{logical_product} - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ProductRegistry::V1::LogicalProduct] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ProductRegistry::V1::LogicalProduct] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/product_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ProductRegistry::V1::GetLogicalProductRequest.new - # - # # Call the get_logical_product method. - # result = client.get_logical_product request - # - # # The returned object is of type Google::Cloud::ProductRegistry::V1::LogicalProduct. - # p result - # - def get_logical_product request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ProductRegistry::V1::GetLogicalProductRequest - - # 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_logical_product.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::ProductRegistry::V1::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_logical_product.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_logical_product.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_product_registry_read_service_stub.get_logical_product 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 LogicalProducts matching given criteria. - # - # @overload list_logical_products(request, options = nil) - # Pass arguments to `list_logical_products` via a request object, either of type - # {::Google::Cloud::ProductRegistry::V1::ListLogicalProductsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ProductRegistry::V1::ListLogicalProductsRequest, ::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_logical_products(filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_logical_products` 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 filter [::String] - # Optional. The filter expression for listing logical products. - # Filter syntax: https://google.aip.dev/160 - # Supported fields: suite_id - # @param page_size [::Integer] - # Optional. The maximum number of logical products to return. The service may - # return fewer than this value. If unspecified, at most 100 logical products - # will be returned. The maximum value is 500; values above 500 will be - # coerced to 500. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListLogicalProducts` - # call. Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListLogicalProducts` - # must match the call that provided the page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ProductRegistry::V1::LogicalProduct>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ProductRegistry::V1::LogicalProduct>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/product_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ProductRegistry::V1::ListLogicalProductsRequest.new - # - # # Call the list_logical_products method. - # result = client.list_logical_products 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::ProductRegistry::V1::LogicalProduct. - # p item - # end - # - def list_logical_products request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ProductRegistry::V1::ListLogicalProductsRequest - - # 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_logical_products.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::ProductRegistry::V1::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_logical_products.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_logical_products.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_product_registry_read_service_stub.list_logical_products request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @cloud_product_registry_read_service_stub, :list_logical_products, "logical_products", 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 - - ## - # Get details of a LogicalProductVariant. - # - # @overload get_logical_product_variant(request, options = nil) - # Pass arguments to `get_logical_product_variant` via a request object, either of type - # {::Google::Cloud::ProductRegistry::V1::GetLogicalProductVariantRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ProductRegistry::V1::GetLogicalProductVariantRequest, ::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_logical_product_variant(name: nil) - # Pass arguments to `get_logical_product_variant` 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. The name of the LogicalProductVariant to retrieve. - # Format: logicalProducts/\\{logical_product}/variants/\\{variant} - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ProductRegistry::V1::LogicalProductVariant] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ProductRegistry::V1::LogicalProductVariant] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/product_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ProductRegistry::V1::GetLogicalProductVariantRequest.new - # - # # Call the get_logical_product_variant method. - # result = client.get_logical_product_variant request - # - # # The returned object is of type Google::Cloud::ProductRegistry::V1::LogicalProductVariant. - # p result - # - def get_logical_product_variant request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ProductRegistry::V1::GetLogicalProductVariantRequest - - # 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_logical_product_variant.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::ProductRegistry::V1::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_logical_product_variant.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_logical_product_variant.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_product_registry_read_service_stub.get_logical_product_variant 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 LogicalProductVariants matching given criteria. - # - # @overload list_logical_product_variants(request, options = nil) - # Pass arguments to `list_logical_product_variants` via a request object, either of type - # {::Google::Cloud::ProductRegistry::V1::ListLogicalProductVariantsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ProductRegistry::V1::ListLogicalProductVariantsRequest, ::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_logical_product_variants(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_logical_product_variants` 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 logical product id. - # Format: logicalProducts/\\{logical_product} - # @param page_size [::Integer] - # Optional. The maximum number of logical product variants to return. The - # service may return fewer than this value. If unspecified, at most 100 - # logical product variants will be returned. The maximum value is 500; values - # above 500 will be coerced to 500. - # @param page_token [::String] - # Optional. A page token, received from a previous - # `ListLogicalProductVariants` call. Provide this to retrieve the subsequent - # page. - # - # When paginating, all other parameters provided to - # `ListLogicalProductVariants` must match the call that provided the page - # token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ProductRegistry::V1::LogicalProductVariant>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::ProductRegistry::V1::LogicalProductVariant>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/product_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ProductRegistry::V1::ListLogicalProductVariantsRequest.new - # - # # Call the list_logical_product_variants method. - # result = client.list_logical_product_variants 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::ProductRegistry::V1::LogicalProductVariant. - # p item - # end - # - def list_logical_product_variants request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ProductRegistry::V1::ListLogicalProductVariantsRequest - - # 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_logical_product_variants.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::ProductRegistry::V1::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_logical_product_variants.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_logical_product_variants.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_product_registry_read_service_stub.list_logical_product_variants request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @cloud_product_registry_read_service_stub, :list_logical_product_variants, "logical_product_variants", 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 - - ## - # Look up entities. - # - # @overload lookup_entity(request, options = nil) - # Pass arguments to `lookup_entity` via a request object, either of type - # {::Google::Cloud::ProductRegistry::V1::LookupEntityRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::ProductRegistry::V1::LookupEntityRequest, ::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 lookup_entity(lookup_uri: nil) - # Pass arguments to `lookup_entity` 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 lookup_uri [::String] - # Required. Entity uri to look up. - # Supported Formats: - # logicalProducts/\\{logical_product} - # logicalProducts/\\{logical_product}/variants/\\{variant} - # productSuites/\\{product_suite} - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::ProductRegistry::V1::LookupEntityResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ProductRegistry::V1::LookupEntityResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/product_registry/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::ProductRegistry::V1::LookupEntityRequest.new - # - # # Call the lookup_entity method. - # result = client.lookup_entity request - # - # # The returned object is of type Google::Cloud::ProductRegistry::V1::LookupEntityResponse. - # p result - # - def lookup_entity request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::ProductRegistry::V1::LookupEntityRequest - - # 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.lookup_entity.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::ProductRegistry::V1::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.lookup_entity.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.lookup_entity.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_product_registry_read_service_stub.lookup_entity 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 - - ## - # Configuration class for the CloudProductRegistryReadService REST API. - # - # This class represents the configuration for CloudProductRegistryReadService 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::ProductRegistry::V1::CloudProductRegistryReadService::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 - # # get_product_suite to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_product_suite.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_product_suite.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 = "cloudproductregistry.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 - 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 CloudProductRegistryReadService 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 `get_product_suite` - # @return [::Gapic::Config::Method] - # - attr_reader :get_product_suite - ## - # RPC-specific configuration for `list_product_suites` - # @return [::Gapic::Config::Method] - # - attr_reader :list_product_suites - ## - # RPC-specific configuration for `get_logical_product` - # @return [::Gapic::Config::Method] - # - attr_reader :get_logical_product - ## - # RPC-specific configuration for `list_logical_products` - # @return [::Gapic::Config::Method] - # - attr_reader :list_logical_products - ## - # RPC-specific configuration for `get_logical_product_variant` - # @return [::Gapic::Config::Method] - # - attr_reader :get_logical_product_variant - ## - # RPC-specific configuration for `list_logical_product_variants` - # @return [::Gapic::Config::Method] - # - attr_reader :list_logical_product_variants - ## - # RPC-specific configuration for `lookup_entity` - # @return [::Gapic::Config::Method] - # - attr_reader :lookup_entity - - # @private - def initialize parent_rpcs = nil - get_product_suite_config = parent_rpcs.get_product_suite if parent_rpcs.respond_to? :get_product_suite - @get_product_suite = ::Gapic::Config::Method.new get_product_suite_config - list_product_suites_config = parent_rpcs.list_product_suites if parent_rpcs.respond_to? :list_product_suites - @list_product_suites = ::Gapic::Config::Method.new list_product_suites_config - get_logical_product_config = parent_rpcs.get_logical_product if parent_rpcs.respond_to? :get_logical_product - @get_logical_product = ::Gapic::Config::Method.new get_logical_product_config - list_logical_products_config = parent_rpcs.list_logical_products if parent_rpcs.respond_to? :list_logical_products - @list_logical_products = ::Gapic::Config::Method.new list_logical_products_config - get_logical_product_variant_config = parent_rpcs.get_logical_product_variant if parent_rpcs.respond_to? :get_logical_product_variant - @get_logical_product_variant = ::Gapic::Config::Method.new get_logical_product_variant_config - list_logical_product_variants_config = parent_rpcs.list_logical_product_variants if parent_rpcs.respond_to? :list_logical_product_variants - @list_logical_product_variants = ::Gapic::Config::Method.new list_logical_product_variants_config - lookup_entity_config = parent_rpcs.lookup_entity if parent_rpcs.respond_to? :lookup_entity - @lookup_entity = ::Gapic::Config::Method.new lookup_entity_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/product_registry/v1/cloud_product_registry_read_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/product_registry/v1/cloud_product_registry_read_service/rest/service_stub.rb deleted file mode 100644 index 56c62b993655..000000000000 --- a/owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/product_registry/v1/cloud_product_registry_read_service/rest/service_stub.rb +++ /dev/null @@ -1,518 +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/productregistry/v1/cloud_product_registry_read_service_pb" - -module Google - module Cloud - module ProductRegistry - module V1 - module CloudProductRegistryReadService - module Rest - ## - # REST service stub for the CloudProductRegistryReadService 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 get_product_suite REST call - # - # @param request_pb [::Google::Cloud::ProductRegistry::V1::GetProductSuiteRequest] - # 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::ProductRegistry::V1::ProductSuite] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ProductRegistry::V1::ProductSuite] - # A result object deserialized from the server's reply - def get_product_suite request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_product_suite_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_product_suite", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ProductRegistry::V1::ProductSuite.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_product_suites REST call - # - # @param request_pb [::Google::Cloud::ProductRegistry::V1::ListProductSuitesRequest] - # 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::ProductRegistry::V1::ListProductSuitesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ProductRegistry::V1::ListProductSuitesResponse] - # A result object deserialized from the server's reply - def list_product_suites request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_product_suites_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_product_suites", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ProductRegistry::V1::ListProductSuitesResponse.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_logical_product REST call - # - # @param request_pb [::Google::Cloud::ProductRegistry::V1::GetLogicalProductRequest] - # 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::ProductRegistry::V1::LogicalProduct] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ProductRegistry::V1::LogicalProduct] - # A result object deserialized from the server's reply - def get_logical_product request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_logical_product_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_logical_product", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ProductRegistry::V1::LogicalProduct.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_logical_products REST call - # - # @param request_pb [::Google::Cloud::ProductRegistry::V1::ListLogicalProductsRequest] - # 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::ProductRegistry::V1::ListLogicalProductsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ProductRegistry::V1::ListLogicalProductsResponse] - # A result object deserialized from the server's reply - def list_logical_products request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_logical_products_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_logical_products", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ProductRegistry::V1::ListLogicalProductsResponse.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_logical_product_variant REST call - # - # @param request_pb [::Google::Cloud::ProductRegistry::V1::GetLogicalProductVariantRequest] - # 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::ProductRegistry::V1::LogicalProductVariant] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ProductRegistry::V1::LogicalProductVariant] - # A result object deserialized from the server's reply - def get_logical_product_variant request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_logical_product_variant_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_logical_product_variant", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ProductRegistry::V1::LogicalProductVariant.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_logical_product_variants REST call - # - # @param request_pb [::Google::Cloud::ProductRegistry::V1::ListLogicalProductVariantsRequest] - # 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::ProductRegistry::V1::ListLogicalProductVariantsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ProductRegistry::V1::ListLogicalProductVariantsResponse] - # A result object deserialized from the server's reply - def list_logical_product_variants request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_logical_product_variants_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_logical_product_variants", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ProductRegistry::V1::ListLogicalProductVariantsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the lookup_entity REST call - # - # @param request_pb [::Google::Cloud::ProductRegistry::V1::LookupEntityRequest] - # 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::ProductRegistry::V1::LookupEntityResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::ProductRegistry::V1::LookupEntityResponse] - # A result object deserialized from the server's reply - def lookup_entity request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_lookup_entity_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: "lookup_entity", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::ProductRegistry::V1::LookupEntityResponse.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 get_product_suite REST call - # - # @param request_pb [::Google::Cloud::ProductRegistry::V1::GetProductSuiteRequest] - # 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_product_suite_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^productSuites/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_product_suites REST call - # - # @param request_pb [::Google::Cloud::ProductRegistry::V1::ListProductSuitesRequest] - # 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_product_suites_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/productSuites", - matches: [] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_logical_product REST call - # - # @param request_pb [::Google::Cloud::ProductRegistry::V1::GetLogicalProductRequest] - # 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_logical_product_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^logicalProducts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_logical_products REST call - # - # @param request_pb [::Google::Cloud::ProductRegistry::V1::ListLogicalProductsRequest] - # 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_logical_products_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/logicalProducts", - matches: [] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_logical_product_variant REST call - # - # @param request_pb [::Google::Cloud::ProductRegistry::V1::GetLogicalProductVariantRequest] - # 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_logical_product_variant_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^logicalProducts/[^/]+/variants/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_logical_product_variants REST call - # - # @param request_pb [::Google::Cloud::ProductRegistry::V1::ListLogicalProductVariantsRequest] - # 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_logical_product_variants_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/variants", - matches: [ - ["parent", %r{^logicalProducts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the lookup_entity REST call - # - # @param request_pb [::Google::Cloud::ProductRegistry::V1::LookupEntityRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_lookup_entity_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{lookup_uri}:lookupEntity", - matches: [ - ["lookup_uri", %r{^logicalProducts/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{lookup_uri}:lookupEntity", - matches: [ - ["lookup_uri", %r{^logicalProducts/[^/]+/variants/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{lookup_uri}:lookupEntity", - matches: [ - ["lookup_uri", %r{^productSuites/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/product_registry/v1/rest.rb b/owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/product_registry/v1/rest.rb deleted file mode 100644 index e1aceb76240c..000000000000 --- a/owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/product_registry/v1/rest.rb +++ /dev/null @@ -1,37 +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/product_registry/v1/cloud_product_registry_read_service/rest" -require "google/cloud/product_registry/v1/version" - -module Google - module Cloud - module ProductRegistry - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/product_registry/v1/rest" - # client = ::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Rest::Client.new - # - module V1 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/product_registry/v1/version.rb b/owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/product_registry/v1/version.rb deleted file mode 100644 index a2a6cfaad035..000000000000 --- a/owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/product_registry/v1/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 ProductRegistry - module V1 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/productregistry/v1/cloud_product_registry_read_service_pb.rb b/owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/productregistry/v1/cloud_product_registry_read_service_pb.rb deleted file mode 100644 index d3406aac6233..000000000000 --- a/owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/productregistry/v1/cloud_product_registry_read_service_pb.rb +++ /dev/null @@ -1,39 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/productregistry/v1/cloud_product_registry_read_service.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/productregistry/v1/logical_product_pb' -require 'google/cloud/productregistry/v1/logical_product_variant_pb' -require 'google/cloud/productregistry/v1/product_suite_pb' - - -descriptor_data = "\nIgoogle/cloud/productregistry/v1/cloud_product_registry_read_service.proto\x12\x1fgoogle.cloud.productregistry.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x35google/cloud/productregistry/v1/logical_product.proto\x1a=google/cloud/productregistry/v1/logical_product_variant.proto\x1a\x33google/cloud/productregistry/v1/product_suite.proto\"`\n\x16GetProductSuiteRequest\x12\x46\n\x04name\x18\x01 \x01(\tB8\xe0\x41\x02\xfa\x41\x32\n0cloudproductregistry.googleapis.com/ProductSuite\"d\n\x18GetLogicalProductRequest\x12H\n\x04name\x18\x01 \x01(\tB:\xe0\x41\x02\xfa\x41\x34\n2cloudproductregistry.googleapis.com/LogicalProduct\"r\n\x1fGetLogicalProductVariantRequest\x12O\n\x04name\x18\x01 \x01(\tBA\xe0\x41\x02\xfa\x41;\n9cloudproductregistry.googleapis.com/LogicalProductVariant\"K\n\x18ListProductSuitesRequest\x12\x16\n\tpage_size\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\"{\n\x19ListProductSuitesResponse\x12\x45\n\x0eproduct_suites\x18\x01 \x03(\x0b\x32-.google.cloud.productregistry.v1.ProductSuite\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"b\n\x1aListLogicalProductsRequest\x12\x13\n\x06\x66ilter\x18\x01 \x01(\tB\x03\xe0\x41\x01\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\"\x81\x01\n\x1bListLogicalProductsResponse\x12I\n\x10logical_products\x18\x01 \x03(\x0b\x32/.google.cloud.productregistry.v1.LogicalProduct\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xa7\x01\n!ListLogicalProductVariantsRequest\x12Q\n\x06parent\x18\x01 \x01(\tBA\xe0\x41\x02\xfa\x41;\x12\x39\x63loudproductregistry.googleapis.com/LogicalProductVariant\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\"\x97\x01\n\"ListLogicalProductVariantsResponse\x12X\n\x18logical_product_variants\x18\x01 \x03(\x0b\x32\x36.google.cloud.productregistry.v1.LogicalProductVariant\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\".\n\x13LookupEntityRequest\x12\x17\n\nlookup_uri\x18\x01 \x01(\tB\x03\xe0\x41\x02\"\x8f\x02\n\x14LookupEntityResponse\x12J\n\x0flogical_product\x18\x01 \x01(\x0b\x32/.google.cloud.productregistry.v1.LogicalProductH\x00\x12Y\n\x17logical_product_variant\x18\x02 \x01(\x0b\x32\x36.google.cloud.productregistry.v1.LogicalProductVariantH\x00\x12\x46\n\rproduct_suite\x18\x03 \x01(\x0b\x32-.google.cloud.productregistry.v1.ProductSuiteH\x00\x42\x08\n\x06\x65ntity2\xd0\x0b\n\x1f\x43loudProductRegistryReadService\x12\xa4\x01\n\x0fGetProductSuite\x12\x37.google.cloud.productregistry.v1.GetProductSuiteRequest\x1a-.google.cloud.productregistry.v1.ProductSuite\")\xda\x41\x04name\x82\xd3\xe4\x93\x02\x1c\x12\x1a/v1/{name=productSuites/*}\x12\xa5\x01\n\x11ListProductSuites\x12\x39.google.cloud.productregistry.v1.ListProductSuitesRequest\x1a:.google.cloud.productregistry.v1.ListProductSuitesResponse\"\x19\x82\xd3\xe4\x93\x02\x13\x12\x11/v1/productSuites\x12\xac\x01\n\x11GetLogicalProduct\x12\x39.google.cloud.productregistry.v1.GetLogicalProductRequest\x1a/.google.cloud.productregistry.v1.LogicalProduct\"+\xda\x41\x04name\x82\xd3\xe4\x93\x02\x1e\x12\x1c/v1/{name=logicalProducts/*}\x12\xad\x01\n\x13ListLogicalProducts\x12;.google.cloud.productregistry.v1.ListLogicalProductsRequest\x1a<.google.cloud.productregistry.v1.ListLogicalProductsResponse\"\x1b\x82\xd3\xe4\x93\x02\x15\x12\x13/v1/logicalProducts\x12\xcc\x01\n\x18GetLogicalProductVariant\x12@.google.cloud.productregistry.v1.GetLogicalProductVariantRequest\x1a\x36.google.cloud.productregistry.v1.LogicalProductVariant\"6\xda\x41\x04name\x82\xd3\xe4\x93\x02)\x12\'/v1/{name=logicalProducts/*/variants/*}\x12\xdf\x01\n\x1aListLogicalProductVariants\x12\x42.google.cloud.productregistry.v1.ListLogicalProductVariantsRequest\x1a\x43.google.cloud.productregistry.v1.ListLogicalProductVariantsResponse\"8\xda\x41\x06parent\x82\xd3\xe4\x93\x02)\x12\'/v1/{parent=logicalProducts/*}/variants\x12\xa5\x02\n\x0cLookupEntity\x12\x34.google.cloud.productregistry.v1.LookupEntityRequest\x1a\x35.google.cloud.productregistry.v1.LookupEntityResponse\"\xa7\x01\x82\xd3\xe4\x93\x02\xa0\x01\x12//v1/{lookup_uri=logicalProducts/*}:lookupEntityZ<\x12:/v1/{lookup_uri=logicalProducts/*/variants/*}:lookupEntityZ/\x12-/v1/{lookup_uri=productSuites/*}:lookupEntity\x1a&\xca\x41#cloudproductregistry.googleapis.comB\x85\x02\n#com.google.cloud.productregistry.v1B$CloudProductRegistryReadServiceProtoP\x01ZMcloud.google.com/go/productregistry/apiv1/productregistrypb;productregistrypb\xaa\x02\x1fGoogle.Cloud.ProductRegistry.V1\xca\x02\x1fGoogle\\Cloud\\ProductRegistry\\V1\xea\x02\"Google::Cloud::ProductRegistry::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module ProductRegistry - module V1 - GetProductSuiteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.productregistry.v1.GetProductSuiteRequest").msgclass - GetLogicalProductRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.productregistry.v1.GetLogicalProductRequest").msgclass - GetLogicalProductVariantRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.productregistry.v1.GetLogicalProductVariantRequest").msgclass - ListProductSuitesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.productregistry.v1.ListProductSuitesRequest").msgclass - ListProductSuitesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.productregistry.v1.ListProductSuitesResponse").msgclass - ListLogicalProductsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.productregistry.v1.ListLogicalProductsRequest").msgclass - ListLogicalProductsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.productregistry.v1.ListLogicalProductsResponse").msgclass - ListLogicalProductVariantsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.productregistry.v1.ListLogicalProductVariantsRequest").msgclass - ListLogicalProductVariantsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.productregistry.v1.ListLogicalProductVariantsResponse").msgclass - LookupEntityRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.productregistry.v1.LookupEntityRequest").msgclass - LookupEntityResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.productregistry.v1.LookupEntityResponse").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/productregistry/v1/cloud_product_registry_read_service_services_pb.rb b/owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/productregistry/v1/cloud_product_registry_read_service_services_pb.rb deleted file mode 100644 index aa191645f417..000000000000 --- a/owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/productregistry/v1/cloud_product_registry_read_service_services_pb.rb +++ /dev/null @@ -1,58 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/productregistry/v1/cloud_product_registry_read_service.proto for package 'Google.Cloud.ProductRegistry.V1' -# Original file comments: -# 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 -# -# 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. -# - -require 'grpc' -require 'google/cloud/productregistry/v1/cloud_product_registry_read_service_pb' - -module Google - module Cloud - module ProductRegistry - module V1 - module CloudProductRegistryReadService - # Cloud Product Registry Read Service provides capabilities to access all first - # and third party Google Cloud products. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.productregistry.v1.CloudProductRegistryReadService' - - # Get details of a ProductSuite. - rpc :GetProductSuite, ::Google::Cloud::ProductRegistry::V1::GetProductSuiteRequest, ::Google::Cloud::ProductRegistry::V1::ProductSuite - # Lists ProductSuites. - rpc :ListProductSuites, ::Google::Cloud::ProductRegistry::V1::ListProductSuitesRequest, ::Google::Cloud::ProductRegistry::V1::ListProductSuitesResponse - # Gets details of a LogicalProduct. - rpc :GetLogicalProduct, ::Google::Cloud::ProductRegistry::V1::GetLogicalProductRequest, ::Google::Cloud::ProductRegistry::V1::LogicalProduct - # Lists LogicalProducts matching given criteria. - rpc :ListLogicalProducts, ::Google::Cloud::ProductRegistry::V1::ListLogicalProductsRequest, ::Google::Cloud::ProductRegistry::V1::ListLogicalProductsResponse - # Get details of a LogicalProductVariant. - rpc :GetLogicalProductVariant, ::Google::Cloud::ProductRegistry::V1::GetLogicalProductVariantRequest, ::Google::Cloud::ProductRegistry::V1::LogicalProductVariant - # Lists LogicalProductVariants matching given criteria. - rpc :ListLogicalProductVariants, ::Google::Cloud::ProductRegistry::V1::ListLogicalProductVariantsRequest, ::Google::Cloud::ProductRegistry::V1::ListLogicalProductVariantsResponse - # Look up entities. - rpc :LookupEntity, ::Google::Cloud::ProductRegistry::V1::LookupEntityRequest, ::Google::Cloud::ProductRegistry::V1::LookupEntityResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/productregistry/v1/lifecycle_state_pb.rb b/owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/productregistry/v1/lifecycle_state_pb.rb deleted file mode 100644 index 330b38ac4f93..000000000000 --- a/owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/productregistry/v1/lifecycle_state_pb.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/productregistry/v1/lifecycle_state.proto - -require 'google/protobuf' - - -descriptor_data = "\n5google/cloud/productregistry/v1/lifecycle_state.proto\x12\x1fgoogle.cloud.productregistry.v1*\xad\x01\n\x0eLifecycleState\x12\x1f\n\x1bLIFECYCLE_STATE_UNSPECIFIED\x10\x00\x12\"\n\x1eLIFECYCLE_STATE_PUBLIC_PREVIEW\x10\x01\x12\x1e\n\x1aLIFECYCLE_STATE_PRIVATE_GA\x10\x02\x12\x16\n\x12LIFECYCLE_STATE_GA\x10\x03\x12\x1e\n\x1aLIFECYCLE_STATE_DEPRECATED\x10\x04\x42\xf4\x01\n#com.google.cloud.productregistry.v1B\x13LifecycleStateProtoP\x01ZMcloud.google.com/go/productregistry/apiv1/productregistrypb;productregistrypb\xaa\x02\x1fGoogle.Cloud.ProductRegistry.V1\xca\x02\x1fGoogle\\Cloud\\ProductRegistry\\V1\xea\x02\"Google::Cloud::ProductRegistry::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module ProductRegistry - module V1 - LifecycleState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.productregistry.v1.LifecycleState").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/productregistry/v1/logical_product_pb.rb b/owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/productregistry/v1/logical_product_pb.rb deleted file mode 100644 index ce445dd9e745..000000000000 --- a/owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/productregistry/v1/logical_product_pb.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/productregistry/v1/logical_product.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/productregistry/v1/lifecycle_state_pb' - - -descriptor_data = "\n5google/cloud/productregistry/v1/logical_product.proto\x12\x1fgoogle.cloud.productregistry.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x35google/cloud/productregistry/v1/lifecycle_state.proto\"\xd8\x03\n\x0eLogicalProduct\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\r\n\x05title\x18\x02 \x01(\t\x12L\n\rproduct_suite\x18\x03 \x01(\tB5\xfa\x41\x32\n0cloudproductregistry.googleapis.com/ProductSuite\x12S\n\x08variants\x18\x04 \x03(\tBA\xe0\x41\x03\xfa\x41;\n9cloudproductregistry.googleapis.com/LogicalProductVariant\x12M\n\x0flifecycle_state\x18\x05 \x01(\x0e\x32/.google.cloud.productregistry.v1.LifecycleStateB\x03\xe0\x41\x03\x12\x15\n\x08replaced\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x1e\n\x0breplacement\x18\x07 \x01(\tB\t\xe0\x41\x03\xfa\x41\x03\n\x01*:{\xea\x41x\n2cloudproductregistry.googleapis.com/LogicalProduct\x12!logicalProducts/{logical_product}*\x0flogicalProducts2\x0elogicalProductB\xf4\x01\n#com.google.cloud.productregistry.v1B\x13LogicalProductProtoP\x01ZMcloud.google.com/go/productregistry/apiv1/productregistrypb;productregistrypb\xaa\x02\x1fGoogle.Cloud.ProductRegistry.V1\xca\x02\x1fGoogle\\Cloud\\ProductRegistry\\V1\xea\x02\"Google::Cloud::ProductRegistry::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module ProductRegistry - module V1 - LogicalProduct = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.productregistry.v1.LogicalProduct").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/productregistry/v1/logical_product_variant_pb.rb b/owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/productregistry/v1/logical_product_variant_pb.rb deleted file mode 100644 index 74726eb17b74..000000000000 --- a/owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/productregistry/v1/logical_product_variant_pb.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/productregistry/v1/logical_product_variant.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/productregistry/v1/lifecycle_state_pb' - - -descriptor_data = "\n=google/cloud/productregistry/v1/logical_product_variant.proto\x12\x1fgoogle.cloud.productregistry.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x35google/cloud/productregistry/v1/lifecycle_state.proto\"\xe6\x02\n\x15LogicalProductVariant\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\r\n\x05title\x18\x02 \x01(\t\x12M\n\x0flifecycle_state\x18\x03 \x01(\x0e\x32/.google.cloud.productregistry.v1.LifecycleStateB\x03\xe0\x41\x03\x12\x15\n\x08replaced\x18\x04 \x01(\x08\x42\x03\xe0\x41\x03\x12\x1e\n\x0breplacement\x18\x05 \x01(\tB\t\xe0\x41\x03\xfa\x41\x03\n\x01*:\xa4\x01\xea\x41\xa0\x01\n9cloudproductregistry.googleapis.com/LogicalProductVariant\x12\x34logicalProducts/{logical_product}/variants/{variant}*\x16logicalProductVariants2\x15logicalProductVariantB\xfb\x01\n#com.google.cloud.productregistry.v1B\x1aLogicalProductVariantProtoP\x01ZMcloud.google.com/go/productregistry/apiv1/productregistrypb;productregistrypb\xaa\x02\x1fGoogle.Cloud.ProductRegistry.V1\xca\x02\x1fGoogle\\Cloud\\ProductRegistry\\V1\xea\x02\"Google::Cloud::ProductRegistry::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module ProductRegistry - module V1 - LogicalProductVariant = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.productregistry.v1.LogicalProductVariant").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/productregistry/v1/product_suite_pb.rb b/owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/productregistry/v1/product_suite_pb.rb deleted file mode 100644 index eb5a5e3d127c..000000000000 --- a/owl-bot-staging/google-cloud-product_registry-v1/lib/google/cloud/productregistry/v1/product_suite_pb.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/productregistry/v1/product_suite.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' - - -descriptor_data = "\n3google/cloud/productregistry/v1/product_suite.proto\x12\x1fgoogle.cloud.productregistry.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xb0\x02\n\x0cProductSuite\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\r\n\x05title\x18\x02 \x01(\t\x12T\n\x10logical_products\x18\x03 \x03(\tB:\xe0\x41\x03\xfa\x41\x34\n2cloudproductregistry.googleapis.com/LogicalProduct\x12\x15\n\x08replaced\x18\x04 \x01(\x08\x42\x03\xe0\x41\x03\x12\x1e\n\x0breplacement\x18\x05 \x01(\tB\t\xe0\x41\x03\xfa\x41\x03\n\x01*:q\xea\x41n\n0cloudproductregistry.googleapis.com/ProductSuite\x12\x1dproductSuites/{product_suite}*\rproductSuites2\x0cproductSuiteB\xf2\x01\n#com.google.cloud.productregistry.v1B\x11ProductSuiteProtoP\x01ZMcloud.google.com/go/productregistry/apiv1/productregistrypb;productregistrypb\xaa\x02\x1fGoogle.Cloud.ProductRegistry.V1\xca\x02\x1fGoogle\\Cloud\\ProductRegistry\\V1\xea\x02\"Google::Cloud::ProductRegistry::V1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module ProductRegistry - module V1 - ProductSuite = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.productregistry.v1.ProductSuite").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-product_registry-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-product_registry-v1/proto_docs/README.md deleted file mode 100644 index b3eedc5e8699..000000000000 --- a/owl-bot-staging/google-cloud-product_registry-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Cloud Product Registry V1 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-product_registry-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-product_registry-v1/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-cloud-product_registry-v1/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-product_registry-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-product_registry-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-product_registry-v1/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-product_registry-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-product_registry-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-product_registry-v1/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-product_registry-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-product_registry-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-product_registry-v1/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-product_registry-v1/proto_docs/google/cloud/productregistry/v1/cloud_product_registry_read_service.rb b/owl-bot-staging/google-cloud-product_registry-v1/proto_docs/google/cloud/productregistry/v1/cloud_product_registry_read_service.rb deleted file mode 100644 index a6c22408d98c..000000000000 --- a/owl-bot-staging/google-cloud-product_registry-v1/proto_docs/google/cloud/productregistry/v1/cloud_product_registry_read_service.rb +++ /dev/null @@ -1,196 +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 ProductRegistry - module V1 - # Request message for GetProductSuite. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the ProductSuite to retrieve. - # Format: productSuites/\\{product_suite} - class GetProductSuiteRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for GetLogicalProduct. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the LogicalProduct to retrieve. - # Format: logicalProducts/\\{logical_product} - class GetLogicalProductRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for GetLogicalProductVariant. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the LogicalProductVariant to retrieve. - # Format: logicalProducts/\\{logical_product}/variants/\\{variant} - class GetLogicalProductVariantRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for ListProductSuites. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of suites to return. The service may return - # fewer than this value. If unspecified, at most 100 suites will be returned. - # The maximum value is 500; values above 500 will be coerced to 500. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous `ListProductSuites` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListProductSuites` must - # match the call that provided the page token. - class ListProductSuitesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for ListProductSuites. - # @!attribute [rw] product_suites - # @return [::Array<::Google::Cloud::ProductRegistry::V1::ProductSuite>] - # Matched ProductSuites - # @!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 ListProductSuitesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for ListLogicalProducts. - # @!attribute [rw] filter - # @return [::String] - # Optional. The filter expression for listing logical products. - # Filter syntax: https://google.aip.dev/160 - # Supported fields: suite_id - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of logical products to return. The service may - # return fewer than this value. If unspecified, at most 100 logical products - # will be returned. The maximum value is 500; values above 500 will be - # coerced to 500. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous `ListLogicalProducts` - # call. Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListLogicalProducts` - # must match the call that provided the page token. - class ListLogicalProductsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for ListLogicalProducts. - # @!attribute [rw] logical_products - # @return [::Array<::Google::Cloud::ProductRegistry::V1::LogicalProduct>] - # Matched LogicalProducts - # @!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 ListLogicalProductsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for ListLogicalProductVariants. - # @!attribute [rw] parent - # @return [::String] - # Required. Parent logical product id. - # Format: logicalProducts/\\{logical_product} - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of logical product variants to return. The - # service may return fewer than this value. If unspecified, at most 100 - # logical product variants will be returned. The maximum value is 500; values - # above 500 will be coerced to 500. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous - # `ListLogicalProductVariants` call. Provide this to retrieve the subsequent - # page. - # - # When paginating, all other parameters provided to - # `ListLogicalProductVariants` must match the call that provided the page - # token. - class ListLogicalProductVariantsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for ListLogicalProductVariants. - # @!attribute [rw] logical_product_variants - # @return [::Array<::Google::Cloud::ProductRegistry::V1::LogicalProductVariant>] - # Matched LogicalProductVariants - # @!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 ListLogicalProductVariantsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for LookupEntity. - # @!attribute [rw] lookup_uri - # @return [::String] - # Required. Entity uri to look up. - # Supported Formats: - # logicalProducts/\\{logical_product} - # logicalProducts/\\{logical_product}/variants/\\{variant} - # productSuites/\\{product_suite} - class LookupEntityRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for LookupEntity. - # @!attribute [rw] logical_product - # @return [::Google::Cloud::ProductRegistry::V1::LogicalProduct] - # Matched LogicalProduct. - # - # Note: The following fields are mutually exclusive: `logical_product`, `logical_product_variant`, `product_suite`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] logical_product_variant - # @return [::Google::Cloud::ProductRegistry::V1::LogicalProductVariant] - # Matched LogicalProductVariant. - # - # Note: The following fields are mutually exclusive: `logical_product_variant`, `logical_product`, `product_suite`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] product_suite - # @return [::Google::Cloud::ProductRegistry::V1::ProductSuite] - # Matched ProductSuite. - # - # Note: The following fields are mutually exclusive: `product_suite`, `logical_product`, `logical_product_variant`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class LookupEntityResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-product_registry-v1/proto_docs/google/cloud/productregistry/v1/lifecycle_state.rb b/owl-bot-staging/google-cloud-product_registry-v1/proto_docs/google/cloud/productregistry/v1/lifecycle_state.rb deleted file mode 100644 index 449d8d54bcd6..000000000000 --- a/owl-bot-staging/google-cloud-product_registry-v1/proto_docs/google/cloud/productregistry/v1/lifecycle_state.rb +++ /dev/null @@ -1,48 +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 ProductRegistry - module V1 - # Enum representing the lifecycle state of the underlying entity. - module LifecycleState - # The default value. This value is used if the lifecycle state is not set. - LIFECYCLE_STATE_UNSPECIFIED = 0 - - # The entity is in Public Preview. It is available to all - # customers, but may not be feature-complete or have full support guarantees. - LIFECYCLE_STATE_PUBLIC_PREVIEW = 1 - - # The entity is in Private General Availability. It is fully - # supported and stable, but only available to a select group of customers. - LIFECYCLE_STATE_PRIVATE_GA = 2 - - # The entity is Generally Available. It is fully supported, stable, and - # available to all customers. - LIFECYCLE_STATE_GA = 3 - - # The entity is deprecated. It is no longer recommended for use - # and may be removed in a future version. - LIFECYCLE_STATE_DEPRECATED = 4 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-product_registry-v1/proto_docs/google/cloud/productregistry/v1/logical_product.rb b/owl-bot-staging/google-cloud-product_registry-v1/proto_docs/google/cloud/productregistry/v1/logical_product.rb deleted file mode 100644 index 9deae4028d05..000000000000 --- a/owl-bot-staging/google-cloud-product_registry-v1/proto_docs/google/cloud/productregistry/v1/logical_product.rb +++ /dev/null @@ -1,64 +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 ProductRegistry - module V1 - # Represents an independent service offering that can be - # provisioned by a customer. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the LogicalProduct. - # Format: logicalProducts/\\{logical_product}. - # @!attribute [rw] title - # @return [::String] - # Display name of the LogicalProduct. - # @!attribute [rw] product_suite - # @return [::String] - # Product suite associated with the logical product. - # Format: productSuites/\\{product_suite}. - # @!attribute [r] variants - # @return [::Array<::String>] - # Output only. Child variant resource references. - # Format: logicalProducts/\\{logical_product}/variants/\\{variant} - # @!attribute [r] lifecycle_state - # @return [::Google::Cloud::ProductRegistry::V1::LifecycleState] - # Output only. Current Lifecycle state of the logical product. - # @!attribute [r] replaced - # @return [::Boolean] - # Output only. Indicates whether the logical product has been replaced. If - # `false`, the product is active. If `true`, the product has been replaced by - # another type, and the `replacement` field contains the resource name of - # that replacement. - # @!attribute [r] replacement - # @return [::String] - # Output only. The resource name of the Logical Entity that the logical - # product is replaced by. This field is only populated when this logical - # product is replaced by some other type. Eg: - # logicalProducts/\\{logical_product}/variants/\\{variant}, - # productSuites/\\{product_suite}, etc. - class LogicalProduct - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-product_registry-v1/proto_docs/google/cloud/productregistry/v1/logical_product_variant.rb b/owl-bot-staging/google-cloud-product_registry-v1/proto_docs/google/cloud/productregistry/v1/logical_product_variant.rb deleted file mode 100644 index 11bd5c42f169..000000000000 --- a/owl-bot-staging/google-cloud-product_registry-v1/proto_docs/google/cloud/productregistry/v1/logical_product_variant.rb +++ /dev/null @@ -1,57 +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 ProductRegistry - module V1 - # Represents a distinct offering derived from a primary product that retains - # core functionalities but offers specialized features for a specific market - # segment. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the LogicalProductVariant. - # Format: - # logicalProducts/\\{logical_product}/variants/\\{variant} - # @!attribute [rw] title - # @return [::String] - # Display name of the LogicalProductVariant. - # @!attribute [r] lifecycle_state - # @return [::Google::Cloud::ProductRegistry::V1::LifecycleState] - # Output only. Current Lifecycle state of the logical product variant. - # @!attribute [r] replaced - # @return [::Boolean] - # Output only. Indicates whether the logical product variant has been - # replaced. If `false`, the variant is active. If `true`, the variant has - # been replaced by another type, and the `replacement` field contains the - # resource name of that replacement. - # @!attribute [r] replacement - # @return [::String] - # Output only. The resource name of the Logical Entity that the logical - # product variant is replaced by. This field is only populated when this - # logical product variant is replaced by some other type. Eg: - # logicalProducts/\\{logical_product}, productSuites/\\{product_suite}, etc. - class LogicalProductVariant - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-product_registry-v1/proto_docs/google/cloud/productregistry/v1/product_suite.rb b/owl-bot-staging/google-cloud-product_registry-v1/proto_docs/google/cloud/productregistry/v1/product_suite.rb deleted file mode 100644 index 6803430cec21..000000000000 --- a/owl-bot-staging/google-cloud-product_registry-v1/proto_docs/google/cloud/productregistry/v1/product_suite.rb +++ /dev/null @@ -1,56 +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 ProductRegistry - module V1 - # Represents a unified grouping of products sharing a common brand and market - # positioning. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the ProductSuite. - # Format: productSuites/\\{product_suite} - # @!attribute [rw] title - # @return [::String] - # Title of the ProductSuite. - # @!attribute [r] logical_products - # @return [::Array<::String>] - # Output only. LogicalProducts under this suite. - # Format: logicalProducts/\\{logical_product} - # @!attribute [r] replaced - # @return [::Boolean] - # Output only. Indicates whether the product suite has been replaced. If - # `false`, the product suite is active. If `true`, the product suite has been - # replaced by another type, and the `replacement` field contains the resource - # name of that replacement. - # @!attribute [r] replacement - # @return [::String] - # Output only. The resource name of the Logical Entity that the product suite - # is replaced by. This field is only populated when this product suite is - # replaced by some other type. Eg: logicalProducts/\\{logical_product}, - # logicalProducts/\\{logical_product}/variants/\\{variant}, etc. - class ProductSuite - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-product_registry-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-product_registry-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-product_registry-v1/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-product_registry-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-product_registry-v1/snippets/Gemfile deleted file mode 100644 index baabd4704165..000000000000 --- a/owl-bot-staging/google-cloud-product_registry-v1/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-product_registry-v1", path: "../" -else - gem "google-cloud-product_registry-v1" -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-product_registry-v1/snippets/cloud_product_registry_read_service/get_logical_product.rb b/owl-bot-staging/google-cloud-product_registry-v1/snippets/cloud_product_registry_read_service/get_logical_product.rb deleted file mode 100644 index 2bba9db7318d..000000000000 --- a/owl-bot-staging/google-cloud-product_registry-v1/snippets/cloud_product_registry_read_service/get_logical_product.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 cloudproductregistry_v1_generated_CloudProductRegistryReadService_GetLogicalProduct_sync] -require "google/cloud/product_registry/v1" - -## -# Snippet for the get_logical_product call in the CloudProductRegistryReadService 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::ProductRegistry::V1::CloudProductRegistryReadService::Client#get_logical_product. -# -def get_logical_product - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ProductRegistry::V1::GetLogicalProductRequest.new - - # Call the get_logical_product method. - result = client.get_logical_product request - - # The returned object is of type Google::Cloud::ProductRegistry::V1::LogicalProduct. - p result -end -# [END cloudproductregistry_v1_generated_CloudProductRegistryReadService_GetLogicalProduct_sync] diff --git a/owl-bot-staging/google-cloud-product_registry-v1/snippets/cloud_product_registry_read_service/get_logical_product_variant.rb b/owl-bot-staging/google-cloud-product_registry-v1/snippets/cloud_product_registry_read_service/get_logical_product_variant.rb deleted file mode 100644 index 1b873cc010fe..000000000000 --- a/owl-bot-staging/google-cloud-product_registry-v1/snippets/cloud_product_registry_read_service/get_logical_product_variant.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 cloudproductregistry_v1_generated_CloudProductRegistryReadService_GetLogicalProductVariant_sync] -require "google/cloud/product_registry/v1" - -## -# Snippet for the get_logical_product_variant call in the CloudProductRegistryReadService 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::ProductRegistry::V1::CloudProductRegistryReadService::Client#get_logical_product_variant. -# -def get_logical_product_variant - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ProductRegistry::V1::GetLogicalProductVariantRequest.new - - # Call the get_logical_product_variant method. - result = client.get_logical_product_variant request - - # The returned object is of type Google::Cloud::ProductRegistry::V1::LogicalProductVariant. - p result -end -# [END cloudproductregistry_v1_generated_CloudProductRegistryReadService_GetLogicalProductVariant_sync] diff --git a/owl-bot-staging/google-cloud-product_registry-v1/snippets/cloud_product_registry_read_service/get_product_suite.rb b/owl-bot-staging/google-cloud-product_registry-v1/snippets/cloud_product_registry_read_service/get_product_suite.rb deleted file mode 100644 index b91b896b3ccf..000000000000 --- a/owl-bot-staging/google-cloud-product_registry-v1/snippets/cloud_product_registry_read_service/get_product_suite.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 cloudproductregistry_v1_generated_CloudProductRegistryReadService_GetProductSuite_sync] -require "google/cloud/product_registry/v1" - -## -# Snippet for the get_product_suite call in the CloudProductRegistryReadService 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::ProductRegistry::V1::CloudProductRegistryReadService::Client#get_product_suite. -# -def get_product_suite - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ProductRegistry::V1::GetProductSuiteRequest.new - - # Call the get_product_suite method. - result = client.get_product_suite request - - # The returned object is of type Google::Cloud::ProductRegistry::V1::ProductSuite. - p result -end -# [END cloudproductregistry_v1_generated_CloudProductRegistryReadService_GetProductSuite_sync] diff --git a/owl-bot-staging/google-cloud-product_registry-v1/snippets/cloud_product_registry_read_service/list_logical_product_variants.rb b/owl-bot-staging/google-cloud-product_registry-v1/snippets/cloud_product_registry_read_service/list_logical_product_variants.rb deleted file mode 100644 index 88e42fb16025..000000000000 --- a/owl-bot-staging/google-cloud-product_registry-v1/snippets/cloud_product_registry_read_service/list_logical_product_variants.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 cloudproductregistry_v1_generated_CloudProductRegistryReadService_ListLogicalProductVariants_sync] -require "google/cloud/product_registry/v1" - -## -# Snippet for the list_logical_product_variants call in the CloudProductRegistryReadService 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::ProductRegistry::V1::CloudProductRegistryReadService::Client#list_logical_product_variants. -# -def list_logical_product_variants - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ProductRegistry::V1::ListLogicalProductVariantsRequest.new - - # Call the list_logical_product_variants method. - result = client.list_logical_product_variants 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::ProductRegistry::V1::LogicalProductVariant. - p item - end -end -# [END cloudproductregistry_v1_generated_CloudProductRegistryReadService_ListLogicalProductVariants_sync] diff --git a/owl-bot-staging/google-cloud-product_registry-v1/snippets/cloud_product_registry_read_service/list_logical_products.rb b/owl-bot-staging/google-cloud-product_registry-v1/snippets/cloud_product_registry_read_service/list_logical_products.rb deleted file mode 100644 index 5d8927e70ce8..000000000000 --- a/owl-bot-staging/google-cloud-product_registry-v1/snippets/cloud_product_registry_read_service/list_logical_products.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 cloudproductregistry_v1_generated_CloudProductRegistryReadService_ListLogicalProducts_sync] -require "google/cloud/product_registry/v1" - -## -# Snippet for the list_logical_products call in the CloudProductRegistryReadService 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::ProductRegistry::V1::CloudProductRegistryReadService::Client#list_logical_products. -# -def list_logical_products - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ProductRegistry::V1::ListLogicalProductsRequest.new - - # Call the list_logical_products method. - result = client.list_logical_products 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::ProductRegistry::V1::LogicalProduct. - p item - end -end -# [END cloudproductregistry_v1_generated_CloudProductRegistryReadService_ListLogicalProducts_sync] diff --git a/owl-bot-staging/google-cloud-product_registry-v1/snippets/cloud_product_registry_read_service/list_product_suites.rb b/owl-bot-staging/google-cloud-product_registry-v1/snippets/cloud_product_registry_read_service/list_product_suites.rb deleted file mode 100644 index eeeb222e0cd9..000000000000 --- a/owl-bot-staging/google-cloud-product_registry-v1/snippets/cloud_product_registry_read_service/list_product_suites.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 cloudproductregistry_v1_generated_CloudProductRegistryReadService_ListProductSuites_sync] -require "google/cloud/product_registry/v1" - -## -# Snippet for the list_product_suites call in the CloudProductRegistryReadService 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::ProductRegistry::V1::CloudProductRegistryReadService::Client#list_product_suites. -# -def list_product_suites - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ProductRegistry::V1::ListProductSuitesRequest.new - - # Call the list_product_suites method. - result = client.list_product_suites 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::ProductRegistry::V1::ProductSuite. - p item - end -end -# [END cloudproductregistry_v1_generated_CloudProductRegistryReadService_ListProductSuites_sync] diff --git a/owl-bot-staging/google-cloud-product_registry-v1/snippets/cloud_product_registry_read_service/lookup_entity.rb b/owl-bot-staging/google-cloud-product_registry-v1/snippets/cloud_product_registry_read_service/lookup_entity.rb deleted file mode 100644 index bd90b7a12bc2..000000000000 --- a/owl-bot-staging/google-cloud-product_registry-v1/snippets/cloud_product_registry_read_service/lookup_entity.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 cloudproductregistry_v1_generated_CloudProductRegistryReadService_LookupEntity_sync] -require "google/cloud/product_registry/v1" - -## -# Snippet for the lookup_entity call in the CloudProductRegistryReadService 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::ProductRegistry::V1::CloudProductRegistryReadService::Client#lookup_entity. -# -def lookup_entity - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::ProductRegistry::V1::LookupEntityRequest.new - - # Call the lookup_entity method. - result = client.lookup_entity request - - # The returned object is of type Google::Cloud::ProductRegistry::V1::LookupEntityResponse. - p result -end -# [END cloudproductregistry_v1_generated_CloudProductRegistryReadService_LookupEntity_sync] diff --git a/owl-bot-staging/google-cloud-product_registry-v1/snippets/snippet_metadata_google.cloud.productregistry.v1.json b/owl-bot-staging/google-cloud-product_registry-v1/snippets/snippet_metadata_google.cloud.productregistry.v1.json deleted file mode 100644 index 9981334338aa..000000000000 --- a/owl-bot-staging/google-cloud-product_registry-v1/snippets/snippet_metadata_google.cloud.productregistry.v1.json +++ /dev/null @@ -1,295 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-product_registry-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.productregistry.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "cloudproductregistry_v1_generated_CloudProductRegistryReadService_GetProductSuite_sync", - "title": "Snippet for the get_product_suite call in the CloudProductRegistryReadService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client#get_product_suite.", - "file": "cloud_product_registry_read_service/get_product_suite.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_product_suite", - "full_name": "::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client#get_product_suite", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ProductRegistry::V1::GetProductSuiteRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ProductRegistry::V1::ProductSuite", - "client": { - "short_name": "CloudProductRegistryReadService::Client", - "full_name": "::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client" - }, - "method": { - "short_name": "GetProductSuite", - "full_name": "google.cloud.productregistry.v1.CloudProductRegistryReadService.GetProductSuite", - "service": { - "short_name": "CloudProductRegistryReadService", - "full_name": "google.cloud.productregistry.v1.CloudProductRegistryReadService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudproductregistry_v1_generated_CloudProductRegistryReadService_ListProductSuites_sync", - "title": "Snippet for the list_product_suites call in the CloudProductRegistryReadService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client#list_product_suites.", - "file": "cloud_product_registry_read_service/list_product_suites.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_product_suites", - "full_name": "::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client#list_product_suites", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ProductRegistry::V1::ListProductSuitesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ProductRegistry::V1::ListProductSuitesResponse", - "client": { - "short_name": "CloudProductRegistryReadService::Client", - "full_name": "::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client" - }, - "method": { - "short_name": "ListProductSuites", - "full_name": "google.cloud.productregistry.v1.CloudProductRegistryReadService.ListProductSuites", - "service": { - "short_name": "CloudProductRegistryReadService", - "full_name": "google.cloud.productregistry.v1.CloudProductRegistryReadService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudproductregistry_v1_generated_CloudProductRegistryReadService_GetLogicalProduct_sync", - "title": "Snippet for the get_logical_product call in the CloudProductRegistryReadService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client#get_logical_product.", - "file": "cloud_product_registry_read_service/get_logical_product.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_logical_product", - "full_name": "::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client#get_logical_product", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ProductRegistry::V1::GetLogicalProductRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ProductRegistry::V1::LogicalProduct", - "client": { - "short_name": "CloudProductRegistryReadService::Client", - "full_name": "::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client" - }, - "method": { - "short_name": "GetLogicalProduct", - "full_name": "google.cloud.productregistry.v1.CloudProductRegistryReadService.GetLogicalProduct", - "service": { - "short_name": "CloudProductRegistryReadService", - "full_name": "google.cloud.productregistry.v1.CloudProductRegistryReadService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudproductregistry_v1_generated_CloudProductRegistryReadService_ListLogicalProducts_sync", - "title": "Snippet for the list_logical_products call in the CloudProductRegistryReadService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client#list_logical_products.", - "file": "cloud_product_registry_read_service/list_logical_products.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_logical_products", - "full_name": "::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client#list_logical_products", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ProductRegistry::V1::ListLogicalProductsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ProductRegistry::V1::ListLogicalProductsResponse", - "client": { - "short_name": "CloudProductRegistryReadService::Client", - "full_name": "::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client" - }, - "method": { - "short_name": "ListLogicalProducts", - "full_name": "google.cloud.productregistry.v1.CloudProductRegistryReadService.ListLogicalProducts", - "service": { - "short_name": "CloudProductRegistryReadService", - "full_name": "google.cloud.productregistry.v1.CloudProductRegistryReadService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudproductregistry_v1_generated_CloudProductRegistryReadService_GetLogicalProductVariant_sync", - "title": "Snippet for the get_logical_product_variant call in the CloudProductRegistryReadService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client#get_logical_product_variant.", - "file": "cloud_product_registry_read_service/get_logical_product_variant.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_logical_product_variant", - "full_name": "::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client#get_logical_product_variant", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ProductRegistry::V1::GetLogicalProductVariantRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ProductRegistry::V1::LogicalProductVariant", - "client": { - "short_name": "CloudProductRegistryReadService::Client", - "full_name": "::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client" - }, - "method": { - "short_name": "GetLogicalProductVariant", - "full_name": "google.cloud.productregistry.v1.CloudProductRegistryReadService.GetLogicalProductVariant", - "service": { - "short_name": "CloudProductRegistryReadService", - "full_name": "google.cloud.productregistry.v1.CloudProductRegistryReadService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudproductregistry_v1_generated_CloudProductRegistryReadService_ListLogicalProductVariants_sync", - "title": "Snippet for the list_logical_product_variants call in the CloudProductRegistryReadService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client#list_logical_product_variants.", - "file": "cloud_product_registry_read_service/list_logical_product_variants.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_logical_product_variants", - "full_name": "::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client#list_logical_product_variants", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ProductRegistry::V1::ListLogicalProductVariantsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ProductRegistry::V1::ListLogicalProductVariantsResponse", - "client": { - "short_name": "CloudProductRegistryReadService::Client", - "full_name": "::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client" - }, - "method": { - "short_name": "ListLogicalProductVariants", - "full_name": "google.cloud.productregistry.v1.CloudProductRegistryReadService.ListLogicalProductVariants", - "service": { - "short_name": "CloudProductRegistryReadService", - "full_name": "google.cloud.productregistry.v1.CloudProductRegistryReadService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudproductregistry_v1_generated_CloudProductRegistryReadService_LookupEntity_sync", - "title": "Snippet for the lookup_entity call in the CloudProductRegistryReadService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client#lookup_entity.", - "file": "cloud_product_registry_read_service/lookup_entity.rb", - "language": "RUBY", - "client_method": { - "short_name": "lookup_entity", - "full_name": "::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client#lookup_entity", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::ProductRegistry::V1::LookupEntityRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::ProductRegistry::V1::LookupEntityResponse", - "client": { - "short_name": "CloudProductRegistryReadService::Client", - "full_name": "::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client" - }, - "method": { - "short_name": "LookupEntity", - "full_name": "google.cloud.productregistry.v1.CloudProductRegistryReadService.LookupEntity", - "service": { - "short_name": "CloudProductRegistryReadService", - "full_name": "google.cloud.productregistry.v1.CloudProductRegistryReadService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - } - ] -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-product_registry-v1/test/google/cloud/product_registry/v1/cloud_product_registry_read_service_paths_test.rb b/owl-bot-staging/google-cloud-product_registry-v1/test/google/cloud/product_registry/v1/cloud_product_registry_read_service_paths_test.rb deleted file mode 100644 index 8ff414ea1ebb..000000000000 --- a/owl-bot-staging/google-cloud-product_registry-v1/test/google/cloud/product_registry/v1/cloud_product_registry_read_service_paths_test.rb +++ /dev/null @@ -1,79 +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/product_registry/v1/cloud_product_registry_read_service" - -class ::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::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_logical_product_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.logical_product_path logical_product: "value0" - assert_equal "logicalProducts/value0", path - end - end - - def test_logical_product_variant_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.logical_product_variant_path logical_product: "value0", variant: "value1" - assert_equal "logicalProducts/value0/variants/value1", path - end - end - - def test_product_suite_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.product_suite_path product_suite: "value0" - assert_equal "productSuites/value0", path - end - end -end diff --git a/owl-bot-staging/google-cloud-product_registry-v1/test/google/cloud/product_registry/v1/cloud_product_registry_read_service_rest_test.rb b/owl-bot-staging/google-cloud-product_registry-v1/test/google/cloud/product_registry/v1/cloud_product_registry_read_service_rest_test.rb deleted file mode 100644 index 66783fb7cf35..000000000000 --- a/owl-bot-staging/google-cloud-product_registry-v1/test/google/cloud/product_registry/v1/cloud_product_registry_read_service_rest_test.rb +++ /dev/null @@ -1,482 +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/productregistry/v1/cloud_product_registry_read_service_pb" -require "google/cloud/product_registry/v1/cloud_product_registry_read_service/rest" - - -class ::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::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_get_product_suite - # Create test objects. - client_result = ::Google::Cloud::ProductRegistry::V1::ProductSuite.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_product_suite_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::ProductRegistry::V1::CloudProductRegistryReadService::Rest::ServiceStub.stub :transcode_get_product_suite_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_product_suite_client_stub do - # Create client - c = ::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_product_suite({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_product_suite name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_product_suite ::Google::Cloud::ProductRegistry::V1::GetProductSuiteRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_product_suite({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_product_suite(::Google::Cloud::ProductRegistry::V1::GetProductSuiteRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_product_suite_client_stub.call_count - end - end - end - - def test_list_product_suites - # Create test objects. - client_result = ::Google::Cloud::ProductRegistry::V1::ListProductSuitesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - page_size = 42 - page_token = "hello world" - - list_product_suites_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::ProductRegistry::V1::CloudProductRegistryReadService::Rest::ServiceStub.stub :transcode_list_product_suites_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_product_suites_client_stub do - # Create client - c = ::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_product_suites({ page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_product_suites page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_product_suites ::Google::Cloud::ProductRegistry::V1::ListProductSuitesRequest.new(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_product_suites({ 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_product_suites(::Google::Cloud::ProductRegistry::V1::ListProductSuitesRequest.new(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_product_suites_client_stub.call_count - end - end - end - - def test_get_logical_product - # Create test objects. - client_result = ::Google::Cloud::ProductRegistry::V1::LogicalProduct.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_logical_product_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::ProductRegistry::V1::CloudProductRegistryReadService::Rest::ServiceStub.stub :transcode_get_logical_product_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_logical_product_client_stub do - # Create client - c = ::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_logical_product({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_logical_product name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_logical_product ::Google::Cloud::ProductRegistry::V1::GetLogicalProductRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_logical_product({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_logical_product(::Google::Cloud::ProductRegistry::V1::GetLogicalProductRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_logical_product_client_stub.call_count - end - end - end - - def test_list_logical_products - # Create test objects. - client_result = ::Google::Cloud::ProductRegistry::V1::ListLogicalProductsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - filter = "hello world" - page_size = 42 - page_token = "hello world" - - list_logical_products_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::ProductRegistry::V1::CloudProductRegistryReadService::Rest::ServiceStub.stub :transcode_list_logical_products_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_logical_products_client_stub do - # Create client - c = ::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_logical_products({ filter: filter, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.list_logical_products filter: filter, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.list_logical_products ::Google::Cloud::ProductRegistry::V1::ListLogicalProductsRequest.new(filter: filter, 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_logical_products({ filter: filter, 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_logical_products(::Google::Cloud::ProductRegistry::V1::ListLogicalProductsRequest.new(filter: filter, 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_logical_products_client_stub.call_count - end - end - end - - def test_get_logical_product_variant - # Create test objects. - client_result = ::Google::Cloud::ProductRegistry::V1::LogicalProductVariant.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_logical_product_variant_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::ProductRegistry::V1::CloudProductRegistryReadService::Rest::ServiceStub.stub :transcode_get_logical_product_variant_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_logical_product_variant_client_stub do - # Create client - c = ::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_logical_product_variant({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_logical_product_variant name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_logical_product_variant ::Google::Cloud::ProductRegistry::V1::GetLogicalProductVariantRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_logical_product_variant({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_logical_product_variant(::Google::Cloud::ProductRegistry::V1::GetLogicalProductVariantRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_logical_product_variant_client_stub.call_count - end - end - end - - def test_list_logical_product_variants - # Create test objects. - client_result = ::Google::Cloud::ProductRegistry::V1::ListLogicalProductVariantsResponse.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_logical_product_variants_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::ProductRegistry::V1::CloudProductRegistryReadService::Rest::ServiceStub.stub :transcode_list_logical_product_variants_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_logical_product_variants_client_stub do - # Create client - c = ::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_logical_product_variants({ 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_logical_product_variants 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_logical_product_variants ::Google::Cloud::ProductRegistry::V1::ListLogicalProductVariantsRequest.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_logical_product_variants({ 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_logical_product_variants(::Google::Cloud::ProductRegistry::V1::ListLogicalProductVariantsRequest.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_logical_product_variants_client_stub.call_count - end - end - end - - def test_lookup_entity - # Create test objects. - client_result = ::Google::Cloud::ProductRegistry::V1::LookupEntityResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - lookup_uri = "hello world" - - lookup_entity_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::ProductRegistry::V1::CloudProductRegistryReadService::Rest::ServiceStub.stub :transcode_lookup_entity_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, lookup_entity_client_stub do - # Create client - c = ::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.lookup_entity({ lookup_uri: lookup_uri }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.lookup_entity lookup_uri: lookup_uri do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.lookup_entity ::Google::Cloud::ProductRegistry::V1::LookupEntityRequest.new(lookup_uri: lookup_uri) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.lookup_entity({ lookup_uri: lookup_uri }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.lookup_entity(::Google::Cloud::ProductRegistry::V1::LookupEntityRequest.new(lookup_uri: lookup_uri), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, lookup_entity_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::ProductRegistry::V1::CloudProductRegistryReadService::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::ProductRegistry::V1::CloudProductRegistryReadService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-product_registry-v1/test/google/cloud/product_registry/v1/cloud_product_registry_read_service_test.rb b/owl-bot-staging/google-cloud-product_registry-v1/test/google/cloud/product_registry/v1/cloud_product_registry_read_service_test.rb deleted file mode 100644 index c8e9d279cfcb..000000000000 --- a/owl-bot-staging/google-cloud-product_registry-v1/test/google/cloud/product_registry/v1/cloud_product_registry_read_service_test.rb +++ /dev/null @@ -1,535 +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/productregistry/v1/cloud_product_registry_read_service_pb" -require "google/cloud/product_registry/v1/cloud_product_registry_read_service" - -class ::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::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_get_product_suite - # Create GRPC objects. - grpc_response = ::Google::Cloud::ProductRegistry::V1::ProductSuite.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_product_suite_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_product_suite, name - assert_kind_of ::Google::Cloud::ProductRegistry::V1::GetProductSuiteRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_product_suite_client_stub do - # Create client - c = ::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_product_suite({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_product_suite name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_product_suite ::Google::Cloud::ProductRegistry::V1::GetProductSuiteRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_product_suite({ 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_product_suite(::Google::Cloud::ProductRegistry::V1::GetProductSuiteRequest.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_product_suite_client_stub.call_rpc_count - end - end - - def test_list_product_suites - # Create GRPC objects. - grpc_response = ::Google::Cloud::ProductRegistry::V1::ListProductSuitesResponse.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. - page_size = 42 - page_token = "hello world" - - list_product_suites_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_product_suites, name - assert_kind_of ::Google::Cloud::ProductRegistry::V1::ListProductSuitesRequest, request - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_product_suites_client_stub do - # Create client - c = ::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_product_suites({ 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_product_suites 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_product_suites ::Google::Cloud::ProductRegistry::V1::ListProductSuitesRequest.new(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_product_suites({ 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_product_suites(::Google::Cloud::ProductRegistry::V1::ListProductSuitesRequest.new(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_product_suites_client_stub.call_rpc_count - end - end - - def test_get_logical_product - # Create GRPC objects. - grpc_response = ::Google::Cloud::ProductRegistry::V1::LogicalProduct.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_logical_product_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_logical_product, name - assert_kind_of ::Google::Cloud::ProductRegistry::V1::GetLogicalProductRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_logical_product_client_stub do - # Create client - c = ::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_logical_product({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_logical_product name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_logical_product ::Google::Cloud::ProductRegistry::V1::GetLogicalProductRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_logical_product({ 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_logical_product(::Google::Cloud::ProductRegistry::V1::GetLogicalProductRequest.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_logical_product_client_stub.call_rpc_count - end - end - - def test_list_logical_products - # Create GRPC objects. - grpc_response = ::Google::Cloud::ProductRegistry::V1::ListLogicalProductsResponse.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. - filter = "hello world" - page_size = 42 - page_token = "hello world" - - list_logical_products_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_logical_products, name - assert_kind_of ::Google::Cloud::ProductRegistry::V1::ListLogicalProductsRequest, request - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_logical_products_client_stub do - # Create client - c = ::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_logical_products({ filter: filter, 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_logical_products filter: filter, 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_logical_products ::Google::Cloud::ProductRegistry::V1::ListLogicalProductsRequest.new(filter: filter, 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_logical_products({ filter: filter, 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_logical_products(::Google::Cloud::ProductRegistry::V1::ListLogicalProductsRequest.new(filter: filter, 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_logical_products_client_stub.call_rpc_count - end - end - - def test_get_logical_product_variant - # Create GRPC objects. - grpc_response = ::Google::Cloud::ProductRegistry::V1::LogicalProductVariant.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_logical_product_variant_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_logical_product_variant, name - assert_kind_of ::Google::Cloud::ProductRegistry::V1::GetLogicalProductVariantRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_logical_product_variant_client_stub do - # Create client - c = ::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_logical_product_variant({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_logical_product_variant name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_logical_product_variant ::Google::Cloud::ProductRegistry::V1::GetLogicalProductVariantRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_logical_product_variant({ 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_logical_product_variant(::Google::Cloud::ProductRegistry::V1::GetLogicalProductVariantRequest.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_logical_product_variant_client_stub.call_rpc_count - end - end - - def test_list_logical_product_variants - # Create GRPC objects. - grpc_response = ::Google::Cloud::ProductRegistry::V1::ListLogicalProductVariantsResponse.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_logical_product_variants_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_logical_product_variants, name - assert_kind_of ::Google::Cloud::ProductRegistry::V1::ListLogicalProductVariantsRequest, 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_logical_product_variants_client_stub do - # Create client - c = ::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_logical_product_variants({ 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_logical_product_variants 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_logical_product_variants ::Google::Cloud::ProductRegistry::V1::ListLogicalProductVariantsRequest.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_logical_product_variants({ 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_logical_product_variants(::Google::Cloud::ProductRegistry::V1::ListLogicalProductVariantsRequest.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_logical_product_variants_client_stub.call_rpc_count - end - end - - def test_lookup_entity - # Create GRPC objects. - grpc_response = ::Google::Cloud::ProductRegistry::V1::LookupEntityResponse.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. - lookup_uri = "hello world" - - lookup_entity_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :lookup_entity, name - assert_kind_of ::Google::Cloud::ProductRegistry::V1::LookupEntityRequest, request - assert_equal "hello world", request["lookup_uri"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, lookup_entity_client_stub do - # Create client - c = ::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.lookup_entity({ lookup_uri: lookup_uri }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.lookup_entity lookup_uri: lookup_uri do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.lookup_entity ::Google::Cloud::ProductRegistry::V1::LookupEntityRequest.new(lookup_uri: lookup_uri) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.lookup_entity({ lookup_uri: lookup_uri }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.lookup_entity(::Google::Cloud::ProductRegistry::V1::LookupEntityRequest.new(lookup_uri: lookup_uri), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, lookup_entity_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::ProductRegistry::V1::CloudProductRegistryReadService::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::ProductRegistry::V1::CloudProductRegistryReadService::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::ProductRegistry::V1::CloudProductRegistryReadService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::ProductRegistry::V1::CloudProductRegistryReadService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-product_registry-v1/test/helper.rb b/owl-bot-staging/google-cloud-product_registry-v1/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-cloud-product_registry-v1/test/helper.rb +++ /dev/null @@ -1,26 +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 "minitest/autorun" -require "minitest/focus" -require "minitest/mock" -require "minitest/rg" - -require "grpc" - -require "ostruct"