From c934e42fc3de8e4671aac6d24ac9f286d122f846 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Mon, 6 Jul 2026 23:57:07 +0000 Subject: [PATCH 1/2] feat: add support for new signature algorithm in PkixPublicKey SignatureAlgorithm docs: update documentation comments across Binary Authorization v1beta1 messages PiperOrigin-RevId: 943442443 Source-Link: https://github.com/googleapis/googleapis/commit/2b625c91510a2e8320a778bc88af8b65bc4a19a2 Source-Link: https://github.com/googleapis/googleapis-gen/commit/9916e2e735983cbb5e62159b8d507af77f7cf122 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWJpbmFyeV9hdXRob3JpemF0aW9uLXYxYmV0YTEvLk93bEJvdC55YW1sIiwiaCI6Ijk5MTZlMmU3MzU5ODNjYmI1ZTYyMTU5YjhkNTA3YWY3N2Y3Y2YxMjIifQ== --- .../.gitignore | 22 + .../.repo-metadata.json | 19 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 ++ .../CHANGELOG.md | 2 + .../Gemfile | 14 + .../LICENSE.md | 201 +++ .../README.md | 154 +++ .../Rakefile | 169 +++ .../gapic_metadata.json | 67 + ...cloud-binary_authorization-v1beta1.gemspec | 29 + ...ogle-cloud-binary_authorization-v1beta1.rb | 21 + .../cloud/binary_authorization/v1beta1.rb | 46 + .../v1beta1/binauthz_management_service.rb | 61 + .../binauthz_management_service/client.rb | 1154 +++++++++++++++++ .../credentials.rb | 51 + .../binauthz_management_service/paths.rb | 97 ++ .../binauthz_management_service/rest.rb | 59 + .../rest/client.rb | 1070 +++++++++++++++ .../rest/service_stub.rb | 511 ++++++++ .../v1beta1/bindings_override.rb | 110 ++ .../binary_authorization/v1beta1/rest.rb | 39 + .../v1beta1/system_policy.rb | 55 + .../v1beta1/system_policy/client.rb | 493 +++++++ .../v1beta1/system_policy/credentials.rb | 51 + .../v1beta1/system_policy/paths.rb | 66 + .../v1beta1/system_policy/rest.rb | 53 + .../v1beta1/system_policy/rest/client.rb | 451 +++++++ .../system_policy/rest/service_stub.rb | 142 ++ .../binary_authorization/v1beta1/version.rb | 28 + .../continuous_validation_logging_pb.rb | 32 + .../v1beta1/resources_pb.rb | 35 + .../binaryauthorization/v1beta1/service_pb.rb | 36 + .../v1beta1/service_services_pb.rb | 112 ++ .../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 ++++ .../v1beta1/continuous_validation_logging.rb | 201 +++ .../binaryauthorization/v1beta1/resources.rb | 403 ++++++ .../binaryauthorization/v1beta1/service.rb | 153 +++ .../proto_docs/google/protobuf/duration.rb | 98 ++ .../proto_docs/google/protobuf/empty.rb | 34 + .../proto_docs/google/protobuf/field_mask.rb | 229 ++++ .../proto_docs/google/protobuf/timestamp.rb | 127 ++ .../proto_docs/google/type/expr.rb | 75 ++ .../snippets/Gemfile | 32 + .../create_attestor.rb | 47 + .../delete_attestor.rb | 47 + .../get_attestor.rb | 47 + .../binauthz_management_service/get_policy.rb | 47 + .../list_attestors.rb | 51 + .../update_attestor.rb | 47 + .../update_policy.rb | 47 + ...gle.cloud.binaryauthorization.v1beta1.json | 335 +++++ .../system_policy/get_system_policy.rb | 47 + .../binauthz_management_service_paths_test.rb | 82 ++ .../binauthz_management_service_rest_test.rb | 481 +++++++ .../binauthz_management_service_test.rb | 523 ++++++++ .../v1beta1/system_policy_paths_test.rb | 58 + .../v1beta1/system_policy_rest_test.rb | 153 +++ .../v1beta1/system_policy_test.rb | 162 +++ .../test/helper.rb | 26 + 66 files changed, 10177 insertions(+) create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/.gitignore create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/.yardopts create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/Gemfile create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/README.md create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/Rakefile create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/google-cloud-binary_authorization-v1beta1.gemspec create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google-cloud-binary_authorization-v1beta1.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/client.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/bindings_override.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/rest.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/client.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/credentials.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/paths.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/rest.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/version.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binaryauthorization/v1beta1/continuous_validation_logging_pb.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binaryauthorization/v1beta1/resources_pb.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binaryauthorization/v1beta1/service_pb.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binaryauthorization/v1beta1/service_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/cloud/binaryauthorization/v1beta1/continuous_validation_logging.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/cloud/binaryauthorization/v1beta1/resources.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/cloud/binaryauthorization/v1beta1/service.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/type/expr.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/create_attestor.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/delete_attestor.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/get_attestor.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/get_policy.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/list_attestors.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/update_attestor.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/update_policy.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/snippet_metadata_google.cloud.binaryauthorization.v1beta1.json create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/system_policy/get_system_policy.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/binauthz_management_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/binauthz_management_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/binauthz_management_service_test.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/system_policy_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/system_policy_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/system_policy_test.rb create mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/helper.rb diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/.gitignore b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/.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-binary_authorization-v1beta1/.repo-metadata.json b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/.repo-metadata.json new file mode 100644 index 000000000000..4d21ef558c4c --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/.repo-metadata.json @@ -0,0 +1,19 @@ +{ + "api_id": "binaryauthorization.googleapis.com", + "api_shortname": "binaryauthorization", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1beta1/latest", + "distribution_name": "google-cloud-binary_authorization-v1beta1", + "is_cloud": true, + "language": "ruby", + "name": "binaryauthorization", + "name_pretty": "Binary Authorization V1beta1 API", + "product_documentation": "https://cloud.google.com/binary-authorization/", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Binary Authorization is a service on Google Cloud that provides centralized software supply-chain security for applications that run on Google Kubernetes Engine (GKE) and GKE on-prem. Note that google-cloud-binary_authorization-v1beta1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-binary_authorization instead. See the readme for more details.", + "ruby-cloud-env-prefix": "BINARY_AUTHORIZATION", + "ruby-cloud-product-url": "https://cloud.google.com/binary-authorization/", + "ruby-cloud-service-override": "BinauthzManagementServiceV1Beta1=BinauthzManagementService;SystemPolicyV1Beta1=SystemPolicy", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/.rubocop.yml b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/.rubocop.yml new file mode 100644 index 000000000000..7496dd195e5b --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-binary_authorization-v1beta1.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-binary_authorization-v1beta1.rb" diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/.toys.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/.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-binary_authorization-v1beta1/.yardopts b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/.yardopts new file mode 100644 index 000000000000..d1b2fdebca77 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Binary Authorization V1beta1 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-binary_authorization-v1beta1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/AUTHENTICATION.md new file mode 100644 index 000000000000..ab598dfa7e16 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-binary_authorization-v1beta1 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-binary_authorization-v1beta1 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/binary_authorization/v1beta1" + +client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/binary_authorization/v1beta1" + +::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::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-binary_authorization-v1beta1 +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/binary_authorization/v1beta1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::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-binary_authorization-v1beta1/CHANGELOG.md b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/Gemfile b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/Gemfile new file mode 100644 index 000000000000..1d08558908d8 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/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-binary_authorization-v1beta1/LICENSE.md b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/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-binary_authorization-v1beta1/README.md b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/README.md new file mode 100644 index 000000000000..84667672376f --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Binary Authorization V1beta1 API + +The management interface for Binary Authorization, a service that provides policy-based deployment validation and control for images deployed to Google Kubernetes Engine (GKE), Anthos Service Mesh, Anthos Clusters, and Cloud Run. + +Binary Authorization is a service on Google Cloud that provides centralized software supply-chain security for applications that run on Google Kubernetes Engine (GKE) and GKE on-prem. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Binary Authorization V1beta1 API. Most users should consider using +the main client gem, +[google-cloud-binary_authorization](https://rubygems.org/gems/google-cloud-binary_authorization). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-binary_authorization-v1beta1 +``` + +## 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/binaryauthorization.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/binary_authorization/v1beta1" + +client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new +request = ::Google::Cloud::BinaryAuthorization::V1beta1::GetPolicyRequest.new # (request fields as keyword arguments...) +response = client.get_policy request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1beta1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/binary-authorization/) +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/binary_authorization/v1beta1" +require "logger" + +client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::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-binary_authorization`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-binary_authorization-v1beta1`. +_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-binary_authorization`. +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-binary_authorization-v1beta1`. + +### 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-binary_authorization-v1beta1/Rakefile b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/Rakefile new file mode 100644 index 000000000000..1ce7279d8545 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/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-binary_authorization-v1beta1 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["BINARY_AUTHORIZATION_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["BINARY_AUTHORIZATION_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["BINARY_AUTHORIZATION_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 BINARY_AUTHORIZATION_TEST_PROJECT=test123 BINARY_AUTHORIZATION_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/binary_authorization/v1beta1/binauthz_management_service/credentials" + ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["BINARY_AUTHORIZATION_PROJECT"] = project + ENV["BINARY_AUTHORIZATION_TEST_PROJECT"] = project + ENV["BINARY_AUTHORIZATION_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-binary_authorization-v1beta1 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-binary_authorization-v1beta1 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-binary_authorization-v1beta1 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-binary_authorization-v1beta1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-binary_authorization-v1beta1" + header "google-cloud-binary_authorization-v1beta1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-binary_authorization-v1beta1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-binary_authorization-v1beta1 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-binary_authorization-v1beta1 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-binary_authorization-v1beta1 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-binary_authorization-v1beta1/gapic_metadata.json b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/gapic_metadata.json new file mode 100644 index 000000000000..b3053a044eb8 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/gapic_metadata.json @@ -0,0 +1,67 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.binaryauthorization.v1beta1", + "libraryPackage": "::Google::Cloud::BinaryAuthorization::V1beta1", + "services": { + "BinauthzManagementServiceV1Beta1": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client", + "rpcs": { + "GetPolicy": { + "methods": [ + "get_policy" + ] + }, + "UpdatePolicy": { + "methods": [ + "update_policy" + ] + }, + "CreateAttestor": { + "methods": [ + "create_attestor" + ] + }, + "GetAttestor": { + "methods": [ + "get_attestor" + ] + }, + "UpdateAttestor": { + "methods": [ + "update_attestor" + ] + }, + "ListAttestors": { + "methods": [ + "list_attestors" + ] + }, + "DeleteAttestor": { + "methods": [ + "delete_attestor" + ] + } + } + } + } + }, + "SystemPolicyV1Beta1": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Client", + "rpcs": { + "GetSystemPolicy": { + "methods": [ + "get_system_policy" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/google-cloud-binary_authorization-v1beta1.gemspec b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/google-cloud-binary_authorization-v1beta1.gemspec new file mode 100644 index 000000000000..8baa815ccb07 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/google-cloud-binary_authorization-v1beta1.gemspec @@ -0,0 +1,29 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/binary_authorization/v1beta1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-binary_authorization-v1beta1" + gem.version = Google::Cloud::BinaryAuthorization::V1beta1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Binary Authorization is a service on Google Cloud that provides centralized software supply-chain security for applications that run on Google Kubernetes Engine (GKE) and GKE on-prem. Note that google-cloud-binary_authorization-v1beta1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-binary_authorization instead. See the readme for more details." + gem.summary = "The management interface for Binary Authorization, a service that provides policy-based deployment validation and control for images deployed to Google Kubernetes Engine (GKE), Anthos Service Mesh, Anthos Clusters, and Cloud Run." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.2" + + gem.add_dependency "gapic-common", "~> 1.3" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "google-iam-v1", "~> 1.3" +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google-cloud-binary_authorization-v1beta1.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google-cloud-binary_authorization-v1beta1.rb new file mode 100644 index 000000000000..8a412c54b91b --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google-cloud-binary_authorization-v1beta1.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/binary_authorization/v1beta1" diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1.rb new file mode 100644 index 000000000000..1a6abd865063 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1.rb @@ -0,0 +1,46 @@ +# 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/binary_authorization/v1beta1/binauthz_management_service" +require "google/cloud/binary_authorization/v1beta1/system_policy" +require "google/cloud/binary_authorization/v1beta1/version" + +module Google + module Cloud + module BinaryAuthorization + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/binary_authorization/v1beta1" + # client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/binary_authorization/v1beta1" + # client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new + # + module V1beta1 + end + end + end +end + +helper_path = ::File.join __dir__, "v1beta1", "_helpers.rb" +require "google/cloud/binary_authorization/v1beta1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service.rb new file mode 100644 index 000000000000..514a9421da0a --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service.rb @@ -0,0 +1,61 @@ +# 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/binary_authorization/v1beta1/version" + +require "google/cloud/binary_authorization/v1beta1/binauthz_management_service/credentials" +require "google/cloud/binary_authorization/v1beta1/binauthz_management_service/paths" +require "google/cloud/binary_authorization/v1beta1/binauthz_management_service/client" +require "google/cloud/binary_authorization/v1beta1/binauthz_management_service/rest" + +module Google + module Cloud + module BinaryAuthorization + module V1beta1 + ## + # Google Cloud Management Service for Binary Authorization admission policies + # and attestation authorities. + # + # This API implements a REST model with the following objects: + # + # * {::Google::Cloud::BinaryAuthorization::V1beta1::Policy Policy} + # * {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor Attestor} + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/binary_authorization/v1beta1/binauthz_management_service" + # client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/binary_authorization/v1beta1/binauthz_management_service/rest" + # client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new + # + module BinauthzManagementService + end + end + end + end +end + +helper_path = ::File.join __dir__, "binauthz_management_service", "helpers.rb" +require "google/cloud/binary_authorization/v1beta1/binauthz_management_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/client.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/client.rb new file mode 100644 index 000000000000..e837d5f8adbd --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/client.rb @@ -0,0 +1,1154 @@ +# 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/binaryauthorization/v1beta1/service_pb" +require "google/iam/v1" + +module Google + module Cloud + module BinaryAuthorization + module V1beta1 + module BinauthzManagementService + ## + # Client for the BinauthzManagementService service. + # + # Google Cloud Management Service for Binary Authorization admission policies + # and attestation authorities. + # + # This API implements a REST model with the following objects: + # + # * {::Google::Cloud::BinaryAuthorization::V1beta1::Policy Policy} + # * {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor Attestor} + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "binaryauthorization.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :binauthz_management_service_stub + + ## + # Configure the BinauthzManagementService Client class. + # + # See {::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all BinauthzManagementService clients + # ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::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", "BinaryAuthorization", "V1beta1"] + 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_policy.timeout = 600.0 + default_config.rpcs.get_policy.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.update_policy.timeout = 600.0 + default_config.rpcs.update_policy.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.create_attestor.timeout = 600.0 + + default_config.rpcs.get_attestor.timeout = 600.0 + default_config.rpcs.get_attestor.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.update_attestor.timeout = 600.0 + default_config.rpcs.update_attestor.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.list_attestors.timeout = 600.0 + default_config.rpcs.list_attestors.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.delete_attestor.timeout = 600.0 + default_config.rpcs.delete_attestor.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the BinauthzManagementService 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::BinaryAuthorization::V1beta1::BinauthzManagementService::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 + @binauthz_management_service_stub.universe_domain + end + + ## + # Create a new BinauthzManagementService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the BinauthzManagementService 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/binaryauthorization/v1beta1/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 + + @binauthz_management_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementServiceV1Beta1::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 + ) + + @binauthz_management_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 + + @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @binauthz_management_service_stub.endpoint + config.universe_domain = @binauthz_management_service_stub.universe_domain + config.logger = @binauthz_management_service_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for mix-in of the IAMPolicy. + # + # @return [Google::Iam::V1::IAMPolicy::Client] + # + attr_reader :iam_policy_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @binauthz_management_service_stub.logger + end + + # Service calls + + ## + # A {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy} specifies the + # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors} that must + # attest to a container image, before the project is allowed to deploy that + # image. There is at most one policy per project. All image admission + # requests are permitted if a project has no policy. + # + # Gets the {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy} for this + # project. Returns a default + # {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy} if the project + # does not have one. + # + # @overload get_policy(request, options = nil) + # Pass arguments to `get_policy` via a request object, either of type + # {::Google::Cloud::BinaryAuthorization::V1beta1::GetPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BinaryAuthorization::V1beta1::GetPolicyRequest, ::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_policy(name: nil) + # Pass arguments to `get_policy` 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 resource name of the + # {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy} to retrieve, in + # the format `projects/*/policy`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::BinaryAuthorization::V1beta1::Policy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Policy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/binary_authorization/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BinaryAuthorization::V1beta1::GetPolicyRequest.new + # + # # Call the get_policy method. + # result = client.get_policy request + # + # # The returned object is of type Google::Cloud::BinaryAuthorization::V1beta1::Policy. + # p result + # + def get_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1beta1::GetPolicyRequest + + # 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_policy.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::BinaryAuthorization::V1beta1::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_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @binauthz_management_service_stub.call_rpc :get_policy, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates or updates a project's + # {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy}, and returns a + # copy of the new {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy}. + # A policy is always updated as a whole, to avoid race conditions with + # concurrent policy enforcement (or management!) requests. Returns NOT_FOUND + # if the project does not exist, INVALID_ARGUMENT if the request is + # malformed. + # + # @overload update_policy(request, options = nil) + # Pass arguments to `update_policy` via a request object, either of type + # {::Google::Cloud::BinaryAuthorization::V1beta1::UpdatePolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BinaryAuthorization::V1beta1::UpdatePolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_policy(policy: nil) + # Pass arguments to `update_policy` 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 policy [::Google::Cloud::BinaryAuthorization::V1beta1::Policy, ::Hash] + # Required. A new or updated + # {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy} value. The + # service will overwrite the [policy + # name][google.cloud.binaryauthorization.v1beta1.Policy.name] field with the + # resource name in the request URL, in the format `projects/*/policy`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::BinaryAuthorization::V1beta1::Policy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Policy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/binary_authorization/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BinaryAuthorization::V1beta1::UpdatePolicyRequest.new + # + # # Call the update_policy method. + # result = client.update_policy request + # + # # The returned object is of type Google::Cloud::BinaryAuthorization::V1beta1::Policy. + # p result + # + def update_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1beta1::UpdatePolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_policy.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::BinaryAuthorization::V1beta1::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.policy&.name + header_params["policy.name"] = request.policy.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @binauthz_management_service_stub.call_rpc :update_policy, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates an {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor}, + # and returns a copy of the new + # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor}. Returns + # NOT_FOUND if the project does not exist, INVALID_ARGUMENT if the request is + # malformed, ALREADY_EXISTS if the + # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} already + # exists. + # + # @overload create_attestor(request, options = nil) + # Pass arguments to `create_attestor` via a request object, either of type + # {::Google::Cloud::BinaryAuthorization::V1beta1::CreateAttestorRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BinaryAuthorization::V1beta1::CreateAttestorRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_attestor(parent: nil, attestor_id: nil, attestor: nil) + # Pass arguments to `create_attestor` 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. The parent of this + # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor}. + # @param attestor_id [::String] + # Required. The + # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors} ID. + # @param attestor [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor, ::Hash] + # Required. The initial + # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} value. The + # service will overwrite the [attestor + # name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with + # the resource name, in the format `projects/*/attestors/*`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/binary_authorization/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BinaryAuthorization::V1beta1::CreateAttestorRequest.new + # + # # Call the create_attestor method. + # result = client.create_attestor request + # + # # The returned object is of type Google::Cloud::BinaryAuthorization::V1beta1::Attestor. + # p result + # + def create_attestor request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1beta1::CreateAttestorRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_attestor.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::BinaryAuthorization::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_attestor.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_attestor.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @binauthz_management_service_stub.call_rpc :create_attestor, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets an {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor}. + # Returns NOT_FOUND if the + # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} does not + # exist. + # + # @overload get_attestor(request, options = nil) + # Pass arguments to `get_attestor` via a request object, either of type + # {::Google::Cloud::BinaryAuthorization::V1beta1::GetAttestorRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BinaryAuthorization::V1beta1::GetAttestorRequest, ::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_attestor(name: nil) + # Pass arguments to `get_attestor` 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 + # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} to retrieve, + # in the format `projects/*/attestors/*`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/binary_authorization/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BinaryAuthorization::V1beta1::GetAttestorRequest.new + # + # # Call the get_attestor method. + # result = client.get_attestor request + # + # # The returned object is of type Google::Cloud::BinaryAuthorization::V1beta1::Attestor. + # p result + # + def get_attestor request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1beta1::GetAttestorRequest + + # 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_attestor.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::BinaryAuthorization::V1beta1::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_attestor.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_attestor.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @binauthz_management_service_stub.call_rpc :get_attestor, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor}. + # Returns NOT_FOUND if the + # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} does not + # exist. + # + # @overload update_attestor(request, options = nil) + # Pass arguments to `update_attestor` via a request object, either of type + # {::Google::Cloud::BinaryAuthorization::V1beta1::UpdateAttestorRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BinaryAuthorization::V1beta1::UpdateAttestorRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_attestor(attestor: nil) + # Pass arguments to `update_attestor` 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 attestor [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor, ::Hash] + # Required. The updated + # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} value. The + # service will overwrite the [attestor + # name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with + # the resource name in the request URL, in the format + # `projects/*/attestors/*`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/binary_authorization/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BinaryAuthorization::V1beta1::UpdateAttestorRequest.new + # + # # Call the update_attestor method. + # result = client.update_attestor request + # + # # The returned object is of type Google::Cloud::BinaryAuthorization::V1beta1::Attestor. + # p result + # + def update_attestor request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1beta1::UpdateAttestorRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_attestor.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::BinaryAuthorization::V1beta1::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.attestor&.name + header_params["attestor.name"] = request.attestor.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_attestor.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_attestor.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @binauthz_management_service_stub.call_rpc :update_attestor, 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 {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors}. + # Returns INVALID_ARGUMENT if the project does not exist. + # + # @overload list_attestors(request, options = nil) + # Pass arguments to `list_attestors` via a request object, either of type + # {::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsRequest, ::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_attestors(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_attestors` 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. The resource name of the project associated with the + # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors}, in the + # format `projects/*`. + # @param page_size [::Integer] + # Requested page size. The server may return fewer results than requested. If + # unspecified, the server will pick an appropriate default. + # @param page_token [::String] + # A token identifying a page of results the server should return. Typically, + # this is the value of + # {::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsResponse#next_page_token ListAttestorsResponse.next_page_token} + # returned from the previous call to the `ListAttestors` method. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BinaryAuthorization::V1beta1::Attestor>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::BinaryAuthorization::V1beta1::Attestor>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/binary_authorization/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsRequest.new + # + # # Call the list_attestors method. + # result = client.list_attestors 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::BinaryAuthorization::V1beta1::Attestor. + # p item + # end + # + def list_attestors request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsRequest + + # 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_attestors.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::BinaryAuthorization::V1beta1::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_attestors.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_attestors.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @binauthz_management_service_stub.call_rpc :list_attestors, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @binauthz_management_service_stub, :list_attestors, 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 + + ## + # Deletes an {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor}. + # Returns NOT_FOUND if the + # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} does not + # exist. + # + # @overload delete_attestor(request, options = nil) + # Pass arguments to `delete_attestor` via a request object, either of type + # {::Google::Cloud::BinaryAuthorization::V1beta1::DeleteAttestorRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BinaryAuthorization::V1beta1::DeleteAttestorRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_attestor(name: nil) + # Pass arguments to `delete_attestor` 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 + # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors} to delete, + # in the format `projects/*/attestors/*`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::Empty] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/binary_authorization/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BinaryAuthorization::V1beta1::DeleteAttestorRequest.new + # + # # Call the delete_attestor method. + # result = client.delete_attestor request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_attestor request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1beta1::DeleteAttestorRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_attestor.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::BinaryAuthorization::V1beta1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_attestor.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_attestor.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @binauthz_management_service_stub.call_rpc :delete_attestor, 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 BinauthzManagementService API. + # + # This class represents the configuration for BinauthzManagementService, + # 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::BinaryAuthorization::V1beta1::BinauthzManagementService::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_policy to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_policy.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_policy.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::BinaryAuthorization::V1beta1::BinauthzManagementService::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 = "binaryauthorization.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 BinauthzManagementService 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_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_policy + ## + # RPC-specific configuration for `update_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :update_policy + ## + # RPC-specific configuration for `create_attestor` + # @return [::Gapic::Config::Method] + # + attr_reader :create_attestor + ## + # RPC-specific configuration for `get_attestor` + # @return [::Gapic::Config::Method] + # + attr_reader :get_attestor + ## + # RPC-specific configuration for `update_attestor` + # @return [::Gapic::Config::Method] + # + attr_reader :update_attestor + ## + # RPC-specific configuration for `list_attestors` + # @return [::Gapic::Config::Method] + # + attr_reader :list_attestors + ## + # RPC-specific configuration for `delete_attestor` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_attestor + + # @private + def initialize parent_rpcs = nil + get_policy_config = parent_rpcs.get_policy if parent_rpcs.respond_to? :get_policy + @get_policy = ::Gapic::Config::Method.new get_policy_config + update_policy_config = parent_rpcs.update_policy if parent_rpcs.respond_to? :update_policy + @update_policy = ::Gapic::Config::Method.new update_policy_config + create_attestor_config = parent_rpcs.create_attestor if parent_rpcs.respond_to? :create_attestor + @create_attestor = ::Gapic::Config::Method.new create_attestor_config + get_attestor_config = parent_rpcs.get_attestor if parent_rpcs.respond_to? :get_attestor + @get_attestor = ::Gapic::Config::Method.new get_attestor_config + update_attestor_config = parent_rpcs.update_attestor if parent_rpcs.respond_to? :update_attestor + @update_attestor = ::Gapic::Config::Method.new update_attestor_config + list_attestors_config = parent_rpcs.list_attestors if parent_rpcs.respond_to? :list_attestors + @list_attestors = ::Gapic::Config::Method.new list_attestors_config + delete_attestor_config = parent_rpcs.delete_attestor if parent_rpcs.respond_to? :delete_attestor + @delete_attestor = ::Gapic::Config::Method.new delete_attestor_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/credentials.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/credentials.rb new file mode 100644 index 000000000000..62123b4765a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/credentials.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! + +require "googleauth" + +module Google + module Cloud + module BinaryAuthorization + module V1beta1 + module BinauthzManagementService + # Credentials for the BinauthzManagementService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "BINARY_AUTHORIZATION_CREDENTIALS", + "BINARY_AUTHORIZATION_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "BINARY_AUTHORIZATION_CREDENTIALS_JSON", + "BINARY_AUTHORIZATION_KEYFILE_JSON", + "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-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/paths.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/paths.rb new file mode 100644 index 000000000000..64f9546c9431 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/paths.rb @@ -0,0 +1,97 @@ +# 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 BinaryAuthorization + module V1beta1 + module BinauthzManagementService + # Path helper methods for the BinauthzManagementService API. + module Paths + ## + # Create a fully-qualified Attestor resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/attestors/{attestor}` + # + # @param project [String] + # @param attestor [String] + # + # @return [::String] + def attestor_path project:, attestor: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/attestors/#{attestor}" + end + + ## + # Create a fully-qualified Policy resource string. + # + # @overload policy_path(project:) + # The resource will be in the following format: + # + # `projects/{project}/policy` + # + # @param project [String] + # + # @overload policy_path(location:) + # The resource will be in the following format: + # + # `locations/{location}/policy` + # + # @param location [String] + # + # @return [::String] + def policy_path **args + resources = { + "project" => (proc do |project:| + "projects/#{project}/policy" + end), + "location" => (proc do |location:| + "locations/#{location}/policy" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + ## + # Create a fully-qualified Project resource string. + # + # The resource will be in the following format: + # + # `projects/{project}` + # + # @param project [String] + # + # @return [::String] + def project_path project: + "projects/#{project}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/rest.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/rest.rb new file mode 100644 index 000000000000..ab2685b4d1be --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/rest.rb @@ -0,0 +1,59 @@ +# 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/binary_authorization/v1beta1/version" +require "google/cloud/binary_authorization/v1beta1/bindings_override" + +require "google/cloud/binary_authorization/v1beta1/binauthz_management_service/credentials" +require "google/cloud/binary_authorization/v1beta1/binauthz_management_service/paths" +require "google/cloud/binary_authorization/v1beta1/binauthz_management_service/rest/client" + +module Google + module Cloud + module BinaryAuthorization + module V1beta1 + ## + # Google Cloud Management Service for Binary Authorization admission policies + # and attestation authorities. + # + # This API implements a REST model with the following objects: + # + # * {::Google::Cloud::BinaryAuthorization::V1beta1::Policy Policy} + # * {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor Attestor} + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/binary_authorization/v1beta1/binauthz_management_service/rest" + # client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new + # + module BinauthzManagementService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/binary_authorization/v1beta1/binauthz_management_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/rest/client.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/rest/client.rb new file mode 100644 index 000000000000..71a425323112 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/rest/client.rb @@ -0,0 +1,1070 @@ +# 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/binaryauthorization/v1beta1/service_pb" +require "google/cloud/binary_authorization/v1beta1/binauthz_management_service/rest/service_stub" +require "google/iam/v1/rest" + +module Google + module Cloud + module BinaryAuthorization + module V1beta1 + module BinauthzManagementService + module Rest + ## + # REST client for the BinauthzManagementService service. + # + # Google Cloud Management Service for Binary Authorization admission policies + # and attestation authorities. + # + # This API implements a REST model with the following objects: + # + # * {::Google::Cloud::BinaryAuthorization::V1beta1::Policy Policy} + # * {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor Attestor} + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "binaryauthorization.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :binauthz_management_service_stub + + ## + # Configure the BinauthzManagementService Client class. + # + # See {::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all BinauthzManagementService clients + # ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::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", "BinaryAuthorization", "V1beta1"] + 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_policy.timeout = 600.0 + default_config.rpcs.get_policy.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.update_policy.timeout = 600.0 + default_config.rpcs.update_policy.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.create_attestor.timeout = 600.0 + + default_config.rpcs.get_attestor.timeout = 600.0 + default_config.rpcs.get_attestor.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.update_attestor.timeout = 600.0 + default_config.rpcs.update_attestor.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.list_attestors.timeout = 600.0 + default_config.rpcs.list_attestors.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.delete_attestor.timeout = 600.0 + default_config.rpcs.delete_attestor.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the BinauthzManagementService 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::BinaryAuthorization::V1beta1::BinauthzManagementService::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 + @binauthz_management_service_stub.universe_domain + end + + ## + # Create a new BinauthzManagementService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the BinauthzManagementService 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 + + @binauthz_management_service_stub = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @binauthz_management_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 + + @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @binauthz_management_service_stub.endpoint + config.universe_domain = @binauthz_management_service_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @binauthz_management_service_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for mix-in of the IAMPolicy. + # + # @return [Google::Iam::V1::IAMPolicy::Rest::Client] + # + attr_reader :iam_policy_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @binauthz_management_service_stub.logger + end + + # Service calls + + ## + # A {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy} specifies the + # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors} that must + # attest to a container image, before the project is allowed to deploy that + # image. There is at most one policy per project. All image admission + # requests are permitted if a project has no policy. + # + # Gets the {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy} for this + # project. Returns a default + # {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy} if the project + # does not have one. + # + # @overload get_policy(request, options = nil) + # Pass arguments to `get_policy` via a request object, either of type + # {::Google::Cloud::BinaryAuthorization::V1beta1::GetPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BinaryAuthorization::V1beta1::GetPolicyRequest, ::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_policy(name: nil) + # Pass arguments to `get_policy` 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 resource name of the + # {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy} to retrieve, in + # the format `projects/*/policy`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BinaryAuthorization::V1beta1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Policy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/binary_authorization/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BinaryAuthorization::V1beta1::GetPolicyRequest.new + # + # # Call the get_policy method. + # result = client.get_policy request + # + # # The returned object is of type Google::Cloud::BinaryAuthorization::V1beta1::Policy. + # p result + # + def get_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1beta1::GetPolicyRequest + + # 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_policy.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::BinaryAuthorization::V1beta1::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_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @binauthz_management_service_stub.get_policy request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates or updates a project's + # {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy}, and returns a + # copy of the new {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy}. + # A policy is always updated as a whole, to avoid race conditions with + # concurrent policy enforcement (or management!) requests. Returns NOT_FOUND + # if the project does not exist, INVALID_ARGUMENT if the request is + # malformed. + # + # @overload update_policy(request, options = nil) + # Pass arguments to `update_policy` via a request object, either of type + # {::Google::Cloud::BinaryAuthorization::V1beta1::UpdatePolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BinaryAuthorization::V1beta1::UpdatePolicyRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_policy(policy: nil) + # Pass arguments to `update_policy` 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 policy [::Google::Cloud::BinaryAuthorization::V1beta1::Policy, ::Hash] + # Required. A new or updated + # {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy} value. The + # service will overwrite the [policy + # name][google.cloud.binaryauthorization.v1beta1.Policy.name] field with the + # resource name in the request URL, in the format `projects/*/policy`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BinaryAuthorization::V1beta1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Policy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/binary_authorization/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BinaryAuthorization::V1beta1::UpdatePolicyRequest.new + # + # # Call the update_policy method. + # result = client.update_policy request + # + # # The returned object is of type Google::Cloud::BinaryAuthorization::V1beta1::Policy. + # p result + # + def update_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1beta1::UpdatePolicyRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_policy.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::BinaryAuthorization::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @binauthz_management_service_stub.update_policy request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates an {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor}, + # and returns a copy of the new + # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor}. Returns + # NOT_FOUND if the project does not exist, INVALID_ARGUMENT if the request is + # malformed, ALREADY_EXISTS if the + # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} already + # exists. + # + # @overload create_attestor(request, options = nil) + # Pass arguments to `create_attestor` via a request object, either of type + # {::Google::Cloud::BinaryAuthorization::V1beta1::CreateAttestorRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BinaryAuthorization::V1beta1::CreateAttestorRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_attestor(parent: nil, attestor_id: nil, attestor: nil) + # Pass arguments to `create_attestor` 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. The parent of this + # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor}. + # @param attestor_id [::String] + # Required. The + # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors} ID. + # @param attestor [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor, ::Hash] + # Required. The initial + # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} value. The + # service will overwrite the [attestor + # name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with + # the resource name, in the format `projects/*/attestors/*`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/binary_authorization/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BinaryAuthorization::V1beta1::CreateAttestorRequest.new + # + # # Call the create_attestor method. + # result = client.create_attestor request + # + # # The returned object is of type Google::Cloud::BinaryAuthorization::V1beta1::Attestor. + # p result + # + def create_attestor request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1beta1::CreateAttestorRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.create_attestor.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::BinaryAuthorization::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_attestor.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_attestor.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @binauthz_management_service_stub.create_attestor request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets an {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor}. + # Returns NOT_FOUND if the + # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} does not + # exist. + # + # @overload get_attestor(request, options = nil) + # Pass arguments to `get_attestor` via a request object, either of type + # {::Google::Cloud::BinaryAuthorization::V1beta1::GetAttestorRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BinaryAuthorization::V1beta1::GetAttestorRequest, ::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_attestor(name: nil) + # Pass arguments to `get_attestor` 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 + # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} to retrieve, + # in the format `projects/*/attestors/*`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/binary_authorization/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BinaryAuthorization::V1beta1::GetAttestorRequest.new + # + # # Call the get_attestor method. + # result = client.get_attestor request + # + # # The returned object is of type Google::Cloud::BinaryAuthorization::V1beta1::Attestor. + # p result + # + def get_attestor request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1beta1::GetAttestorRequest + + # 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_attestor.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::BinaryAuthorization::V1beta1::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_attestor.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_attestor.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @binauthz_management_service_stub.get_attestor request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor}. + # Returns NOT_FOUND if the + # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} does not + # exist. + # + # @overload update_attestor(request, options = nil) + # Pass arguments to `update_attestor` via a request object, either of type + # {::Google::Cloud::BinaryAuthorization::V1beta1::UpdateAttestorRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BinaryAuthorization::V1beta1::UpdateAttestorRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_attestor(attestor: nil) + # Pass arguments to `update_attestor` 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 attestor [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor, ::Hash] + # Required. The updated + # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} value. The + # service will overwrite the [attestor + # name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with + # the resource name in the request URL, in the format + # `projects/*/attestors/*`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/binary_authorization/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BinaryAuthorization::V1beta1::UpdateAttestorRequest.new + # + # # Call the update_attestor method. + # result = client.update_attestor request + # + # # The returned object is of type Google::Cloud::BinaryAuthorization::V1beta1::Attestor. + # p result + # + def update_attestor request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1beta1::UpdateAttestorRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_attestor.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::BinaryAuthorization::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_attestor.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_attestor.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @binauthz_management_service_stub.update_attestor 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 {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors}. + # Returns INVALID_ARGUMENT if the project does not exist. + # + # @overload list_attestors(request, options = nil) + # Pass arguments to `list_attestors` via a request object, either of type + # {::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsRequest, ::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_attestors(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_attestors` 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. The resource name of the project associated with the + # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors}, in the + # format `projects/*`. + # @param page_size [::Integer] + # Requested page size. The server may return fewer results than requested. If + # unspecified, the server will pick an appropriate default. + # @param page_token [::String] + # A token identifying a page of results the server should return. Typically, + # this is the value of + # {::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsResponse#next_page_token ListAttestorsResponse.next_page_token} + # returned from the previous call to the `ListAttestors` method. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BinaryAuthorization::V1beta1::Attestor>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BinaryAuthorization::V1beta1::Attestor>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/binary_authorization/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsRequest.new + # + # # Call the list_attestors method. + # result = client.list_attestors 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::BinaryAuthorization::V1beta1::Attestor. + # p item + # end + # + def list_attestors request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsRequest + + # 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_attestors.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::BinaryAuthorization::V1beta1::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_attestors.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_attestors.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @binauthz_management_service_stub.list_attestors request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @binauthz_management_service_stub, :list_attestors, "attestors", 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 + + ## + # Deletes an {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor}. + # Returns NOT_FOUND if the + # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} does not + # exist. + # + # @overload delete_attestor(request, options = nil) + # Pass arguments to `delete_attestor` via a request object, either of type + # {::Google::Cloud::BinaryAuthorization::V1beta1::DeleteAttestorRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BinaryAuthorization::V1beta1::DeleteAttestorRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_attestor(name: nil) + # Pass arguments to `delete_attestor` 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 + # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors} to delete, + # in the format `projects/*/attestors/*`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/binary_authorization/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BinaryAuthorization::V1beta1::DeleteAttestorRequest.new + # + # # Call the delete_attestor method. + # result = client.delete_attestor request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_attestor request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1beta1::DeleteAttestorRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_attestor.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::BinaryAuthorization::V1beta1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_attestor.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_attestor.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @binauthz_management_service_stub.delete_attestor 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 BinauthzManagementService REST API. + # + # This class represents the configuration for BinauthzManagementService 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::BinaryAuthorization::V1beta1::BinauthzManagementService::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_policy to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_policy.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_policy.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 = "binaryauthorization.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + # Overrides for http bindings for the RPCs of this service + # are only used when this service is used as mixin, and only + # by the host service. + # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] + config_attr :bindings_override, {}, ::Hash, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the BinauthzManagementService 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_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_policy + ## + # RPC-specific configuration for `update_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :update_policy + ## + # RPC-specific configuration for `create_attestor` + # @return [::Gapic::Config::Method] + # + attr_reader :create_attestor + ## + # RPC-specific configuration for `get_attestor` + # @return [::Gapic::Config::Method] + # + attr_reader :get_attestor + ## + # RPC-specific configuration for `update_attestor` + # @return [::Gapic::Config::Method] + # + attr_reader :update_attestor + ## + # RPC-specific configuration for `list_attestors` + # @return [::Gapic::Config::Method] + # + attr_reader :list_attestors + ## + # RPC-specific configuration for `delete_attestor` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_attestor + + # @private + def initialize parent_rpcs = nil + get_policy_config = parent_rpcs.get_policy if parent_rpcs.respond_to? :get_policy + @get_policy = ::Gapic::Config::Method.new get_policy_config + update_policy_config = parent_rpcs.update_policy if parent_rpcs.respond_to? :update_policy + @update_policy = ::Gapic::Config::Method.new update_policy_config + create_attestor_config = parent_rpcs.create_attestor if parent_rpcs.respond_to? :create_attestor + @create_attestor = ::Gapic::Config::Method.new create_attestor_config + get_attestor_config = parent_rpcs.get_attestor if parent_rpcs.respond_to? :get_attestor + @get_attestor = ::Gapic::Config::Method.new get_attestor_config + update_attestor_config = parent_rpcs.update_attestor if parent_rpcs.respond_to? :update_attestor + @update_attestor = ::Gapic::Config::Method.new update_attestor_config + list_attestors_config = parent_rpcs.list_attestors if parent_rpcs.respond_to? :list_attestors + @list_attestors = ::Gapic::Config::Method.new list_attestors_config + delete_attestor_config = parent_rpcs.delete_attestor if parent_rpcs.respond_to? :delete_attestor + @delete_attestor = ::Gapic::Config::Method.new delete_attestor_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/rest/service_stub.rb new file mode 100644 index 000000000000..e95cf3599a62 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/rest/service_stub.rb @@ -0,0 +1,511 @@ +# 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/binaryauthorization/v1beta1/service_pb" + +module Google + module Cloud + module BinaryAuthorization + module V1beta1 + module BinauthzManagementService + module Rest + ## + # REST service stub for the BinauthzManagementService 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_policy REST call + # + # @param request_pb [::Google::Cloud::BinaryAuthorization::V1beta1::GetPolicyRequest] + # 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::BinaryAuthorization::V1beta1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Policy] + # A result object deserialized from the server's reply + def get_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_policy_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_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BinaryAuthorization::V1beta1::Policy.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_policy REST call + # + # @param request_pb [::Google::Cloud::BinaryAuthorization::V1beta1::UpdatePolicyRequest] + # 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::BinaryAuthorization::V1beta1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Policy] + # A result object deserialized from the server's reply + def update_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_policy_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BinaryAuthorization::V1beta1::Policy.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the create_attestor REST call + # + # @param request_pb [::Google::Cloud::BinaryAuthorization::V1beta1::CreateAttestorRequest] + # 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::BinaryAuthorization::V1beta1::Attestor] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor] + # A result object deserialized from the server's reply + def create_attestor request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_attestor_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "create_attestor", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BinaryAuthorization::V1beta1::Attestor.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_attestor REST call + # + # @param request_pb [::Google::Cloud::BinaryAuthorization::V1beta1::GetAttestorRequest] + # 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::BinaryAuthorization::V1beta1::Attestor] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor] + # A result object deserialized from the server's reply + def get_attestor request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_attestor_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_attestor", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BinaryAuthorization::V1beta1::Attestor.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_attestor REST call + # + # @param request_pb [::Google::Cloud::BinaryAuthorization::V1beta1::UpdateAttestorRequest] + # 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::BinaryAuthorization::V1beta1::Attestor] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor] + # A result object deserialized from the server's reply + def update_attestor request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_attestor_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_attestor", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BinaryAuthorization::V1beta1::Attestor.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_attestors REST call + # + # @param request_pb [::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsRequest] + # 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::BinaryAuthorization::V1beta1::ListAttestorsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsResponse] + # A result object deserialized from the server's reply + def list_attestors request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_attestors_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_attestors", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_attestor REST call + # + # @param request_pb [::Google::Cloud::BinaryAuthorization::V1beta1::DeleteAttestorRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_attestor request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_attestor_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_attestor", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the get_policy REST call + # + # @param request_pb [::Google::Cloud::BinaryAuthorization::V1beta1::GetPolicyRequest] + # 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_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/policy/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_policy REST call + # + # @param request_pb [::Google::Cloud::BinaryAuthorization::V1beta1::UpdatePolicyRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :put, + uri_template: "/v1beta1/{policy.name}", + body: "policy", + matches: [ + ["policy.name", %r{^projects/[^/]+/policy/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_attestor REST call + # + # @param request_pb [::Google::Cloud::BinaryAuthorization::V1beta1::CreateAttestorRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_create_attestor_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta1/{parent}/attestors", + body: "attestor", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_attestor REST call + # + # @param request_pb [::Google::Cloud::BinaryAuthorization::V1beta1::GetAttestorRequest] + # 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_attestor_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/attestors/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_attestor REST call + # + # @param request_pb [::Google::Cloud::BinaryAuthorization::V1beta1::UpdateAttestorRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_attestor_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :put, + uri_template: "/v1beta1/{attestor.name}", + body: "attestor", + matches: [ + ["attestor.name", %r{^projects/[^/]+/attestors/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_attestors REST call + # + # @param request_pb [::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsRequest] + # 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_attestors_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta1/{parent}/attestors", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_attestor REST call + # + # @param request_pb [::Google::Cloud::BinaryAuthorization::V1beta1::DeleteAttestorRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_attestor_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1beta1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/attestors/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/bindings_override.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/bindings_override.rb new file mode 100644 index 000000000000..e68ac8794c08 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/bindings_override.rb @@ -0,0 +1,110 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" + +module Google + module Cloud + module BinaryAuthorization + ## + # @example Loading just the REST part of this package, including all its services, and instantiating a REST client + # + # require "google/cloud/binary_authorization/v1beta1/rest" + # client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new + # + module V1beta1 + ## + # @private + # Initialize the mixin bindings configuration + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "BinaryAuthorization"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config + default_config.bindings_override["google.iam.v1.IAMPolicy.GetIamPolicy"] = [ + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1beta1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/policy/?$}, false] + ], + body: nil + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1beta1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/attestors/[^/]+/?$}, false] + ], + body: nil + ) + ] + default_config.bindings_override["google.iam.v1.IAMPolicy.SetIamPolicy"] = [ + + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1beta1/{resource}:setIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/policy/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1beta1/{resource}:setIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/attestors/[^/]+/?$}, false] + ], + body: "*" + ) + ] + default_config.bindings_override["google.iam.v1.IAMPolicy.TestIamPermissions"] = [ + + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1beta1/{resource}:testIamPermissions", + matches: [ + ["resource", %r{^projects/[^/]+/policy/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1beta1/{resource}:testIamPermissions", + matches: [ + ["resource", %r{^projects/[^/]+/attestors/[^/]+/?$}, false] + ], + body: "*" + ) + ] + default_config + end + yield @configure if block_given? + @configure + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/rest.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/rest.rb new file mode 100644 index 000000000000..e5f8c1e78405 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/rest.rb @@ -0,0 +1,39 @@ +# 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/binary_authorization/v1beta1/binauthz_management_service/rest" +require "google/cloud/binary_authorization/v1beta1/system_policy/rest" +require "google/cloud/binary_authorization/v1beta1/bindings_override" +require "google/cloud/binary_authorization/v1beta1/version" + +module Google + module Cloud + module BinaryAuthorization + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/binary_authorization/v1beta1/rest" + # client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new + # + module V1beta1 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy.rb new file mode 100644 index 000000000000..69c5ebc8bbe2 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/binary_authorization/v1beta1/version" + +require "google/cloud/binary_authorization/v1beta1/system_policy/credentials" +require "google/cloud/binary_authorization/v1beta1/system_policy/paths" +require "google/cloud/binary_authorization/v1beta1/system_policy/client" +require "google/cloud/binary_authorization/v1beta1/system_policy/rest" + +module Google + module Cloud + module BinaryAuthorization + module V1beta1 + ## + # API for working with the system policy. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/binary_authorization/v1beta1/system_policy" + # client = ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/binary_authorization/v1beta1/system_policy/rest" + # client = ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Rest::Client.new + # + module SystemPolicy + end + end + end + end +end + +helper_path = ::File.join __dir__, "system_policy", "helpers.rb" +require "google/cloud/binary_authorization/v1beta1/system_policy/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/client.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/client.rb new file mode 100644 index 000000000000..d54421dd9f0f --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/client.rb @@ -0,0 +1,493 @@ +# 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/binaryauthorization/v1beta1/service_pb" +require "google/iam/v1" + +module Google + module Cloud + module BinaryAuthorization + module V1beta1 + module SystemPolicy + ## + # Client for the SystemPolicy service. + # + # API for working with the system policy. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "binaryauthorization.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :system_policy_stub + + ## + # Configure the SystemPolicy Client class. + # + # See {::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all SystemPolicy clients + # ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::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", "BinaryAuthorization", "V1beta1"] + 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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the SystemPolicy 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::BinaryAuthorization::V1beta1::SystemPolicy::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 + @system_policy_stub.universe_domain + end + + ## + # Create a new SystemPolicy client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the SystemPolicy 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/binaryauthorization/v1beta1/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 + + @system_policy_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicyV1Beta1::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 + ) + + @system_policy_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 + + @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @system_policy_stub.endpoint + config.universe_domain = @system_policy_stub.universe_domain + config.logger = @system_policy_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for mix-in of the IAMPolicy. + # + # @return [Google::Iam::V1::IAMPolicy::Client] + # + attr_reader :iam_policy_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @system_policy_stub.logger + end + + # Service calls + + ## + # Gets the current system policy in the specified location. + # + # @overload get_system_policy(request, options = nil) + # Pass arguments to `get_system_policy` via a request object, either of type + # {::Google::Cloud::BinaryAuthorization::V1beta1::GetSystemPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BinaryAuthorization::V1beta1::GetSystemPolicyRequest, ::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_system_policy(name: nil) + # Pass arguments to `get_system_policy` 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 resource name, in the format `locations/*/policy`. + # Note that the system policy is not associated with a project. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::BinaryAuthorization::V1beta1::Policy] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Policy] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/binary_authorization/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BinaryAuthorization::V1beta1::GetSystemPolicyRequest.new + # + # # Call the get_system_policy method. + # result = client.get_system_policy request + # + # # The returned object is of type Google::Cloud::BinaryAuthorization::V1beta1::Policy. + # p result + # + def get_system_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1beta1::GetSystemPolicyRequest + + # 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_system_policy.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::BinaryAuthorization::V1beta1::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_system_policy.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_system_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @system_policy_stub.call_rpc :get_system_policy, 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 SystemPolicy API. + # + # This class represents the configuration for SystemPolicy, + # 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::BinaryAuthorization::V1beta1::SystemPolicy::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_system_policy to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_system_policy.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_system_policy.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::BinaryAuthorization::V1beta1::SystemPolicy::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 = "binaryauthorization.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 SystemPolicy 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_system_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_system_policy + + # @private + def initialize parent_rpcs = nil + get_system_policy_config = parent_rpcs.get_system_policy if parent_rpcs.respond_to? :get_system_policy + @get_system_policy = ::Gapic::Config::Method.new get_system_policy_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/credentials.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/credentials.rb new file mode 100644 index 000000000000..5086add422bf --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/credentials.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! + +require "googleauth" + +module Google + module Cloud + module BinaryAuthorization + module V1beta1 + module SystemPolicy + # Credentials for the SystemPolicy API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "BINARY_AUTHORIZATION_CREDENTIALS", + "BINARY_AUTHORIZATION_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "BINARY_AUTHORIZATION_CREDENTIALS_JSON", + "BINARY_AUTHORIZATION_KEYFILE_JSON", + "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-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/paths.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/paths.rb new file mode 100644 index 000000000000..acd18465e582 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/paths.rb @@ -0,0 +1,66 @@ +# 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 BinaryAuthorization + module V1beta1 + module SystemPolicy + # Path helper methods for the SystemPolicy API. + module Paths + ## + # Create a fully-qualified Policy resource string. + # + # @overload policy_path(project:) + # The resource will be in the following format: + # + # `projects/{project}/policy` + # + # @param project [String] + # + # @overload policy_path(location:) + # The resource will be in the following format: + # + # `locations/{location}/policy` + # + # @param location [String] + # + # @return [::String] + def policy_path **args + resources = { + "project" => (proc do |project:| + "projects/#{project}/policy" + end), + "location" => (proc do |location:| + "locations/#{location}/policy" + end) + } + + resource = resources[args.keys.sort.join(":")] + raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? + resource.call(**args) + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/rest.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/rest.rb new file mode 100644 index 000000000000..59ce8a98a273 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/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/binary_authorization/v1beta1/version" +require "google/cloud/binary_authorization/v1beta1/bindings_override" + +require "google/cloud/binary_authorization/v1beta1/system_policy/credentials" +require "google/cloud/binary_authorization/v1beta1/system_policy/paths" +require "google/cloud/binary_authorization/v1beta1/system_policy/rest/client" + +module Google + module Cloud + module BinaryAuthorization + module V1beta1 + ## + # API for working with the system policy. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/binary_authorization/v1beta1/system_policy/rest" + # client = ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Rest::Client.new + # + module SystemPolicy + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/binary_authorization/v1beta1/system_policy/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/rest/client.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/rest/client.rb new file mode 100644 index 000000000000..008d58539e00 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/rest/client.rb @@ -0,0 +1,451 @@ +# 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/binaryauthorization/v1beta1/service_pb" +require "google/cloud/binary_authorization/v1beta1/system_policy/rest/service_stub" +require "google/iam/v1/rest" + +module Google + module Cloud + module BinaryAuthorization + module V1beta1 + module SystemPolicy + module Rest + ## + # REST client for the SystemPolicy service. + # + # API for working with the system policy. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "binaryauthorization.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :system_policy_stub + + ## + # Configure the SystemPolicy Client class. + # + # See {::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all SystemPolicy clients + # ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::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", "BinaryAuthorization", "V1beta1"] + 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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the SystemPolicy 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::BinaryAuthorization::V1beta1::SystemPolicy::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 + @system_policy_stub.universe_domain + end + + ## + # Create a new SystemPolicy REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the SystemPolicy 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 + + @system_policy_stub = ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @system_policy_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 + + @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @system_policy_stub.endpoint + config.universe_domain = @system_policy_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @system_policy_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for mix-in of the IAMPolicy. + # + # @return [Google::Iam::V1::IAMPolicy::Rest::Client] + # + attr_reader :iam_policy_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @system_policy_stub.logger + end + + # Service calls + + ## + # Gets the current system policy in the specified location. + # + # @overload get_system_policy(request, options = nil) + # Pass arguments to `get_system_policy` via a request object, either of type + # {::Google::Cloud::BinaryAuthorization::V1beta1::GetSystemPolicyRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::BinaryAuthorization::V1beta1::GetSystemPolicyRequest, ::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_system_policy(name: nil) + # Pass arguments to `get_system_policy` 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 resource name, in the format `locations/*/policy`. + # Note that the system policy is not associated with a project. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::BinaryAuthorization::V1beta1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Policy] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/binary_authorization/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::BinaryAuthorization::V1beta1::GetSystemPolicyRequest.new + # + # # Call the get_system_policy method. + # result = client.get_system_policy request + # + # # The returned object is of type Google::Cloud::BinaryAuthorization::V1beta1::Policy. + # p result + # + def get_system_policy request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1beta1::GetSystemPolicyRequest + + # 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_system_policy.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::BinaryAuthorization::V1beta1::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_system_policy.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_system_policy.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @system_policy_stub.get_system_policy 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 SystemPolicy REST API. + # + # This class represents the configuration for SystemPolicy 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::BinaryAuthorization::V1beta1::SystemPolicy::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_system_policy to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_system_policy.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_system_policy.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 = "binaryauthorization.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + + # @private + # Overrides for http bindings for the RPCs of this service + # are only used when this service is used as mixin, and only + # by the host service. + # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] + config_attr :bindings_override, {}, ::Hash, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the SystemPolicy 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_system_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_system_policy + + # @private + def initialize parent_rpcs = nil + get_system_policy_config = parent_rpcs.get_system_policy if parent_rpcs.respond_to? :get_system_policy + @get_system_policy = ::Gapic::Config::Method.new get_system_policy_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/rest/service_stub.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/rest/service_stub.rb new file mode 100644 index 000000000000..6e02f227b484 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/rest/service_stub.rb @@ -0,0 +1,142 @@ +# 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/binaryauthorization/v1beta1/service_pb" + +module Google + module Cloud + module BinaryAuthorization + module V1beta1 + module SystemPolicy + module Rest + ## + # REST service stub for the SystemPolicy 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_system_policy REST call + # + # @param request_pb [::Google::Cloud::BinaryAuthorization::V1beta1::GetSystemPolicyRequest] + # 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::BinaryAuthorization::V1beta1::Policy] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Policy] + # A result object deserialized from the server's reply + def get_system_policy request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_system_policy_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_system_policy", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::BinaryAuthorization::V1beta1::Policy.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_system_policy REST call + # + # @param request_pb [::Google::Cloud::BinaryAuthorization::V1beta1::GetSystemPolicyRequest] + # 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_system_policy_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta1/{name}", + matches: [ + ["name", %r{^locations/[^/]+/policy/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/version.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/version.rb new file mode 100644 index 000000000000..a42a2a29d560 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/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 BinaryAuthorization + module V1beta1 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binaryauthorization/v1beta1/continuous_validation_logging_pb.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binaryauthorization/v1beta1/continuous_validation_logging_pb.rb new file mode 100644 index 000000000000..051ea7515920 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binaryauthorization/v1beta1/continuous_validation_logging_pb.rb @@ -0,0 +1,32 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/binaryauthorization/v1beta1/continuous_validation_logging.proto + +require 'google/protobuf' + +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\nLgoogle/cloud/binaryauthorization/v1beta1/continuous_validation_logging.proto\x12(google.cloud.binaryauthorization.v1beta1\x1a\x1fgoogle/protobuf/timestamp.proto\"\x85\x11\n\x19\x43ontinuousValidationEvent\x12u\n\tpod_event\x18\x01 \x01(\x0b\x32`.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEventH\x00\x12r\n\x12\x63onfig_error_event\x18\x04 \x01(\x0b\x32T.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ConfigErrorEventH\x00\x1a\xc5\x0e\n\x1c\x43ontinuousValidationPodEvent\x12\x15\n\rpod_namespace\x18\x07 \x01(\t\x12\x0b\n\x03pod\x18\x01 \x01(\t\x12\x13\n\x0bpolicy_name\x18\x08 \x01(\t\x12/\n\x0b\x64\x65ploy_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x8a\x01\n\x07verdict\x18\x04 \x01(\x0e\x32y.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.PolicyConformanceVerdict\x12}\n\x06images\x18\x05 \x03(\x0b\x32m.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails\x1a\xa3\n\n\x0cImageDetails\x12\r\n\x05image\x18\x01 \x01(\t\x12\x16\n\x0e\x63ontainer_name\x18\x05 \x01(\t\x12\x93\x01\n\x0e\x63ontainer_type\x18\x06 \x01(\x0e\x32{.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails.ContainerType\x12\x89\x01\n\x06result\x18\x02 \x01(\x0e\x32y.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails.AuditResult\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x90\x01\n\rcheck_results\x18\x04 \x03(\x0b\x32y.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails.CheckResult\x1a\xf2\x04\n\x0b\x43heckResult\x12\x17\n\x0f\x63heck_set_index\x18\x01 \x01(\t\x12\x16\n\x0e\x63heck_set_name\x18\x02 \x01(\t\x12\xa1\x01\n\x0f\x63heck_set_scope\x18\x03 \x01(\x0b\x32\x87\x01.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails.CheckResult.CheckSetScope\x12\x13\n\x0b\x63heck_index\x18\x04 \x01(\t\x12\x12\n\ncheck_name\x18\x05 \x01(\t\x12\x12\n\ncheck_type\x18\x06 \x01(\t\x12\x98\x01\n\x07verdict\x18\x07 \x01(\x0e\x32\x86\x01.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails.CheckResult.CheckVerdict\x12\x13\n\x0b\x65xplanation\x18\x08 \x01(\t\x1a^\n\rCheckSetScope\x12$\n\x1akubernetes_service_account\x18\x01 \x01(\tH\x00\x12\x1e\n\x14kubernetes_namespace\x18\x02 \x01(\tH\x00\x42\x07\n\x05scope\"A\n\x0c\x43heckVerdict\x12\x1d\n\x19\x43HECK_VERDICT_UNSPECIFIED\x10\x00\x12\x12\n\x0eNON_CONFORMANT\x10\x01\"k\n\rContainerType\x12\x1e\n\x1a\x43ONTAINER_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tCONTAINER\x10\x01\x12\x12\n\x0eINIT_CONTAINER\x10\x02\x12\x17\n\x13\x45PHEMERAL_CONTAINER\x10\x03\"@\n\x0b\x41uditResult\x12\x1c\n\x18\x41UDIT_RESULT_UNSPECIFIED\x10\x00\x12\t\n\x05\x41LLOW\x10\x01\x12\x08\n\x04\x44\x45NY\x10\x02\"[\n\x18PolicyConformanceVerdict\x12*\n&POLICY_CONFORMANCE_VERDICT_UNSPECIFIED\x10\x00\x12\x13\n\x0fVIOLATES_POLICY\x10\x01\x1a\'\n\x10\x43onfigErrorEvent\x12\x13\n\x0b\x64\x65scription\x18\x01 \x01(\tB\x0c\n\nevent_typeB\xb9\x02\n,com.google.cloud.binaryauthorization.v1beta1B ContinuousValidationLoggingProtoP\x01Z^cloud.google.com/go/binaryauthorization/apiv1beta1/binaryauthorizationpb;binaryauthorizationpb\xf8\x01\x01\xaa\x02(Google.Cloud.BinaryAuthorization.V1Beta1\xca\x02(Google\\Cloud\\BinaryAuthorization\\V1beta1\xea\x02+Google::Cloud::BinaryAuthorization::V1beta1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module BinaryAuthorization + module V1beta1 + ContinuousValidationEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent").msgclass + ContinuousValidationEvent::ContinuousValidationPodEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent").msgclass + ContinuousValidationEvent::ContinuousValidationPodEvent::ImageDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails").msgclass + ContinuousValidationEvent::ContinuousValidationPodEvent::ImageDetails::CheckResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails.CheckResult").msgclass + ContinuousValidationEvent::ContinuousValidationPodEvent::ImageDetails::CheckResult::CheckSetScope = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails.CheckResult.CheckSetScope").msgclass + ContinuousValidationEvent::ContinuousValidationPodEvent::ImageDetails::CheckResult::CheckVerdict = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails.CheckResult.CheckVerdict").enummodule + ContinuousValidationEvent::ContinuousValidationPodEvent::ImageDetails::ContainerType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails.ContainerType").enummodule + ContinuousValidationEvent::ContinuousValidationPodEvent::ImageDetails::AuditResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails.AuditResult").enummodule + ContinuousValidationEvent::ContinuousValidationPodEvent::PolicyConformanceVerdict = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.PolicyConformanceVerdict").enummodule + ContinuousValidationEvent::ConfigErrorEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ConfigErrorEvent").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binaryauthorization/v1beta1/resources_pb.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binaryauthorization/v1beta1/resources_pb.rb new file mode 100644 index 000000000000..164d18d0e897 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binaryauthorization/v1beta1/resources_pb.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/binaryauthorization/v1beta1/resources.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n8google/cloud/binaryauthorization/v1beta1/resources.proto\x12(google.cloud.binaryauthorization.v1beta1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc4\r\n\x06Policy\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12w\n\x1dglobal_policy_evaluation_mode\x18\x07 \x01(\x0e\x32K.google.cloud.binaryauthorization.v1beta1.Policy.GlobalPolicyEvaluationModeB\x03\xe0\x41\x01\x12n\n\x1c\x61\x64mission_whitelist_patterns\x18\x02 \x03(\x0b\x32\x43.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPatternB\x03\xe0\x41\x01\x12q\n\x17\x63luster_admission_rules\x18\x03 \x03(\x0b\x32K.google.cloud.binaryauthorization.v1beta1.Policy.ClusterAdmissionRulesEntryB\x03\xe0\x41\x01\x12\x8a\x01\n$kubernetes_namespace_admission_rules\x18\n \x03(\x0b\x32W.google.cloud.binaryauthorization.v1beta1.Policy.KubernetesNamespaceAdmissionRulesEntryB\x03\xe0\x41\x01\x12\x95\x01\n*kubernetes_service_account_admission_rules\x18\x08 \x03(\x0b\x32\\.google.cloud.binaryauthorization.v1beta1.Policy.KubernetesServiceAccountAdmissionRulesEntryB\x03\xe0\x41\x01\x12\x8d\x01\n&istio_service_identity_admission_rules\x18\t \x03(\x0b\x32X.google.cloud.binaryauthorization.v1beta1.Policy.IstioServiceIdentityAdmissionRulesEntryB\x03\xe0\x41\x01\x12\\\n\x16\x64\x65\x66\x61ult_admission_rule\x18\x04 \x01(\x0b\x32\x37.google.cloud.binaryauthorization.v1beta1.AdmissionRuleB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x11\n\x04\x65tag\x18\x0b \x01(\tB\x03\xe0\x41\x01\x1au\n\x1a\x43lusterAdmissionRulesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x46\n\x05value\x18\x02 \x01(\x0b\x32\x37.google.cloud.binaryauthorization.v1beta1.AdmissionRule:\x02\x38\x01\x1a\x81\x01\n&KubernetesNamespaceAdmissionRulesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x46\n\x05value\x18\x02 \x01(\x0b\x32\x37.google.cloud.binaryauthorization.v1beta1.AdmissionRule:\x02\x38\x01\x1a\x86\x01\n+KubernetesServiceAccountAdmissionRulesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x46\n\x05value\x18\x02 \x01(\x0b\x32\x37.google.cloud.binaryauthorization.v1beta1.AdmissionRule:\x02\x38\x01\x1a\x82\x01\n\'IstioServiceIdentityAdmissionRulesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x46\n\x05value\x18\x02 \x01(\x0b\x32\x37.google.cloud.binaryauthorization.v1beta1.AdmissionRule:\x02\x38\x01\"d\n\x1aGlobalPolicyEvaluationMode\x12-\n)GLOBAL_POLICY_EVALUATION_MODE_UNSPECIFIED\x10\x00\x12\n\n\x06\x45NABLE\x10\x01\x12\x0b\n\x07\x44ISABLE\x10\x02:f\xea\x41\x63\n)binaryauthorization.googleapis.com/Policy\x12\x19projects/{project}/policy\x12\x1blocations/{location}/policy\"1\n\x19\x41\x64missionWhitelistPattern\x12\x14\n\x0cname_pattern\x18\x01 \x01(\t\"\xe4\x03\n\rAdmissionRule\x12\x64\n\x0f\x65valuation_mode\x18\x01 \x01(\x0e\x32\x46.google.cloud.binaryauthorization.v1beta1.AdmissionRule.EvaluationModeB\x03\xe0\x41\x02\x12$\n\x17require_attestations_by\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12\x66\n\x10\x65nforcement_mode\x18\x03 \x01(\x0e\x32G.google.cloud.binaryauthorization.v1beta1.AdmissionRule.EnforcementModeB\x03\xe0\x41\x02\"m\n\x0e\x45valuationMode\x12\x1f\n\x1b\x45VALUATION_MODE_UNSPECIFIED\x10\x00\x12\x10\n\x0c\x41LWAYS_ALLOW\x10\x01\x12\x17\n\x13REQUIRE_ATTESTATION\x10\x02\x12\x0f\n\x0b\x41LWAYS_DENY\x10\x03\"p\n\x0f\x45nforcementMode\x12 \n\x1c\x45NFORCEMENT_MODE_UNSPECIFIED\x10\x00\x12 \n\x1c\x45NFORCED_BLOCK_AND_AUDIT_LOG\x10\x01\x12\x19\n\x15\x44RYRUN_AUDIT_LOG_ONLY\x10\x02\"\xcf\x02\n\x08\x41ttestor\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x61\n\x17user_owned_drydock_note\x18\x03 \x01(\x0b\x32>.google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNoteH\x00\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x11\n\x04\x65tag\x18\x07 \x01(\tB\x03\xe0\x41\x01:Y\xea\x41V\n+binaryauthorization.googleapis.com/Attestor\x12\'projects/{project}/attestors/{attestor}B\x0f\n\rattestor_type\"\xb9\x01\n\x14UserOwnedDrydockNote\x12\x1b\n\x0enote_reference\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12U\n\x0bpublic_keys\x18\x02 \x03(\x0b\x32;.google.cloud.binaryauthorization.v1beta1.AttestorPublicKeyB\x03\xe0\x41\x01\x12-\n delegation_service_account_email\x18\x03 \x01(\tB\x03\xe0\x41\x03\"\xcb\x05\n\rPkixPublicKey\x12\x16\n\x0epublic_key_pem\x18\x01 \x01(\t\x12g\n\x13signature_algorithm\x18\x02 \x01(\x0e\x32J.google.cloud.binaryauthorization.v1beta1.PkixPublicKey.SignatureAlgorithm\"\xb8\x04\n\x12SignatureAlgorithm\x12#\n\x1fSIGNATURE_ALGORITHM_UNSPECIFIED\x10\x00\x12\x17\n\x13RSA_PSS_2048_SHA256\x10\x01\x12\x1c\n\x18RSA_SIGN_PSS_2048_SHA256\x10\x01\x12\x17\n\x13RSA_PSS_3072_SHA256\x10\x02\x12\x1c\n\x18RSA_SIGN_PSS_3072_SHA256\x10\x02\x12\x17\n\x13RSA_PSS_4096_SHA256\x10\x03\x12\x1c\n\x18RSA_SIGN_PSS_4096_SHA256\x10\x03\x12\x17\n\x13RSA_PSS_4096_SHA512\x10\x04\x12\x1c\n\x18RSA_SIGN_PSS_4096_SHA512\x10\x04\x12\x1e\n\x1aRSA_SIGN_PKCS1_2048_SHA256\x10\x05\x12\x1e\n\x1aRSA_SIGN_PKCS1_3072_SHA256\x10\x06\x12\x1e\n\x1aRSA_SIGN_PKCS1_4096_SHA256\x10\x07\x12\x1e\n\x1aRSA_SIGN_PKCS1_4096_SHA512\x10\x08\x12\x15\n\x11\x45\x43\x44SA_P256_SHA256\x10\t\x12\x17\n\x13\x45\x43_SIGN_P256_SHA256\x10\t\x12\x15\n\x11\x45\x43\x44SA_P384_SHA384\x10\n\x12\x17\n\x13\x45\x43_SIGN_P384_SHA384\x10\n\x12\x15\n\x11\x45\x43\x44SA_P521_SHA512\x10\x0b\x12\x17\n\x13\x45\x43_SIGN_P521_SHA512\x10\x0b\x12\r\n\tML_DSA_65\x10\r\x1a\x02\x10\x01\"\xbf\x01\n\x11\x41ttestorPublicKey\x12\x14\n\x07\x63omment\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\n\n\x02id\x18\x02 \x01(\t\x12&\n\x1c\x61scii_armored_pgp_public_key\x18\x03 \x01(\tH\x00\x12R\n\x0fpkix_public_key\x18\x05 \x01(\x0b\x32\x37.google.cloud.binaryauthorization.v1beta1.PkixPublicKeyH\x00\x42\x0c\n\npublic_keyB\xb7\x02\n,com.google.cloud.binaryauthorization.v1beta1B!BinaryAuthorizationResourcesProtoP\x01Z^cloud.google.com/go/binaryauthorization/apiv1beta1/binaryauthorizationpb;binaryauthorizationpb\xaa\x02(Google.Cloud.BinaryAuthorization.V1Beta1\xca\x02(Google\\Cloud\\BinaryAuthorization\\V1beta1\xea\x02+Google::Cloud::BinaryAuthorization::V1beta1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module BinaryAuthorization + module V1beta1 + Policy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.Policy").msgclass + Policy::GlobalPolicyEvaluationMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.Policy.GlobalPolicyEvaluationMode").enummodule + AdmissionWhitelistPattern = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern").msgclass + AdmissionRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.AdmissionRule").msgclass + AdmissionRule::EvaluationMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.AdmissionRule.EvaluationMode").enummodule + AdmissionRule::EnforcementMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.AdmissionRule.EnforcementMode").enummodule + Attestor = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.Attestor").msgclass + UserOwnedDrydockNote = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote").msgclass + PkixPublicKey = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.PkixPublicKey").msgclass + PkixPublicKey::SignatureAlgorithm = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.PkixPublicKey.SignatureAlgorithm").enummodule + AttestorPublicKey = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.AttestorPublicKey").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binaryauthorization/v1beta1/service_pb.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binaryauthorization/v1beta1/service_pb.rb new file mode 100644 index 000000000000..6741655dceb7 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binaryauthorization/v1beta1/service_pb.rb @@ -0,0 +1,36 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/binaryauthorization/v1beta1/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/binaryauthorization/v1beta1/resources_pb' +require 'google/protobuf/empty_pb' + + +descriptor_data = "\n6google/cloud/binaryauthorization/v1beta1/service.proto\x12(google.cloud.binaryauthorization.v1beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x38google/cloud/binaryauthorization/v1beta1/resources.proto\x1a\x1bgoogle/protobuf/empty.proto\"S\n\x10GetPolicyRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)binaryauthorization.googleapis.com/Policy\"\\\n\x13UpdatePolicyRequest\x12\x45\n\x06policy\x18\x01 \x01(\x0b\x32\x30.google.cloud.binaryauthorization.v1beta1.PolicyB\x03\xe0\x41\x02\"\xc1\x01\n\x15\x43reateAttestorRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x18\n\x0b\x61ttestor_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12I\n\x08\x61ttestor\x18\x03 \x01(\x0b\x32\x32.google.cloud.binaryauthorization.v1beta1.AttestorB\x03\xe0\x41\x02\"W\n\x12GetAttestorRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+binaryauthorization.googleapis.com/Attestor\"b\n\x15UpdateAttestorRequest\x12I\n\x08\x61ttestor\x18\x01 \x01(\x0b\x32\x32.google.cloud.binaryauthorization.v1beta1.AttestorB\x03\xe0\x41\x02\"\x82\x01\n\x14ListAttestorsRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"w\n\x15ListAttestorsResponse\x12\x45\n\tattestors\x18\x01 \x03(\x0b\x32\x32.google.cloud.binaryauthorization.v1beta1.Attestor\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"Z\n\x15\x44\x65leteAttestorRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+binaryauthorization.googleapis.com/Attestor\"Y\n\x16GetSystemPolicyRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)binaryauthorization.googleapis.com/Policy2\xcb\x0b\n BinauthzManagementServiceV1Beta1\x12\xab\x01\n\tGetPolicy\x12:.google.cloud.binaryauthorization.v1beta1.GetPolicyRequest\x1a\x30.google.cloud.binaryauthorization.v1beta1.Policy\"0\xda\x41\x04name\x82\xd3\xe4\x93\x02#\x12!/v1beta1/{name=projects/*/policy}\x12\xc2\x01\n\x0cUpdatePolicy\x12=.google.cloud.binaryauthorization.v1beta1.UpdatePolicyRequest\x1a\x30.google.cloud.binaryauthorization.v1beta1.Policy\"A\xda\x41\x06policy\x82\xd3\xe4\x93\x02\x32\x1a(/v1beta1/{policy.name=projects/*/policy}:\x06policy\x12\xdd\x01\n\x0e\x43reateAttestor\x12?.google.cloud.binaryauthorization.v1beta1.CreateAttestorRequest\x1a\x32.google.cloud.binaryauthorization.v1beta1.Attestor\"V\xda\x41\x1bparent,attestor_id,attestor\x82\xd3\xe4\x93\x02\x32\"&/v1beta1/{parent=projects/*}/attestors:\x08\x61ttestor\x12\xb6\x01\n\x0bGetAttestor\x12<.google.cloud.binaryauthorization.v1beta1.GetAttestorRequest\x1a\x32.google.cloud.binaryauthorization.v1beta1.Attestor\"5\xda\x41\x04name\x82\xd3\xe4\x93\x02(\x12&/v1beta1/{name=projects/*/attestors/*}\x12\xd3\x01\n\x0eUpdateAttestor\x12?.google.cloud.binaryauthorization.v1beta1.UpdateAttestorRequest\x1a\x32.google.cloud.binaryauthorization.v1beta1.Attestor\"L\xda\x41\x08\x61ttestor\x82\xd3\xe4\x93\x02;\x1a//v1beta1/{attestor.name=projects/*/attestors/*}:\x08\x61ttestor\x12\xc9\x01\n\rListAttestors\x12>.google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest\x1a?.google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse\"7\xda\x41\x06parent\x82\xd3\xe4\x93\x02(\x12&/v1beta1/{parent=projects/*}/attestors\x12\xa0\x01\n\x0e\x44\x65leteAttestor\x12?.google.cloud.binaryauthorization.v1beta1.DeleteAttestorRequest\x1a\x16.google.protobuf.Empty\"5\xda\x41\x04name\x82\xd3\xe4\x93\x02(*&/v1beta1/{name=projects/*/attestors/*}\x1aV\xca\x41\"binaryauthorization.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platform2\xa8\x02\n\x13SystemPolicyV1Beta1\x12\xb8\x01\n\x0fGetSystemPolicy\x12@.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest\x1a\x30.google.cloud.binaryauthorization.v1beta1.Policy\"1\xda\x41\x04name\x82\xd3\xe4\x93\x02$\x12\"/v1beta1/{name=locations/*/policy}\x1aV\xca\x41\"binaryauthorization.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xb5\x02\n,com.google.cloud.binaryauthorization.v1beta1B\x1f\x42inaryAuthorizationServiceProtoP\x01Z^cloud.google.com/go/binaryauthorization/apiv1beta1/binaryauthorizationpb;binaryauthorizationpb\xaa\x02(Google.Cloud.BinaryAuthorization.V1Beta1\xca\x02(Google\\Cloud\\BinaryAuthorization\\V1beta1\xea\x02+Google::Cloud::BinaryAuthorization::V1beta1b\x06proto3" + +pool = ::Google::Protobuf::DescriptorPool.generated_pool +pool.add_serialized_file(descriptor_data) + +module Google + module Cloud + module BinaryAuthorization + module V1beta1 + GetPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.GetPolicyRequest").msgclass + UpdatePolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.UpdatePolicyRequest").msgclass + CreateAttestorRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.CreateAttestorRequest").msgclass + GetAttestorRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.GetAttestorRequest").msgclass + UpdateAttestorRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.UpdateAttestorRequest").msgclass + ListAttestorsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest").msgclass + ListAttestorsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse").msgclass + DeleteAttestorRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.DeleteAttestorRequest").msgclass + GetSystemPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binaryauthorization/v1beta1/service_services_pb.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binaryauthorization/v1beta1/service_services_pb.rb new file mode 100644 index 000000000000..68b5c171433a --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binaryauthorization/v1beta1/service_services_pb.rb @@ -0,0 +1,112 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/binaryauthorization/v1beta1/service.proto for package 'Google.Cloud.BinaryAuthorization.V1beta1' +# 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/binaryauthorization/v1beta1/service_pb' + +module Google + module Cloud + module BinaryAuthorization + module V1beta1 + module BinauthzManagementServiceV1Beta1 + # Customer-facing API for Cloud Binary Authorization. + # + # Google Cloud Management Service for Binary Authorization admission policies + # and attestation authorities. + # + # This API implements a REST model with the following objects: + # + # * [Policy][google.cloud.binaryauthorization.v1beta1.Policy] + # * [Attestor][google.cloud.binaryauthorization.v1beta1.Attestor] + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1' + + # A [policy][google.cloud.binaryauthorization.v1beta1.Policy] specifies the + # [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] that must + # attest to a container image, before the project is allowed to deploy that + # image. There is at most one policy per project. All image admission + # requests are permitted if a project has no policy. + # + # Gets the [policy][google.cloud.binaryauthorization.v1beta1.Policy] for this + # project. Returns a default + # [policy][google.cloud.binaryauthorization.v1beta1.Policy] if the project + # does not have one. + rpc :GetPolicy, ::Google::Cloud::BinaryAuthorization::V1beta1::GetPolicyRequest, ::Google::Cloud::BinaryAuthorization::V1beta1::Policy + # Creates or updates a project's + # [policy][google.cloud.binaryauthorization.v1beta1.Policy], and returns a + # copy of the new [policy][google.cloud.binaryauthorization.v1beta1.Policy]. + # A policy is always updated as a whole, to avoid race conditions with + # concurrent policy enforcement (or management!) requests. Returns NOT_FOUND + # if the project does not exist, INVALID_ARGUMENT if the request is + # malformed. + rpc :UpdatePolicy, ::Google::Cloud::BinaryAuthorization::V1beta1::UpdatePolicyRequest, ::Google::Cloud::BinaryAuthorization::V1beta1::Policy + # Creates an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor], + # and returns a copy of the new + # [attestor][google.cloud.binaryauthorization.v1beta1.Attestor]. Returns + # NOT_FOUND if the project does not exist, INVALID_ARGUMENT if the request is + # malformed, ALREADY_EXISTS if the + # [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] already + # exists. + rpc :CreateAttestor, ::Google::Cloud::BinaryAuthorization::V1beta1::CreateAttestorRequest, ::Google::Cloud::BinaryAuthorization::V1beta1::Attestor + # Gets an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor]. + # Returns NOT_FOUND if the + # [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] does not + # exist. + rpc :GetAttestor, ::Google::Cloud::BinaryAuthorization::V1beta1::GetAttestorRequest, ::Google::Cloud::BinaryAuthorization::V1beta1::Attestor + # Updates an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor]. + # Returns NOT_FOUND if the + # [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] does not + # exist. + rpc :UpdateAttestor, ::Google::Cloud::BinaryAuthorization::V1beta1::UpdateAttestorRequest, ::Google::Cloud::BinaryAuthorization::V1beta1::Attestor + # Lists [attestors][google.cloud.binaryauthorization.v1beta1.Attestor]. + # Returns INVALID_ARGUMENT if the project does not exist. + rpc :ListAttestors, ::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsRequest, ::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsResponse + # Deletes an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor]. + # Returns NOT_FOUND if the + # [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] does not + # exist. + rpc :DeleteAttestor, ::Google::Cloud::BinaryAuthorization::V1beta1::DeleteAttestorRequest, ::Google::Protobuf::Empty + end + + Stub = Service.rpc_stub_class + end + module SystemPolicyV1Beta1 + # API for working with the system policy. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.binaryauthorization.v1beta1.SystemPolicyV1Beta1' + + # Gets the current system policy in the specified location. + rpc :GetSystemPolicy, ::Google::Cloud::BinaryAuthorization::V1beta1::GetSystemPolicyRequest, ::Google::Cloud::BinaryAuthorization::V1beta1::Policy + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/README.md b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/README.md new file mode 100644 index 000000000000..be8531e0c118 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Binary Authorization V1beta1 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-binary_authorization-v1beta1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..3ab0b096d445 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/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-binary_authorization-v1beta1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/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-binary_authorization-v1beta1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/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-binary_authorization-v1beta1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/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-binary_authorization-v1beta1/proto_docs/google/cloud/binaryauthorization/v1beta1/continuous_validation_logging.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/cloud/binaryauthorization/v1beta1/continuous_validation_logging.rb new file mode 100644 index 000000000000..b6a5fb241fd4 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/cloud/binaryauthorization/v1beta1/continuous_validation_logging.rb @@ -0,0 +1,201 @@ +# 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 BinaryAuthorization + module V1beta1 + # Represents an auditing event from Continuous Validation. + # @!attribute [rw] pod_event + # @return [::Google::Cloud::BinaryAuthorization::V1beta1::ContinuousValidationEvent::ContinuousValidationPodEvent] + # Pod event. + # + # Note: The following fields are mutually exclusive: `pod_event`, `config_error_event`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] config_error_event + # @return [::Google::Cloud::BinaryAuthorization::V1beta1::ContinuousValidationEvent::ConfigErrorEvent] + # Config error event. + # + # Note: The following fields are mutually exclusive: `config_error_event`, `pod_event`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class ContinuousValidationEvent + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # An auditing event for one Pod. + # @!attribute [rw] pod_namespace + # @return [::String] + # The k8s namespace of the Pod. + # @!attribute [rw] pod + # @return [::String] + # The name of the Pod. + # @!attribute [rw] policy_name + # @return [::String] + # The name of the policy. + # @!attribute [rw] deploy_time + # @return [::Google::Protobuf::Timestamp] + # Deploy time of the Pod from k8s. + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # Termination time of the Pod from k8s, or nothing if still running. + # @!attribute [rw] verdict + # @return [::Google::Cloud::BinaryAuthorization::V1beta1::ContinuousValidationEvent::ContinuousValidationPodEvent::PolicyConformanceVerdict] + # Auditing verdict for this Pod. + # @!attribute [rw] images + # @return [::Array<::Google::Cloud::BinaryAuthorization::V1beta1::ContinuousValidationEvent::ContinuousValidationPodEvent::ImageDetails>] + # List of images with auditing details. + class ContinuousValidationPodEvent + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Container image with auditing details. + # @!attribute [rw] image + # @return [::String] + # The name of the image. + # @!attribute [rw] container_name + # @return [::String] + # The name of the container. + # @!attribute [rw] container_type + # @return [::Google::Cloud::BinaryAuthorization::V1beta1::ContinuousValidationEvent::ContinuousValidationPodEvent::ImageDetails::ContainerType] + # The container type that this image belongs to. + # @!attribute [rw] result + # @return [::Google::Cloud::BinaryAuthorization::V1beta1::ContinuousValidationEvent::ContinuousValidationPodEvent::ImageDetails::AuditResult] + # The result of the audit for this image. + # @!attribute [rw] description + # @return [::String] + # Description of the above result. + # @!attribute [rw] check_results + # @return [::Array<::Google::Cloud::BinaryAuthorization::V1beta1::ContinuousValidationEvent::ContinuousValidationPodEvent::ImageDetails::CheckResult>] + # List of check results. + class ImageDetails + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] check_set_index + # @return [::String] + # The index of the check set. + # @!attribute [rw] check_set_name + # @return [::String] + # The name of the check set. + # @!attribute [rw] check_set_scope + # @return [::Google::Cloud::BinaryAuthorization::V1beta1::ContinuousValidationEvent::ContinuousValidationPodEvent::ImageDetails::CheckResult::CheckSetScope] + # The scope of the check set. + # @!attribute [rw] check_index + # @return [::String] + # The index of the check. + # @!attribute [rw] check_name + # @return [::String] + # The name of the check. + # @!attribute [rw] check_type + # @return [::String] + # The type of the check. + # @!attribute [rw] verdict + # @return [::Google::Cloud::BinaryAuthorization::V1beta1::ContinuousValidationEvent::ContinuousValidationPodEvent::ImageDetails::CheckResult::CheckVerdict] + # The verdict of this check. + # @!attribute [rw] explanation + # @return [::String] + # User-friendly explanation of this check result. + class CheckResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A scope specifier for check sets. + # @!attribute [rw] kubernetes_service_account + # @return [::String] + # Matches a single Kubernetes service account, e.g. + # 'my-namespace:my-service-account'. + # `kubernetes_service_account` scope is always more specific than + # `kubernetes_namespace` scope for the same namespace. + # + # Note: The following fields are mutually exclusive: `kubernetes_service_account`, `kubernetes_namespace`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] kubernetes_namespace + # @return [::String] + # Matches all Kubernetes service accounts in the provided + # namespace, unless a more specific `kubernetes_service_account` + # scope already matched. + # + # Note: The following fields are mutually exclusive: `kubernetes_namespace`, `kubernetes_service_account`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class CheckSetScope + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Result of evaluating one check. + module CheckVerdict + # We should always have a verdict. This is an error. + CHECK_VERDICT_UNSPECIFIED = 0 + + # The check was successfully evaluated and the image did not satisfy + # the check. + NON_CONFORMANT = 1 + end + end + + # The container type. + module ContainerType + # The container type should always be specified. This is an error. + CONTAINER_TYPE_UNSPECIFIED = 0 + + # A regular deployment. + CONTAINER = 1 + + # Init container defined as specified at + # https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ + INIT_CONTAINER = 2 + + # Ephemeral container defined as specified at + # https://kubernetes.io/docs/concepts/workloads/pods/ephemeral-containers/ + EPHEMERAL_CONTAINER = 3 + end + + # Result of the audit. + module AuditResult + # Unspecified result. This is an error. + AUDIT_RESULT_UNSPECIFIED = 0 + + # Image is allowed. + ALLOW = 1 + + # Image is denied. + DENY = 2 + end + end + + # Audit time policy conformance verdict. + module PolicyConformanceVerdict + # We should always have a verdict. This is an error. + POLICY_CONFORMANCE_VERDICT_UNSPECIFIED = 0 + + # The pod violates the policy. + VIOLATES_POLICY = 1 + end + end + + # An event describing a user-actionable configuration issue that prevents CV + # from auditing. + # @!attribute [rw] description + # @return [::String] + # A description of the issue. + class ConfigErrorEvent + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/cloud/binaryauthorization/v1beta1/resources.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/cloud/binaryauthorization/v1beta1/resources.rb new file mode 100644 index 000000000000..bce1c007c5da --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/cloud/binaryauthorization/v1beta1/resources.rb @@ -0,0 +1,403 @@ +# 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 BinaryAuthorization + module V1beta1 + # A {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy} for Binary + # Authorization. + # @!attribute [r] name + # @return [::String] + # Output only. The resource name, in the format `projects/*/policy`. There is + # at most one policy per project. + # @!attribute [rw] description + # @return [::String] + # Optional. A descriptive comment. + # @!attribute [rw] global_policy_evaluation_mode + # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Policy::GlobalPolicyEvaluationMode] + # Optional. Controls the evaluation of a Google-maintained global admission + # policy for common system-level images. Images not covered by the global + # policy will be subject to the project admission policy. This setting + # has no effect when specified inside a global admission policy. + # @!attribute [rw] admission_whitelist_patterns + # @return [::Array<::Google::Cloud::BinaryAuthorization::V1beta1::AdmissionWhitelistPattern>] + # Optional. Admission policy allowlisting. A matching admission request will + # always be permitted. This feature is typically used to exclude Google or + # third-party infrastructure images from Binary Authorization policies. + # @!attribute [rw] cluster_admission_rules + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::BinaryAuthorization::V1beta1::AdmissionRule}] + # Optional. Per-cluster admission rules. Cluster spec format: + # `location.clusterId`. There can be at most one admission rule per cluster + # spec. + # A `location` is either a compute zone (e.g. us-central1-a) or a region + # (e.g. us-central1). + # For `clusterId` syntax restrictions see + # https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters. + # @!attribute [rw] kubernetes_namespace_admission_rules + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::BinaryAuthorization::V1beta1::AdmissionRule}] + # Optional. Per-kubernetes-namespace admission rules. K8s namespace spec + # format: + # `[a-z.-]+`, e.g. `some-namespace` + # @!attribute [rw] kubernetes_service_account_admission_rules + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::BinaryAuthorization::V1beta1::AdmissionRule}] + # Optional. Per-kubernetes-service-account admission rules. Service account + # spec format: `namespace:serviceaccount`. e.g. `test-ns:default` + # @!attribute [rw] istio_service_identity_admission_rules + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::BinaryAuthorization::V1beta1::AdmissionRule}] + # Optional. Per-istio-service-identity admission rules. Istio service + # identity spec format: + # `spiffe:///ns//sa/` or + # `/ns//sa/` + # e.g. `spiffe://example.com/ns/test-ns/sa/default` + # @!attribute [rw] default_admission_rule + # @return [::Google::Cloud::BinaryAuthorization::V1beta1::AdmissionRule] + # Required. Default admission rule for a cluster without a per-cluster, per- + # kubernetes-service-account, or per-istio-service-identity admission rule. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time when the policy was last updated. + # @!attribute [rw] etag + # @return [::String] + # Optional. A checksum, returned by the server, that can be sent on update + # requests to ensure the policy has an up-to-date value before attempting to + # update it. See https://google.aip.dev/154. + class Policy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::BinaryAuthorization::V1beta1::AdmissionRule] + class ClusterAdmissionRulesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::BinaryAuthorization::V1beta1::AdmissionRule] + class KubernetesNamespaceAdmissionRulesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::BinaryAuthorization::V1beta1::AdmissionRule] + class KubernetesServiceAccountAdmissionRulesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::BinaryAuthorization::V1beta1::AdmissionRule] + class IstioServiceIdentityAdmissionRulesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + module GlobalPolicyEvaluationMode + # Not specified: DISABLE is assumed. + GLOBAL_POLICY_EVALUATION_MODE_UNSPECIFIED = 0 + + # Enables system policy evaluation. + ENABLE = 1 + + # Disables system policy evaluation. + DISABLE = 2 + end + end + + # An [admission allowlist + # pattern][google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern] + # exempts images from checks by [admission + # rules][google.cloud.binaryauthorization.v1beta1.AdmissionRule]. + # @!attribute [rw] name_pattern + # @return [::String] + # An image name pattern to allowlist, in the form `registry/path/to/image`. + # This supports a trailing `*` as a wildcard, but this is allowed only in + # text after the `registry/` part. `*` wildcard does not match `/`, i.e., + # `gcr.io/nginx*` matches `gcr.io/nginx@latest`, but it does not match + # `gcr.io/nginx/image`. This also supports a trailing `**` wildcard which + # matches subdirectories, i.e., `gcr.io/nginx**` matches + # `gcr.io/nginx/image`. + class AdmissionWhitelistPattern + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # An {::Google::Cloud::BinaryAuthorization::V1beta1::AdmissionRule admission rule} + # specifies either that all container images used in a pod creation request + # must be attested to by one or more + # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors}, that all pod + # creations will be allowed, or that all pod creations will be denied. + # + # Images matching an [admission allowlist + # pattern][google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern] + # are exempted from admission rules and will never block a pod creation. + # @!attribute [rw] evaluation_mode + # @return [::Google::Cloud::BinaryAuthorization::V1beta1::AdmissionRule::EvaluationMode] + # Required. How this admission rule will be evaluated. + # @!attribute [rw] require_attestations_by + # @return [::Array<::String>] + # @!attribute [rw] enforcement_mode + # @return [::Google::Cloud::BinaryAuthorization::V1beta1::AdmissionRule::EnforcementMode] + # Required. The action when a pod creation is denied by the admission rule. + class AdmissionRule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + module EvaluationMode + # Do not use. + EVALUATION_MODE_UNSPECIFIED = 0 + + # This rule allows all all pod creations. + ALWAYS_ALLOW = 1 + + # This rule allows a pod creation if all the attestors listed in + # `require_attestations_by` have valid attestations for all of the + # images in the pod spec. + REQUIRE_ATTESTATION = 2 + + # This rule denies all pod creations. + ALWAYS_DENY = 3 + end + + # TODO(wietse) re-word this text to 'per-image' instead of 'per-pod' and to + # allow for three-way evaluation (allow, deny, delegate). + # Defines the possible actions when a pod creation is denied by an admission + # rule. + module EnforcementMode + # Do not use. + ENFORCEMENT_MODE_UNSPECIFIED = 0 + + # Enforce the admission rule by blocking the pod creation. + ENFORCED_BLOCK_AND_AUDIT_LOG = 1 + + # Dryrun mode: Audit logging only. This will allow the pod creation as if + # the admission request had specified break-glass. + DRYRUN_AUDIT_LOG_ONLY = 2 + end + end + + # An {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} that attests + # to container image artifacts. An existing attestor cannot be modified except + # where indicated. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name, in the format: + # `projects/*/attestors/*`. This field may not be updated. + # @!attribute [rw] description + # @return [::String] + # Optional. A descriptive comment. This field may be updated. + # The field may be displayed in chooser dialogs. + # @!attribute [rw] user_owned_drydock_note + # @return [::Google::Cloud::BinaryAuthorization::V1beta1::UserOwnedDrydockNote] + # A Drydock ATTESTATION_AUTHORITY Note, created by the user. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time when the attestor was last updated. + # @!attribute [rw] etag + # @return [::String] + # Optional. A checksum, returned by the server, that can be sent on update + # requests to ensure the attestor has an up-to-date value before attempting + # to update it. See https://google.aip.dev/154. + class Attestor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # An [user owned drydock + # note][google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote] + # references a Drydock ATTESTATION_AUTHORITY Note created by the user. + # @!attribute [rw] note_reference + # @return [::String] + # Required. The Drydock resource name of a ATTESTATION_AUTHORITY Note, + # created by the user, in the format: `projects/*/notes/*` (or the legacy + # `providers/*/notes/*`). This field may not be updated. + # + # An attestation by this attestor is stored as a Drydock + # ATTESTATION_AUTHORITY Occurrence that names a container image and that + # links to this Note. Drydock is an external dependency. + # @!attribute [rw] public_keys + # @return [::Array<::Google::Cloud::BinaryAuthorization::V1beta1::AttestorPublicKey>] + # Optional. Public keys that verify attestations signed by this + # attestor. This field may be updated. + # + # If this field is non-empty, one of the specified public keys must + # verify that an attestation was signed by this attestor for the + # image specified in the admission request. + # + # If this field is empty, this attestor always returns that no + # valid attestations exist. + # @!attribute [r] delegation_service_account_email + # @return [::String] + # Output only. This field will contain the service account email address + # that this Attestor will use as the principal when querying Container + # Analysis. Attestor administrators must grant this service account the + # IAM role needed to read attestations from the [note_reference][Note] in + # Container Analysis (`containeranalysis.notes.occurrences.viewer`). + # + # This email address is fixed for the lifetime of the Attestor, but callers + # should not make any other assumptions about the service account email; + # future versions may use an email based on a different naming pattern. + class UserOwnedDrydockNote + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A public key in the PkixPublicKey format (see + # https://tools.ietf.org/html/rfc5280#section-4.1.2.7 for details). + # Public keys of this type are typically textually encoded using the PEM + # format. + # @!attribute [rw] public_key_pem + # @return [::String] + # A PEM-encoded public key, as described in + # https://tools.ietf.org/html/rfc7468#section-13 + # @!attribute [rw] signature_algorithm + # @return [::Google::Cloud::BinaryAuthorization::V1beta1::PkixPublicKey::SignatureAlgorithm] + # The signature algorithm used to verify a message against a signature using + # this key. + # These signature algorithm must match the structure and any object + # identifiers encoded in `public_key_pem` (i.e. this algorithm must match + # that of the public key). + class PkixPublicKey + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Represents a signature algorithm and other information necessary to verify + # signatures with a given public key. + # This is based primarily on the public key types supported by Tink's + # PemKeyType, which is in turn based on KMS's supported signing algorithms. + # See https://cloud.google.com/kms/docs/algorithms. In the future, BinAuthz + # might support additional public key types independently of Tink and/or KMS. + module SignatureAlgorithm + # Not specified. + SIGNATURE_ALGORITHM_UNSPECIFIED = 0 + + # RSASSA-PSS 2048 bit key with a SHA256 digest. + RSA_PSS_2048_SHA256 = 1 + + # RSASSA-PSS 2048 bit key with a SHA256 digest. + RSA_SIGN_PSS_2048_SHA256 = 1 + + # RSASSA-PSS 3072 bit key with a SHA256 digest. + RSA_PSS_3072_SHA256 = 2 + + # RSASSA-PSS 3072 bit key with a SHA256 digest. + RSA_SIGN_PSS_3072_SHA256 = 2 + + # RSASSA-PSS 4096 bit key with a SHA256 digest. + RSA_PSS_4096_SHA256 = 3 + + # RSASSA-PSS 4096 bit key with a SHA256 digest. + RSA_SIGN_PSS_4096_SHA256 = 3 + + # RSASSA-PSS 4096 bit key with a SHA512 digest. + RSA_PSS_4096_SHA512 = 4 + + # RSASSA-PSS 4096 bit key with a SHA512 digest. + RSA_SIGN_PSS_4096_SHA512 = 4 + + # RSASSA-PKCS1-v1_5 with a 2048 bit key and a SHA256 digest. + RSA_SIGN_PKCS1_2048_SHA256 = 5 + + # RSASSA-PKCS1-v1_5 with a 3072 bit key and a SHA256 digest. + RSA_SIGN_PKCS1_3072_SHA256 = 6 + + # RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA256 digest. + RSA_SIGN_PKCS1_4096_SHA256 = 7 + + # RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA512 digest. + RSA_SIGN_PKCS1_4096_SHA512 = 8 + + # ECDSA on the NIST P-256 curve with a SHA256 digest. + ECDSA_P256_SHA256 = 9 + + # ECDSA on the NIST P-256 curve with a SHA256 digest. + EC_SIGN_P256_SHA256 = 9 + + # ECDSA on the NIST P-384 curve with a SHA384 digest. + ECDSA_P384_SHA384 = 10 + + # ECDSA on the NIST P-384 curve with a SHA384 digest. + EC_SIGN_P384_SHA384 = 10 + + # ECDSA on the NIST P-521 curve with a SHA512 digest. + ECDSA_P521_SHA512 = 11 + + # ECDSA on the NIST P-521 curve with a SHA512 digest. + EC_SIGN_P521_SHA512 = 11 + + # ML-DSA-65 Post-Quantum Cryptography signature algorithm. + ML_DSA_65 = 13 + end + end + + # An [attestor public + # key][google.cloud.binaryauthorization.v1beta1.AttestorPublicKey] that will be + # used to verify attestations signed by this attestor. + # @!attribute [rw] comment + # @return [::String] + # Optional. A descriptive comment. This field may be updated. + # @!attribute [rw] id + # @return [::String] + # The ID of this public key. + # Signatures verified by BinAuthz must include the ID of the public key that + # can be used to verify them, and that ID must match the contents of this + # field exactly. + # Additional restrictions on this field can be imposed based on which public + # key type is encapsulated. See the documentation on `public_key` cases below + # for details. + # @!attribute [rw] ascii_armored_pgp_public_key + # @return [::String] + # ASCII-armored representation of a PGP public key, as the entire output by + # the command `gpg --export --armor foo@example.com` (either LF or CRLF + # line endings). + # When using this field, `id` should be left blank. The BinAuthz API + # handlers will calculate the ID and fill it in automatically. BinAuthz + # computes this ID as the OpenPGP RFC4880 V4 fingerprint, represented as + # upper-case hex. If `id` is provided by the caller, it will be + # overwritten by the API-calculated ID. + # + # Note: The following fields are mutually exclusive: `ascii_armored_pgp_public_key`, `pkix_public_key`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] pkix_public_key + # @return [::Google::Cloud::BinaryAuthorization::V1beta1::PkixPublicKey] + # A raw PKIX SubjectPublicKeyInfo format public key. + # + # NOTE: `id` may be explicitly provided by the caller when using this + # type of public key, but it MUST be a valid RFC3986 URI. If `id` is left + # blank, a default one will be computed based on the digest of the DER + # encoding of the public key. + # + # Note: The following fields are mutually exclusive: `pkix_public_key`, `ascii_armored_pgp_public_key`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class AttestorPublicKey + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/cloud/binaryauthorization/v1beta1/service.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/cloud/binaryauthorization/v1beta1/service.rb new file mode 100644 index 000000000000..aa3b65a11a46 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/cloud/binaryauthorization/v1beta1/service.rb @@ -0,0 +1,153 @@ +# 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 BinaryAuthorization + module V1beta1 + # Request message for [BinauthzManagementService.GetPolicy][]. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the + # {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy} to retrieve, in + # the format `projects/*/policy`. + class GetPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for [BinauthzManagementService.UpdatePolicy][]. + # @!attribute [rw] policy + # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Policy] + # Required. A new or updated + # {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy} value. The + # service will overwrite the [policy + # name][google.cloud.binaryauthorization.v1beta1.Policy.name] field with the + # resource name in the request URL, in the format `projects/*/policy`. + class UpdatePolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for [BinauthzManagementService.CreateAttestor][]. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent of this + # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor}. + # @!attribute [rw] attestor_id + # @return [::String] + # Required. The + # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors} ID. + # @!attribute [rw] attestor + # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor] + # Required. The initial + # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} value. The + # service will overwrite the [attestor + # name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with + # the resource name, in the format `projects/*/attestors/*`. + class CreateAttestorRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for [BinauthzManagementService.GetAttestor][]. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the + # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} to retrieve, + # in the format `projects/*/attestors/*`. + class GetAttestorRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for [BinauthzManagementService.UpdateAttestor][]. + # @!attribute [rw] attestor + # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor] + # Required. The updated + # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} value. The + # service will overwrite the [attestor + # name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with + # the resource name in the request URL, in the format + # `projects/*/attestors/*`. + class UpdateAttestorRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for [BinauthzManagementService.ListAttestors][]. + # @!attribute [rw] parent + # @return [::String] + # Required. The resource name of the project associated with the + # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors}, in the + # format `projects/*`. + # @!attribute [rw] page_size + # @return [::Integer] + # Requested page size. The server may return fewer results than requested. If + # unspecified, the server will pick an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # A token identifying a page of results the server should return. Typically, + # this is the value of + # {::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsResponse#next_page_token ListAttestorsResponse.next_page_token} + # returned from the previous call to the `ListAttestors` method. + class ListAttestorsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for [BinauthzManagementService.ListAttestors][]. + # @!attribute [rw] attestors + # @return [::Array<::Google::Cloud::BinaryAuthorization::V1beta1::Attestor>] + # The list of {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors}. + # @!attribute [rw] next_page_token + # @return [::String] + # A token to retrieve the next page of results. Pass this value in the + # {::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsRequest#page_token ListAttestorsRequest.page_token} + # field in the subsequent call to the `ListAttestors` method to retrieve the + # next page of results. + class ListAttestorsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for [BinauthzManagementService.DeleteAttestor][]. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the + # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors} to delete, + # in the format `projects/*/attestors/*`. + class DeleteAttestorRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to read the current system policy. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name, in the format `locations/*/policy`. + # Note that the system policy is not associated with a project. + class GetSystemPolicyRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/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-binary_authorization-v1beta1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/protobuf/empty.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A generic empty message that you can re-use to avoid defining duplicated + # empty messages in your APIs. A typical example is to use it as the request + # or the response type of an API method. For instance: + # + # service Foo { + # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); + # } + class Empty + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/protobuf/field_mask.rb @@ -0,0 +1,229 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `FieldMask` represents a set of symbolic field paths, for example: + # + # paths: "f.a" + # paths: "f.b.d" + # + # Here `f` represents a field in some root message, `a` and `b` + # fields in the message found in `f`, and `d` a field found in the + # message in `f.b`. + # + # Field masks are used to specify a subset of fields that should be + # returned by a get operation or modified by an update operation. + # Field masks also have a custom JSON encoding (see below). + # + # # Field Masks in Projections + # + # When used in the context of a projection, a response message or + # sub-message is filtered by the API to only contain those fields as + # specified in the mask. For example, if the mask in the previous + # example is applied to a response message as follows: + # + # f { + # a : 22 + # b { + # d : 1 + # x : 2 + # } + # y : 13 + # } + # z: 8 + # + # The result will not contain specific values for fields x,y and z + # (their value will be set to the default, and omitted in proto text + # output): + # + # + # f { + # a : 22 + # b { + # d : 1 + # } + # } + # + # A repeated field is not allowed except at the last position of a + # paths string. + # + # If a FieldMask object is not present in a get operation, the + # operation applies to all fields (as if a FieldMask of all fields + # had been specified). + # + # Note that a field mask does not necessarily apply to the + # top-level response message. In case of a REST get operation, the + # field mask applies directly to the response, but in case of a REST + # list operation, the mask instead applies to each individual message + # in the returned resource list. In case of a REST custom method, + # other definitions may be used. Where the mask applies will be + # clearly documented together with its declaration in the API. In + # any case, the effect on the returned resource/resources is required + # behavior for APIs. + # + # # Field Masks in Update Operations + # + # A field mask in update operations specifies which fields of the + # targeted resource are going to be updated. The API is required + # to only change the values of the fields as specified in the mask + # and leave the others untouched. If a resource is passed in to + # describe the updated values, the API ignores the values of all + # fields not covered by the mask. + # + # If a repeated field is specified for an update operation, new values will + # be appended to the existing repeated field in the target resource. Note that + # a repeated field is only allowed in the last position of a `paths` string. + # + # If a sub-message is specified in the last position of the field mask for an + # update operation, then new value will be merged into the existing sub-message + # in the target resource. + # + # For example, given the target message: + # + # f { + # b { + # d: 1 + # x: 2 + # } + # c: [1] + # } + # + # And an update message: + # + # f { + # b { + # d: 10 + # } + # c: [2] + # } + # + # then if the field mask is: + # + # paths: ["f.b", "f.c"] + # + # then the result will be: + # + # f { + # b { + # d: 10 + # x: 2 + # } + # c: [1, 2] + # } + # + # An implementation may provide options to override this default behavior for + # repeated and message fields. + # + # In order to reset a field's value to the default, the field must + # be in the mask and set to the default value in the provided resource. + # Hence, in order to reset all fields of a resource, provide a default + # instance of the resource and set all fields in the mask, or do + # not provide a mask as described below. + # + # If a field mask is not present on update, the operation applies to + # all fields (as if a field mask of all fields has been specified). + # Note that in the presence of schema evolution, this may mean that + # fields the client does not know and has therefore not filled into + # the request will be reset to their default. If this is unwanted + # behavior, a specific service may require a client to always specify + # a field mask, producing an error if not. + # + # As with get operations, the location of the resource which + # describes the updated values in the request message depends on the + # operation kind. In any case, the effect of the field mask is + # required to be honored by the API. + # + # ## Considerations for HTTP REST + # + # The HTTP kind of an update operation which uses a field mask must + # be set to PATCH instead of PUT in order to satisfy HTTP semantics + # (PUT must only be used for full updates). + # + # # JSON Encoding of Field Masks + # + # In JSON, a field mask is encoded as a single string where paths are + # separated by a comma. Fields name in each path are converted + # to/from lower-camel naming conventions. + # + # As an example, consider the following message declarations: + # + # message Profile { + # User user = 1; + # Photo photo = 2; + # } + # message User { + # string display_name = 1; + # string address = 2; + # } + # + # In proto a field mask for `Profile` may look as such: + # + # mask { + # paths: "user.display_name" + # paths: "photo" + # } + # + # In JSON, the same mask is represented as below: + # + # { + # mask: "user.displayName,photo" + # } + # + # # Field Masks and Oneof Fields + # + # Field masks treat fields in oneofs just as regular fields. Consider the + # following message: + # + # message SampleMessage { + # oneof test_oneof { + # string name = 4; + # SubMessage sub_message = 9; + # } + # } + # + # The field mask can be: + # + # mask { + # paths: "name" + # } + # + # Or: + # + # mask { + # paths: "sub_message" + # } + # + # Note that oneof type names ("test_oneof" in this case) cannot be used in + # paths. + # + # ## Field Mask Verification + # + # The implementation of any API method which has a FieldMask type field in the + # request should verify the included field paths, and return an + # `INVALID_ARGUMENT` error if any path is unmappable. + # @!attribute [rw] paths + # @return [::Array<::String>] + # The set of field mask paths. + class FieldMask + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,127 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch + # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to + # 9999-12-31T23:59:59Z inclusive. + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. Negative + # second values with fractions must still have non-negative nanos values + # that count forward in time. Must be from 0 to 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/type/expr.rb new file mode 100644 index 000000000000..53e7733b6592 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/type/expr.rb @@ -0,0 +1,75 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Type + # Represents a textual expression in the Common Expression Language (CEL) + # syntax. CEL is a C-like expression language. The syntax and semantics of CEL + # are documented at https://github.com/google/cel-spec. + # + # Example (Comparison): + # + # title: "Summary size limit" + # description: "Determines if a summary is less than 100 chars" + # expression: "document.summary.size() < 100" + # + # Example (Equality): + # + # title: "Requestor is owner" + # description: "Determines if requestor is the document owner" + # expression: "document.owner == request.auth.claims.email" + # + # Example (Logic): + # + # title: "Public documents" + # description: "Determine whether the document should be publicly visible" + # expression: "document.type != 'private' && document.type != 'internal'" + # + # Example (Data Manipulation): + # + # title: "Notification string" + # description: "Create a notification string with a timestamp." + # expression: "'New message received at ' + string(document.create_time)" + # + # The exact variables and functions that may be referenced within an expression + # are determined by the service that evaluates it. See the service + # documentation for additional information. + # @!attribute [rw] expression + # @return [::String] + # Textual representation of an expression in Common Expression Language + # syntax. + # @!attribute [rw] title + # @return [::String] + # Optional. Title for the expression, i.e. a short string describing + # its purpose. This can be used e.g. in UIs which allow to enter the + # expression. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of the expression. This is a longer text which + # describes the expression, e.g. when hovered over it in a UI. + # @!attribute [rw] location + # @return [::String] + # Optional. String indicating the location of the expression for error + # reporting, e.g. a file name and a position in the file. + class Expr + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/Gemfile b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/Gemfile new file mode 100644 index 000000000000..8f4b3597354e --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/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-binary_authorization-v1beta1", path: "../" +else + gem "google-cloud-binary_authorization-v1beta1" +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-binary_authorization-v1beta1/snippets/binauthz_management_service/create_attestor.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/create_attestor.rb new file mode 100644 index 000000000000..c46ee14890e1 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/create_attestor.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 binaryauthorization_v1beta1_generated_BinauthzManagementService_CreateAttestor_sync] +require "google/cloud/binary_authorization/v1beta1" + +## +# Snippet for the create_attestor call in the BinauthzManagementService 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::BinaryAuthorization::V1beta1::BinauthzManagementService::Client#create_attestor. +# +def create_attestor + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BinaryAuthorization::V1beta1::CreateAttestorRequest.new + + # Call the create_attestor method. + result = client.create_attestor request + + # The returned object is of type Google::Cloud::BinaryAuthorization::V1beta1::Attestor. + p result +end +# [END binaryauthorization_v1beta1_generated_BinauthzManagementService_CreateAttestor_sync] diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/delete_attestor.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/delete_attestor.rb new file mode 100644 index 000000000000..51992644d116 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/delete_attestor.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 binaryauthorization_v1beta1_generated_BinauthzManagementService_DeleteAttestor_sync] +require "google/cloud/binary_authorization/v1beta1" + +## +# Snippet for the delete_attestor call in the BinauthzManagementService 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::BinaryAuthorization::V1beta1::BinauthzManagementService::Client#delete_attestor. +# +def delete_attestor + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BinaryAuthorization::V1beta1::DeleteAttestorRequest.new + + # Call the delete_attestor method. + result = client.delete_attestor request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END binaryauthorization_v1beta1_generated_BinauthzManagementService_DeleteAttestor_sync] diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/get_attestor.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/get_attestor.rb new file mode 100644 index 000000000000..ef7b221c8b46 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/get_attestor.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 binaryauthorization_v1beta1_generated_BinauthzManagementService_GetAttestor_sync] +require "google/cloud/binary_authorization/v1beta1" + +## +# Snippet for the get_attestor call in the BinauthzManagementService 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::BinaryAuthorization::V1beta1::BinauthzManagementService::Client#get_attestor. +# +def get_attestor + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BinaryAuthorization::V1beta1::GetAttestorRequest.new + + # Call the get_attestor method. + result = client.get_attestor request + + # The returned object is of type Google::Cloud::BinaryAuthorization::V1beta1::Attestor. + p result +end +# [END binaryauthorization_v1beta1_generated_BinauthzManagementService_GetAttestor_sync] diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/get_policy.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/get_policy.rb new file mode 100644 index 000000000000..dce4e31a50aa --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/get_policy.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 binaryauthorization_v1beta1_generated_BinauthzManagementService_GetPolicy_sync] +require "google/cloud/binary_authorization/v1beta1" + +## +# Snippet for the get_policy call in the BinauthzManagementService 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::BinaryAuthorization::V1beta1::BinauthzManagementService::Client#get_policy. +# +def get_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BinaryAuthorization::V1beta1::GetPolicyRequest.new + + # Call the get_policy method. + result = client.get_policy request + + # The returned object is of type Google::Cloud::BinaryAuthorization::V1beta1::Policy. + p result +end +# [END binaryauthorization_v1beta1_generated_BinauthzManagementService_GetPolicy_sync] diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/list_attestors.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/list_attestors.rb new file mode 100644 index 000000000000..c2fbab3a0f9a --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/list_attestors.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 binaryauthorization_v1beta1_generated_BinauthzManagementService_ListAttestors_sync] +require "google/cloud/binary_authorization/v1beta1" + +## +# Snippet for the list_attestors call in the BinauthzManagementService 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::BinaryAuthorization::V1beta1::BinauthzManagementService::Client#list_attestors. +# +def list_attestors + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsRequest.new + + # Call the list_attestors method. + result = client.list_attestors 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::BinaryAuthorization::V1beta1::Attestor. + p item + end +end +# [END binaryauthorization_v1beta1_generated_BinauthzManagementService_ListAttestors_sync] diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/update_attestor.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/update_attestor.rb new file mode 100644 index 000000000000..ff23b5b74d4d --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/update_attestor.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 binaryauthorization_v1beta1_generated_BinauthzManagementService_UpdateAttestor_sync] +require "google/cloud/binary_authorization/v1beta1" + +## +# Snippet for the update_attestor call in the BinauthzManagementService 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::BinaryAuthorization::V1beta1::BinauthzManagementService::Client#update_attestor. +# +def update_attestor + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BinaryAuthorization::V1beta1::UpdateAttestorRequest.new + + # Call the update_attestor method. + result = client.update_attestor request + + # The returned object is of type Google::Cloud::BinaryAuthorization::V1beta1::Attestor. + p result +end +# [END binaryauthorization_v1beta1_generated_BinauthzManagementService_UpdateAttestor_sync] diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/update_policy.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/update_policy.rb new file mode 100644 index 000000000000..b802404b7a59 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/update_policy.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 binaryauthorization_v1beta1_generated_BinauthzManagementService_UpdatePolicy_sync] +require "google/cloud/binary_authorization/v1beta1" + +## +# Snippet for the update_policy call in the BinauthzManagementService 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::BinaryAuthorization::V1beta1::BinauthzManagementService::Client#update_policy. +# +def update_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BinaryAuthorization::V1beta1::UpdatePolicyRequest.new + + # Call the update_policy method. + result = client.update_policy request + + # The returned object is of type Google::Cloud::BinaryAuthorization::V1beta1::Policy. + p result +end +# [END binaryauthorization_v1beta1_generated_BinauthzManagementService_UpdatePolicy_sync] diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/snippet_metadata_google.cloud.binaryauthorization.v1beta1.json b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/snippet_metadata_google.cloud.binaryauthorization.v1beta1.json new file mode 100644 index 000000000000..a14f6813b420 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/snippet_metadata_google.cloud.binaryauthorization.v1beta1.json @@ -0,0 +1,335 @@ +{ + "client_library": { + "name": "google-cloud-binary_authorization-v1beta1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.binaryauthorization.v1beta1", + "version": "v1beta1" + } + ] + }, + "snippets": [ + { + "region_tag": "binaryauthorization_v1beta1_generated_BinauthzManagementService_GetPolicy_sync", + "title": "Snippet for the get_policy call in the BinauthzManagementService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client#get_policy.", + "file": "binauthz_management_service/get_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_policy", + "full_name": "::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client#get_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BinaryAuthorization::V1beta1::GetPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BinaryAuthorization::V1beta1::Policy", + "client": { + "short_name": "BinauthzManagementService::Client", + "full_name": "::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client" + }, + "method": { + "short_name": "GetPolicy", + "full_name": "google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1.GetPolicy", + "service": { + "short_name": "BinauthzManagementService", + "full_name": "google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "binaryauthorization_v1beta1_generated_BinauthzManagementService_UpdatePolicy_sync", + "title": "Snippet for the update_policy call in the BinauthzManagementService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client#update_policy.", + "file": "binauthz_management_service/update_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_policy", + "full_name": "::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client#update_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BinaryAuthorization::V1beta1::UpdatePolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BinaryAuthorization::V1beta1::Policy", + "client": { + "short_name": "BinauthzManagementService::Client", + "full_name": "::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client" + }, + "method": { + "short_name": "UpdatePolicy", + "full_name": "google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1.UpdatePolicy", + "service": { + "short_name": "BinauthzManagementService", + "full_name": "google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "binaryauthorization_v1beta1_generated_BinauthzManagementService_CreateAttestor_sync", + "title": "Snippet for the create_attestor call in the BinauthzManagementService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client#create_attestor.", + "file": "binauthz_management_service/create_attestor.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_attestor", + "full_name": "::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client#create_attestor", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BinaryAuthorization::V1beta1::CreateAttestorRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BinaryAuthorization::V1beta1::Attestor", + "client": { + "short_name": "BinauthzManagementService::Client", + "full_name": "::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client" + }, + "method": { + "short_name": "CreateAttestor", + "full_name": "google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1.CreateAttestor", + "service": { + "short_name": "BinauthzManagementService", + "full_name": "google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "binaryauthorization_v1beta1_generated_BinauthzManagementService_GetAttestor_sync", + "title": "Snippet for the get_attestor call in the BinauthzManagementService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client#get_attestor.", + "file": "binauthz_management_service/get_attestor.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_attestor", + "full_name": "::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client#get_attestor", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BinaryAuthorization::V1beta1::GetAttestorRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BinaryAuthorization::V1beta1::Attestor", + "client": { + "short_name": "BinauthzManagementService::Client", + "full_name": "::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client" + }, + "method": { + "short_name": "GetAttestor", + "full_name": "google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1.GetAttestor", + "service": { + "short_name": "BinauthzManagementService", + "full_name": "google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "binaryauthorization_v1beta1_generated_BinauthzManagementService_UpdateAttestor_sync", + "title": "Snippet for the update_attestor call in the BinauthzManagementService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client#update_attestor.", + "file": "binauthz_management_service/update_attestor.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_attestor", + "full_name": "::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client#update_attestor", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BinaryAuthorization::V1beta1::UpdateAttestorRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BinaryAuthorization::V1beta1::Attestor", + "client": { + "short_name": "BinauthzManagementService::Client", + "full_name": "::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client" + }, + "method": { + "short_name": "UpdateAttestor", + "full_name": "google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1.UpdateAttestor", + "service": { + "short_name": "BinauthzManagementService", + "full_name": "google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "binaryauthorization_v1beta1_generated_BinauthzManagementService_ListAttestors_sync", + "title": "Snippet for the list_attestors call in the BinauthzManagementService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client#list_attestors.", + "file": "binauthz_management_service/list_attestors.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_attestors", + "full_name": "::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client#list_attestors", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsResponse", + "client": { + "short_name": "BinauthzManagementService::Client", + "full_name": "::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client" + }, + "method": { + "short_name": "ListAttestors", + "full_name": "google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1.ListAttestors", + "service": { + "short_name": "BinauthzManagementService", + "full_name": "google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "binaryauthorization_v1beta1_generated_BinauthzManagementService_DeleteAttestor_sync", + "title": "Snippet for the delete_attestor call in the BinauthzManagementService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client#delete_attestor.", + "file": "binauthz_management_service/delete_attestor.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_attestor", + "full_name": "::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client#delete_attestor", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BinaryAuthorization::V1beta1::DeleteAttestorRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "BinauthzManagementService::Client", + "full_name": "::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client" + }, + "method": { + "short_name": "DeleteAttestor", + "full_name": "google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1.DeleteAttestor", + "service": { + "short_name": "BinauthzManagementService", + "full_name": "google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "binaryauthorization_v1beta1_generated_SystemPolicy_GetSystemPolicy_sync", + "title": "Snippet for the get_system_policy call in the SystemPolicy service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Client#get_system_policy.", + "file": "system_policy/get_system_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_system_policy", + "full_name": "::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Client#get_system_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::BinaryAuthorization::V1beta1::GetSystemPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::BinaryAuthorization::V1beta1::Policy", + "client": { + "short_name": "SystemPolicy::Client", + "full_name": "::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Client" + }, + "method": { + "short_name": "GetSystemPolicy", + "full_name": "google.cloud.binaryauthorization.v1beta1.SystemPolicyV1Beta1.GetSystemPolicy", + "service": { + "short_name": "SystemPolicy", + "full_name": "google.cloud.binaryauthorization.v1beta1.SystemPolicyV1Beta1" + } + } + }, + "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-binary_authorization-v1beta1/snippets/system_policy/get_system_policy.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/system_policy/get_system_policy.rb new file mode 100644 index 000000000000..3c42be712580 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/system_policy/get_system_policy.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 binaryauthorization_v1beta1_generated_SystemPolicy_GetSystemPolicy_sync] +require "google/cloud/binary_authorization/v1beta1" + +## +# Snippet for the get_system_policy call in the SystemPolicy 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::BinaryAuthorization::V1beta1::SystemPolicy::Client#get_system_policy. +# +def get_system_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::BinaryAuthorization::V1beta1::GetSystemPolicyRequest.new + + # Call the get_system_policy method. + result = client.get_system_policy request + + # The returned object is of type Google::Cloud::BinaryAuthorization::V1beta1::Policy. + p result +end +# [END binaryauthorization_v1beta1_generated_SystemPolicy_GetSystemPolicy_sync] diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/binauthz_management_service_paths_test.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/binauthz_management_service_paths_test.rb new file mode 100644 index 000000000000..ab4e972dbb0f --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/binauthz_management_service_paths_test.rb @@ -0,0 +1,82 @@ +# 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/binary_authorization/v1beta1/binauthz_management_service" + +class ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::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_attestor_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.attestor_path project: "value0", attestor: "value1" + assert_equal "projects/value0/attestors/value1", path + end + end + + def test_policy_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.policy_path project: "value0" + assert_equal "projects/value0/policy", path + + path = client.policy_path location: "value0" + assert_equal "locations/value0/policy", path + end + end + + def test_project_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.project_path project: "value0" + assert_equal "projects/value0", path + end + end +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/binauthz_management_service_rest_test.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/binauthz_management_service_rest_test.rb new file mode 100644 index 000000000000..1a2d3876da85 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/binauthz_management_service_rest_test.rb @@ -0,0 +1,481 @@ +# 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/binaryauthorization/v1beta1/service_pb" +require "google/cloud/binary_authorization/v1beta1/binauthz_management_service/rest" + + +class ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::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_policy + # Create test objects. + client_result = ::Google::Cloud::BinaryAuthorization::V1beta1::Policy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_policy_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::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::ServiceStub.stub :transcode_get_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_policy_client_stub do + # Create client + c = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_policy({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_policy name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_policy ::Google::Cloud::BinaryAuthorization::V1beta1::GetPolicyRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_policy({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_policy(::Google::Cloud::BinaryAuthorization::V1beta1::GetPolicyRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_policy_client_stub.call_count + end + end + end + + def test_update_policy + # Create test objects. + client_result = ::Google::Cloud::BinaryAuthorization::V1beta1::Policy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + policy = {} + + update_policy_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::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::ServiceStub.stub :transcode_update_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_policy_client_stub do + # Create client + c = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_policy({ policy: policy }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_policy policy: policy do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_policy ::Google::Cloud::BinaryAuthorization::V1beta1::UpdatePolicyRequest.new(policy: policy) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_policy({ policy: policy }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_policy(::Google::Cloud::BinaryAuthorization::V1beta1::UpdatePolicyRequest.new(policy: policy), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_policy_client_stub.call_count + end + end + end + + def test_create_attestor + # Create test objects. + client_result = ::Google::Cloud::BinaryAuthorization::V1beta1::Attestor.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + attestor_id = "hello world" + attestor = {} + + create_attestor_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::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::ServiceStub.stub :transcode_create_attestor_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_attestor_client_stub do + # Create client + c = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.create_attestor({ parent: parent, attestor_id: attestor_id, attestor: attestor }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.create_attestor parent: parent, attestor_id: attestor_id, attestor: attestor do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.create_attestor ::Google::Cloud::BinaryAuthorization::V1beta1::CreateAttestorRequest.new(parent: parent, attestor_id: attestor_id, attestor: attestor) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.create_attestor({ parent: parent, attestor_id: attestor_id, attestor: attestor }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.create_attestor(::Google::Cloud::BinaryAuthorization::V1beta1::CreateAttestorRequest.new(parent: parent, attestor_id: attestor_id, attestor: attestor), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_attestor_client_stub.call_count + end + end + end + + def test_get_attestor + # Create test objects. + client_result = ::Google::Cloud::BinaryAuthorization::V1beta1::Attestor.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_attestor_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::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::ServiceStub.stub :transcode_get_attestor_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_attestor_client_stub do + # Create client + c = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_attestor({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_attestor name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_attestor ::Google::Cloud::BinaryAuthorization::V1beta1::GetAttestorRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_attestor({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_attestor(::Google::Cloud::BinaryAuthorization::V1beta1::GetAttestorRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_attestor_client_stub.call_count + end + end + end + + def test_update_attestor + # Create test objects. + client_result = ::Google::Cloud::BinaryAuthorization::V1beta1::Attestor.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + attestor = {} + + update_attestor_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::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::ServiceStub.stub :transcode_update_attestor_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_attestor_client_stub do + # Create client + c = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.update_attestor({ attestor: attestor }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.update_attestor attestor: attestor do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.update_attestor ::Google::Cloud::BinaryAuthorization::V1beta1::UpdateAttestorRequest.new(attestor: attestor) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.update_attestor({ attestor: attestor }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.update_attestor(::Google::Cloud::BinaryAuthorization::V1beta1::UpdateAttestorRequest.new(attestor: attestor), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_attestor_client_stub.call_count + end + end + end + + def test_list_attestors + # Create test objects. + client_result = ::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsResponse.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_attestors_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::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::ServiceStub.stub :transcode_list_attestors_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_attestors_client_stub do + # Create client + c = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.list_attestors({ 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_attestors 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_attestors ::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsRequest.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_attestors({ 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_attestors(::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsRequest.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_attestors_client_stub.call_count + end + end + end + + def test_delete_attestor + # Create test objects. + client_result = ::Google::Protobuf::Empty.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_attestor_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::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::ServiceStub.stub :transcode_delete_attestor_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_attestor_client_stub do + # Create client + c = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.delete_attestor({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.delete_attestor name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.delete_attestor ::Google::Cloud::BinaryAuthorization::V1beta1::DeleteAttestorRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.delete_attestor({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.delete_attestor(::Google::Cloud::BinaryAuthorization::V1beta1::DeleteAttestorRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_attestor_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::BinaryAuthorization::V1beta1::BinauthzManagementService::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::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/binauthz_management_service_test.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/binauthz_management_service_test.rb new file mode 100644 index 000000000000..a97fd1677eb4 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/binauthz_management_service_test.rb @@ -0,0 +1,523 @@ +# 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/binaryauthorization/v1beta1/service_pb" +require "google/cloud/binary_authorization/v1beta1/binauthz_management_service" + +class ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::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_policy + # Create GRPC objects. + grpc_response = ::Google::Cloud::BinaryAuthorization::V1beta1::Policy.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_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_policy, name + assert_kind_of ::Google::Cloud::BinaryAuthorization::V1beta1::GetPolicyRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_policy_client_stub do + # Create client + c = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_policy({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_policy name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_policy ::Google::Cloud::BinaryAuthorization::V1beta1::GetPolicyRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_policy({ 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_policy(::Google::Cloud::BinaryAuthorization::V1beta1::GetPolicyRequest.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_policy_client_stub.call_rpc_count + end + end + + def test_update_policy + # Create GRPC objects. + grpc_response = ::Google::Cloud::BinaryAuthorization::V1beta1::Policy.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. + policy = {} + + update_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_policy, name + assert_kind_of ::Google::Cloud::BinaryAuthorization::V1beta1::UpdatePolicyRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BinaryAuthorization::V1beta1::Policy), request["policy"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_policy_client_stub do + # Create client + c = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_policy({ policy: policy }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_policy policy: policy do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_policy ::Google::Cloud::BinaryAuthorization::V1beta1::UpdatePolicyRequest.new(policy: policy) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_policy({ policy: policy }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_policy(::Google::Cloud::BinaryAuthorization::V1beta1::UpdatePolicyRequest.new(policy: policy), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_policy_client_stub.call_rpc_count + end + end + + def test_create_attestor + # Create GRPC objects. + grpc_response = ::Google::Cloud::BinaryAuthorization::V1beta1::Attestor.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" + attestor_id = "hello world" + attestor = {} + + create_attestor_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_attestor, name + assert_kind_of ::Google::Cloud::BinaryAuthorization::V1beta1::CreateAttestorRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["attestor_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BinaryAuthorization::V1beta1::Attestor), request["attestor"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_attestor_client_stub do + # Create client + c = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.create_attestor({ parent: parent, attestor_id: attestor_id, attestor: attestor }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.create_attestor parent: parent, attestor_id: attestor_id, attestor: attestor do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.create_attestor ::Google::Cloud::BinaryAuthorization::V1beta1::CreateAttestorRequest.new(parent: parent, attestor_id: attestor_id, attestor: attestor) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.create_attestor({ parent: parent, attestor_id: attestor_id, attestor: attestor }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.create_attestor(::Google::Cloud::BinaryAuthorization::V1beta1::CreateAttestorRequest.new(parent: parent, attestor_id: attestor_id, attestor: attestor), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_attestor_client_stub.call_rpc_count + end + end + + def test_get_attestor + # Create GRPC objects. + grpc_response = ::Google::Cloud::BinaryAuthorization::V1beta1::Attestor.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_attestor_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_attestor, name + assert_kind_of ::Google::Cloud::BinaryAuthorization::V1beta1::GetAttestorRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_attestor_client_stub do + # Create client + c = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_attestor({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_attestor name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_attestor ::Google::Cloud::BinaryAuthorization::V1beta1::GetAttestorRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_attestor({ 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_attestor(::Google::Cloud::BinaryAuthorization::V1beta1::GetAttestorRequest.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_attestor_client_stub.call_rpc_count + end + end + + def test_update_attestor + # Create GRPC objects. + grpc_response = ::Google::Cloud::BinaryAuthorization::V1beta1::Attestor.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. + attestor = {} + + update_attestor_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_attestor, name + assert_kind_of ::Google::Cloud::BinaryAuthorization::V1beta1::UpdateAttestorRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BinaryAuthorization::V1beta1::Attestor), request["attestor"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_attestor_client_stub do + # Create client + c = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.update_attestor({ attestor: attestor }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.update_attestor attestor: attestor do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.update_attestor ::Google::Cloud::BinaryAuthorization::V1beta1::UpdateAttestorRequest.new(attestor: attestor) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.update_attestor({ attestor: attestor }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.update_attestor(::Google::Cloud::BinaryAuthorization::V1beta1::UpdateAttestorRequest.new(attestor: attestor), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_attestor_client_stub.call_rpc_count + end + end + + def test_list_attestors + # Create GRPC objects. + grpc_response = ::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsResponse.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_attestors_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_attestors, name + assert_kind_of ::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsRequest, 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_attestors_client_stub do + # Create client + c = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.list_attestors({ 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_attestors 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_attestors ::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsRequest.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_attestors({ 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_attestors(::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsRequest.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_attestors_client_stub.call_rpc_count + end + end + + def test_delete_attestor + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_attestor_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_attestor, name + assert_kind_of ::Google::Cloud::BinaryAuthorization::V1beta1::DeleteAttestorRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_attestor_client_stub do + # Create client + c = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.delete_attestor({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.delete_attestor name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.delete_attestor ::Google::Cloud::BinaryAuthorization::V1beta1::DeleteAttestorRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.delete_attestor({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + c.delete_attestor(::Google::Cloud::BinaryAuthorization::V1beta1::DeleteAttestorRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_attestor_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::BinaryAuthorization::V1beta1::BinauthzManagementService::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::BinaryAuthorization::V1beta1::BinauthzManagementService::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::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/system_policy_paths_test.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/system_policy_paths_test.rb new file mode 100644 index 000000000000..4133cf9a2fdf --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/system_policy_paths_test.rb @@ -0,0 +1,58 @@ +# 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/binary_authorization/v1beta1/system_policy" + +class ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::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_policy_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.policy_path project: "value0" + assert_equal "projects/value0/policy", path + + path = client.policy_path location: "value0" + assert_equal "locations/value0/policy", path + end + end +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/system_policy_rest_test.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/system_policy_rest_test.rb new file mode 100644 index 000000000000..bd48c3606241 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/system_policy_rest_test.rb @@ -0,0 +1,153 @@ +# 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/binaryauthorization/v1beta1/service_pb" +require "google/cloud/binary_authorization/v1beta1/system_policy/rest" + + +class ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::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_system_policy + # Create test objects. + client_result = ::Google::Cloud::BinaryAuthorization::V1beta1::Policy.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_system_policy_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::BinaryAuthorization::V1beta1::SystemPolicy::Rest::ServiceStub.stub :transcode_get_system_policy_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_system_policy_client_stub do + # Create client + c = ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + c.get_system_policy({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + c.get_system_policy name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + c.get_system_policy ::Google::Cloud::BinaryAuthorization::V1beta1::GetSystemPolicyRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + c.get_system_policy({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + c.get_system_policy(::Google::Cloud::BinaryAuthorization::V1beta1::GetSystemPolicyRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_system_policy_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::BinaryAuthorization::V1beta1::SystemPolicy::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::BinaryAuthorization::V1beta1::SystemPolicy::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/system_policy_test.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/system_policy_test.rb new file mode 100644 index 000000000000..71860931b93d --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/system_policy_test.rb @@ -0,0 +1,162 @@ +# 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/binaryauthorization/v1beta1/service_pb" +require "google/cloud/binary_authorization/v1beta1/system_policy" + +class ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::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_system_policy + # Create GRPC objects. + grpc_response = ::Google::Cloud::BinaryAuthorization::V1beta1::Policy.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_system_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_system_policy, name + assert_kind_of ::Google::Cloud::BinaryAuthorization::V1beta1::GetSystemPolicyRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_system_policy_client_stub do + # Create client + c = ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + c.get_system_policy({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + c.get_system_policy name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + c.get_system_policy ::Google::Cloud::BinaryAuthorization::V1beta1::GetSystemPolicyRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + c.get_system_policy({ 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_system_policy(::Google::Cloud::BinaryAuthorization::V1beta1::GetSystemPolicyRequest.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_system_policy_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::BinaryAuthorization::V1beta1::SystemPolicy::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::BinaryAuthorization::V1beta1::SystemPolicy::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::BinaryAuthorization::V1beta1::SystemPolicy::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/helper.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/helper.rb new file mode 100644 index 000000000000..672b337030e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/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 ee461b6cde1ba73da7b81bc7861aca6eda5b45ca Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Tue, 7 Jul 2026 00:00:12 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20po?= =?UTF-8?q?st-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- .../.owlbot-manifest.json | 3 + .../README.md | 2 +- ...cloud-binary_authorization-v1beta1.gemspec | 3 +- .../binauthz_management_service/client.rb | 118 +- .../binauthz_management_service/rest.rb | 1 + .../rest/client.rb | 126 +- .../v1beta1/bindings_override.rb | 0 .../binary_authorization/v1beta1/rest.rb | 1 + .../v1beta1/system_policy/client.rb | 16 + .../v1beta1/system_policy/rest.rb | 1 + .../v1beta1/system_policy/rest/client.rb | 24 + .../v1beta1/resources_pb.rb | 2 +- .../binaryauthorization/v1beta1/service_pb.rb | 2 +- .../v1beta1/service_services_pb.rb | 48 +- .../binaryauthorization/v1beta1/resources.rb | 75 +- .../binaryauthorization/v1beta1/service.rb | 59 +- .../proto_docs/google/protobuf/field_mask.rb | 0 .../proto_docs/google/type/expr.rb | 0 .../.gitignore | 22 - .../.repo-metadata.json | 19 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 -- .../CHANGELOG.md | 2 - .../Gemfile | 14 - .../LICENSE.md | 201 --- .../README.md | 154 --- .../Rakefile | 169 --- .../gapic_metadata.json | 67 - ...cloud-binary_authorization-v1beta1.gemspec | 29 - ...ogle-cloud-binary_authorization-v1beta1.rb | 21 - .../cloud/binary_authorization/v1beta1.rb | 46 - .../v1beta1/binauthz_management_service.rb | 61 - .../binauthz_management_service/client.rb | 1154 ----------------- .../credentials.rb | 51 - .../binauthz_management_service/paths.rb | 97 -- .../binauthz_management_service/rest.rb | 59 - .../rest/client.rb | 1070 --------------- .../rest/service_stub.rb | 511 -------- .../binary_authorization/v1beta1/rest.rb | 39 - .../v1beta1/system_policy.rb | 55 - .../v1beta1/system_policy/client.rb | 493 ------- .../v1beta1/system_policy/credentials.rb | 51 - .../v1beta1/system_policy/paths.rb | 66 - .../v1beta1/system_policy/rest.rb | 53 - .../v1beta1/system_policy/rest/client.rb | 451 ------- .../system_policy/rest/service_stub.rb | 142 -- .../binary_authorization/v1beta1/version.rb | 28 - .../continuous_validation_logging_pb.rb | 32 - .../v1beta1/resources_pb.rb | 35 - .../binaryauthorization/v1beta1/service_pb.rb | 36 - .../v1beta1/service_services_pb.rb | 112 -- .../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 ---- .../v1beta1/continuous_validation_logging.rb | 201 --- .../binaryauthorization/v1beta1/resources.rb | 403 ------ .../binaryauthorization/v1beta1/service.rb | 153 --- .../proto_docs/google/protobuf/duration.rb | 98 -- .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/timestamp.rb | 127 -- .../snippets/Gemfile | 32 - .../create_attestor.rb | 47 - .../delete_attestor.rb | 47 - .../get_attestor.rb | 47 - .../binauthz_management_service/get_policy.rb | 47 - .../list_attestors.rb | 51 - .../update_attestor.rb | 47 - .../update_policy.rb | 47 - ...gle.cloud.binaryauthorization.v1beta1.json | 335 ----- .../system_policy/get_system_policy.rb | 47 - .../binauthz_management_service_paths_test.rb | 82 -- .../binauthz_management_service_rest_test.rb | 481 ------- .../binauthz_management_service_test.rb | 523 -------- .../v1beta1/system_policy_paths_test.rb | 58 - .../v1beta1/system_policy_rest_test.rb | 153 --- .../v1beta1/system_policy_test.rb | 162 --- .../test/helper.rb | 26 - 81 files changed, 340 insertions(+), 9904 deletions(-) rename {owl-bot-staging/google-cloud-binary_authorization-v1beta1 => google-cloud-binary_authorization-v1beta1}/lib/google/cloud/binary_authorization/v1beta1/bindings_override.rb (100%) rename {owl-bot-staging/google-cloud-binary_authorization-v1beta1 => google-cloud-binary_authorization-v1beta1}/proto_docs/google/protobuf/field_mask.rb (100%) rename {owl-bot-staging/google-cloud-binary_authorization-v1beta1 => google-cloud-binary_authorization-v1beta1}/proto_docs/google/type/expr.rb (100%) delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/README.md delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/google-cloud-binary_authorization-v1beta1.gemspec delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google-cloud-binary_authorization-v1beta1.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/client.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/paths.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/rest.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/version.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binaryauthorization/v1beta1/continuous_validation_logging_pb.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binaryauthorization/v1beta1/resources_pb.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binaryauthorization/v1beta1/service_pb.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binaryauthorization/v1beta1/service_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/cloud/binaryauthorization/v1beta1/continuous_validation_logging.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/cloud/binaryauthorization/v1beta1/resources.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/cloud/binaryauthorization/v1beta1/service.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/create_attestor.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/delete_attestor.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/get_attestor.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/get_policy.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/list_attestors.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/update_attestor.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/update_policy.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/snippet_metadata_google.cloud.binaryauthorization.v1beta1.json delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/system_policy/get_system_policy.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/binauthz_management_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/binauthz_management_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/binauthz_management_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/system_policy_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/system_policy_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/system_policy_test.rb delete mode 100644 owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/helper.rb diff --git a/google-cloud-binary_authorization-v1beta1/.owlbot-manifest.json b/google-cloud-binary_authorization-v1beta1/.owlbot-manifest.json index 8ed70d1ee1dd..34275a7ef495 100644 --- a/google-cloud-binary_authorization-v1beta1/.owlbot-manifest.json +++ b/google-cloud-binary_authorization-v1beta1/.owlbot-manifest.json @@ -22,6 +22,7 @@ "lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/rest.rb", "lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/rest/client.rb", "lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/rest/service_stub.rb", + "lib/google/cloud/binary_authorization/v1beta1/bindings_override.rb", "lib/google/cloud/binary_authorization/v1beta1/rest.rb", "lib/google/cloud/binary_authorization/v1beta1/system_policy.rb", "lib/google/cloud/binary_authorization/v1beta1/system_policy/client.rb", @@ -45,7 +46,9 @@ "proto_docs/google/cloud/binaryauthorization/v1beta1/service.rb", "proto_docs/google/protobuf/duration.rb", "proto_docs/google/protobuf/empty.rb", + "proto_docs/google/protobuf/field_mask.rb", "proto_docs/google/protobuf/timestamp.rb", + "proto_docs/google/type/expr.rb", "snippets/Gemfile", "snippets/binauthz_management_service/create_attestor.rb", "snippets/binauthz_management_service/delete_attestor.rb", diff --git a/google-cloud-binary_authorization-v1beta1/README.md b/google-cloud-binary_authorization-v1beta1/README.md index d9eb75dd820d..84667672376f 100644 --- a/google-cloud-binary_authorization-v1beta1/README.md +++ b/google-cloud-binary_authorization-v1beta1/README.md @@ -1,6 +1,6 @@ # Ruby Client for the Binary Authorization V1beta1 API -The management interface for Binary Authorization, a system providing policy control for images deployed to Kubernetes Engine clusters, Anthos clusters on VMware, and Cloud Run. +The management interface for Binary Authorization, a service that provides policy-based deployment validation and control for images deployed to Google Kubernetes Engine (GKE), Anthos Service Mesh, Anthos Clusters, and Cloud Run. Binary Authorization is a service on Google Cloud that provides centralized software supply-chain security for applications that run on Google Kubernetes Engine (GKE) and GKE on-prem. diff --git a/google-cloud-binary_authorization-v1beta1/google-cloud-binary_authorization-v1beta1.gemspec b/google-cloud-binary_authorization-v1beta1/google-cloud-binary_authorization-v1beta1.gemspec index 251568eedee0..8baa815ccb07 100644 --- a/google-cloud-binary_authorization-v1beta1/google-cloud-binary_authorization-v1beta1.gemspec +++ b/google-cloud-binary_authorization-v1beta1/google-cloud-binary_authorization-v1beta1.gemspec @@ -10,7 +10,7 @@ Gem::Specification.new do |gem| gem.authors = ["Google LLC"] gem.email = "googleapis-packages@google.com" gem.description = "Binary Authorization is a service on Google Cloud that provides centralized software supply-chain security for applications that run on Google Kubernetes Engine (GKE) and GKE on-prem. Note that google-cloud-binary_authorization-v1beta1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-binary_authorization instead. See the readme for more details." - gem.summary = "The management interface for Binary Authorization, a system providing policy control for images deployed to Kubernetes Engine clusters, Anthos clusters on VMware, and Cloud Run." + gem.summary = "The management interface for Binary Authorization, a service that provides policy-based deployment validation and control for images deployed to Google Kubernetes Engine (GKE), Anthos Service Mesh, Anthos Clusters, and Cloud Run." gem.homepage = "https://github.com/googleapis/google-cloud-ruby" gem.license = "Apache-2.0" @@ -25,4 +25,5 @@ Gem::Specification.new do |gem| gem.add_dependency "gapic-common", "~> 1.3" gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "google-iam-v1", "~> 1.3" end diff --git a/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/client.rb b/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/client.rb index 58a47f23bf87..617d6f0c78ee 100644 --- a/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/client.rb +++ b/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/client.rb @@ -18,6 +18,7 @@ require "google/cloud/errors" require "google/cloud/binaryauthorization/v1beta1/service_pb" +require "google/iam/v1" module Google module Cloud @@ -208,8 +209,23 @@ def initialize entry.set "defaultTimeout", @config.timeout if @config.timeout entry.set "quotaProject", @quota_project_id if @quota_project_id end + + @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @binauthz_management_service_stub.endpoint + config.universe_domain = @binauthz_management_service_stub.universe_domain + config.logger = @binauthz_management_service_stub.logger if config.respond_to? :logger= + end end + ## + # Get the associated client for mix-in of the IAMPolicy. + # + # @return [Google::Iam::V1::IAMPolicy::Client] + # + attr_reader :iam_policy_client + ## # The logger used for request/response debug logging. # @@ -222,13 +238,16 @@ def logger # Service calls ## - # A {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy} specifies the {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors} that must attest to - # a container image, before the project is allowed to deploy that + # A {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy} specifies the + # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors} that must + # attest to a container image, before the project is allowed to deploy that # image. There is at most one policy per project. All image admission # requests are permitted if a project has no policy. # - # Gets the {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy} for this project. Returns a default - # {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy} if the project does not have one. + # Gets the {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy} for this + # project. Returns a default + # {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy} if the project + # does not have one. # # @overload get_policy(request, options = nil) # Pass arguments to `get_policy` via a request object, either of type @@ -246,8 +265,9 @@ def logger # the default parameter values, pass an empty Hash as a request object (see above). # # @param name [::String] - # Required. The resource name of the {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy} to retrieve, - # in the format `projects/*/policy`. + # Required. The resource name of the + # {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy} to retrieve, in + # the format `projects/*/policy`. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Cloud::BinaryAuthorization::V1beta1::Policy] @@ -314,11 +334,13 @@ def get_policy request, options = nil end ## - # Creates or updates a project's {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy}, and returns a copy of the - # new {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy}. A policy is always updated as a whole, to avoid race - # conditions with concurrent policy enforcement (or management!) - # requests. Returns NOT_FOUND if the project does not exist, INVALID_ARGUMENT - # if the request is malformed. + # Creates or updates a project's + # {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy}, and returns a + # copy of the new {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy}. + # A policy is always updated as a whole, to avoid race conditions with + # concurrent policy enforcement (or management!) requests. Returns NOT_FOUND + # if the project does not exist, INVALID_ARGUMENT if the request is + # malformed. # # @overload update_policy(request, options = nil) # Pass arguments to `update_policy` via a request object, either of type @@ -336,9 +358,11 @@ def get_policy request, options = nil # the default parameter values, pass an empty Hash as a request object (see above). # # @param policy [::Google::Cloud::BinaryAuthorization::V1beta1::Policy, ::Hash] - # Required. A new or updated {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy} value. The service will - # overwrite the {::Google::Cloud::BinaryAuthorization::V1beta1::Policy#name policy name} field with the resource name in - # the request URL, in the format `projects/*/policy`. + # Required. A new or updated + # {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy} value. The + # service will overwrite the [policy + # name][google.cloud.binaryauthorization.v1beta1.Policy.name] field with the + # resource name in the request URL, in the format `projects/*/policy`. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Cloud::BinaryAuthorization::V1beta1::Policy] @@ -405,10 +429,13 @@ def update_policy request, options = nil end ## - # Creates an {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor}, and returns a copy of the new - # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor}. Returns NOT_FOUND if the project does not exist, - # INVALID_ARGUMENT if the request is malformed, ALREADY_EXISTS if the - # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} already exists. + # Creates an {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor}, + # and returns a copy of the new + # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor}. Returns + # NOT_FOUND if the project does not exist, INVALID_ARGUMENT if the request is + # malformed, ALREADY_EXISTS if the + # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} already + # exists. # # @overload create_attestor(request, options = nil) # Pass arguments to `create_attestor` via a request object, either of type @@ -426,13 +453,17 @@ def update_policy request, options = nil # the default parameter values, pass an empty Hash as a request object (see above). # # @param parent [::String] - # Required. The parent of this {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor}. + # Required. The parent of this + # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor}. # @param attestor_id [::String] - # Required. The {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors} ID. + # Required. The + # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors} ID. # @param attestor [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor, ::Hash] - # Required. The initial {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} value. The service will - # overwrite the {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor#name attestor name} field with the resource name, - # in the format `projects/*/attestors/*`. + # Required. The initial + # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} value. The + # service will overwrite the [attestor + # name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with + # the resource name, in the format `projects/*/attestors/*`. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor] @@ -500,7 +531,9 @@ def create_attestor request, options = nil ## # Gets an {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor}. - # Returns NOT_FOUND if the {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} does not exist. + # Returns NOT_FOUND if the + # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} does not + # exist. # # @overload get_attestor(request, options = nil) # Pass arguments to `get_attestor` via a request object, either of type @@ -518,8 +551,9 @@ def create_attestor request, options = nil # the default parameter values, pass an empty Hash as a request object (see above). # # @param name [::String] - # Required. The name of the {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} to retrieve, in the format - # `projects/*/attestors/*`. + # Required. The name of the + # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} to retrieve, + # in the format `projects/*/attestors/*`. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor] @@ -587,7 +621,9 @@ def get_attestor request, options = nil ## # Updates an {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor}. - # Returns NOT_FOUND if the {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} does not exist. + # Returns NOT_FOUND if the + # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} does not + # exist. # # @overload update_attestor(request, options = nil) # Pass arguments to `update_attestor` via a request object, either of type @@ -605,9 +641,12 @@ def get_attestor request, options = nil # the default parameter values, pass an empty Hash as a request object (see above). # # @param attestor [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor, ::Hash] - # Required. The updated {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} value. The service will - # overwrite the {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor#name attestor name} field with the resource name - # in the request URL, in the format `projects/*/attestors/*`. + # Required. The updated + # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} value. The + # service will overwrite the [attestor + # name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with + # the resource name in the request URL, in the format + # `projects/*/attestors/*`. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor] @@ -694,14 +733,16 @@ def update_attestor request, options = nil # # @param parent [::String] # Required. The resource name of the project associated with the - # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors}, in the format `projects/*`. + # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors}, in the + # format `projects/*`. # @param page_size [::Integer] # Requested page size. The server may return fewer results than requested. If # unspecified, the server will pick an appropriate default. # @param page_token [::String] # A token identifying a page of results the server should return. Typically, - # this is the value of {::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsResponse#next_page_token ListAttestorsResponse.next_page_token} returned - # from the previous call to the `ListAttestors` method. + # this is the value of + # {::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsResponse#next_page_token ListAttestorsResponse.next_page_token} + # returned from the previous call to the `ListAttestors` method. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BinaryAuthorization::V1beta1::Attestor>] @@ -774,8 +815,10 @@ def list_attestors request, options = nil end ## - # Deletes an {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor}. Returns NOT_FOUND if the - # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} does not exist. + # Deletes an {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor}. + # Returns NOT_FOUND if the + # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} does not + # exist. # # @overload delete_attestor(request, options = nil) # Pass arguments to `delete_attestor` via a request object, either of type @@ -793,8 +836,9 @@ def list_attestors request, options = nil # the default parameter values, pass an empty Hash as a request object (see above). # # @param name [::String] - # Required. The name of the {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors} to delete, in the format - # `projects/*/attestors/*`. + # Required. The name of the + # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors} to delete, + # in the format `projects/*/attestors/*`. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Protobuf::Empty] diff --git a/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/rest.rb b/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/rest.rb index 8387461a5ff6..4bd4d92d93ba 100644 --- a/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/rest.rb +++ b/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/rest.rb @@ -21,6 +21,7 @@ require "gapic/config/method" require "google/cloud/binary_authorization/v1beta1/version" +require "google/cloud/binary_authorization/v1beta1/bindings_override" require "google/cloud/binary_authorization/v1beta1/binauthz_management_service/credentials" require "google/cloud/binary_authorization/v1beta1/binauthz_management_service/paths" diff --git a/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/rest/client.rb b/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/rest/client.rb index bb738d74babf..85be5bd751a5 100644 --- a/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/rest/client.rb +++ b/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/rest/client.rb @@ -19,6 +19,7 @@ require "google/cloud/errors" require "google/cloud/binaryauthorization/v1beta1/service_pb" require "google/cloud/binary_authorization/v1beta1/binauthz_management_service/rest/service_stub" +require "google/iam/v1/rest" module Google module Cloud @@ -201,8 +202,24 @@ def initialize entry.set "defaultTimeout", @config.timeout if @config.timeout entry.set "quotaProject", @quota_project_id if @quota_project_id end + + @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @binauthz_management_service_stub.endpoint + config.universe_domain = @binauthz_management_service_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @binauthz_management_service_stub.logger if config.respond_to? :logger= + end end + ## + # Get the associated client for mix-in of the IAMPolicy. + # + # @return [Google::Iam::V1::IAMPolicy::Rest::Client] + # + attr_reader :iam_policy_client + ## # The logger used for request/response debug logging. # @@ -215,13 +232,16 @@ def logger # Service calls ## - # A {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy} specifies the {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors} that must attest to - # a container image, before the project is allowed to deploy that + # A {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy} specifies the + # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors} that must + # attest to a container image, before the project is allowed to deploy that # image. There is at most one policy per project. All image admission # requests are permitted if a project has no policy. # - # Gets the {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy} for this project. Returns a default - # {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy} if the project does not have one. + # Gets the {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy} for this + # project. Returns a default + # {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy} if the project + # does not have one. # # @overload get_policy(request, options = nil) # Pass arguments to `get_policy` via a request object, either of type @@ -239,8 +259,9 @@ def logger # the default parameter values, pass an empty Hash as a request object (see above). # # @param name [::String] - # Required. The resource name of the {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy} to retrieve, - # in the format `projects/*/policy`. + # Required. The resource name of the + # {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy} to retrieve, in + # the format `projects/*/policy`. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::BinaryAuthorization::V1beta1::Policy] # @yieldparam operation [::Gapic::Rest::TransportOperation] @@ -300,11 +321,13 @@ def get_policy request, options = nil end ## - # Creates or updates a project's {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy}, and returns a copy of the - # new {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy}. A policy is always updated as a whole, to avoid race - # conditions with concurrent policy enforcement (or management!) - # requests. Returns NOT_FOUND if the project does not exist, INVALID_ARGUMENT - # if the request is malformed. + # Creates or updates a project's + # {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy}, and returns a + # copy of the new {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy}. + # A policy is always updated as a whole, to avoid race conditions with + # concurrent policy enforcement (or management!) requests. Returns NOT_FOUND + # if the project does not exist, INVALID_ARGUMENT if the request is + # malformed. # # @overload update_policy(request, options = nil) # Pass arguments to `update_policy` via a request object, either of type @@ -322,9 +345,11 @@ def get_policy request, options = nil # the default parameter values, pass an empty Hash as a request object (see above). # # @param policy [::Google::Cloud::BinaryAuthorization::V1beta1::Policy, ::Hash] - # Required. A new or updated {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy} value. The service will - # overwrite the {::Google::Cloud::BinaryAuthorization::V1beta1::Policy#name policy name} field with the resource name in - # the request URL, in the format `projects/*/policy`. + # Required. A new or updated + # {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy} value. The + # service will overwrite the [policy + # name][google.cloud.binaryauthorization.v1beta1.Policy.name] field with the + # resource name in the request URL, in the format `projects/*/policy`. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::BinaryAuthorization::V1beta1::Policy] # @yieldparam operation [::Gapic::Rest::TransportOperation] @@ -384,10 +409,13 @@ def update_policy request, options = nil end ## - # Creates an {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor}, and returns a copy of the new - # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor}. Returns NOT_FOUND if the project does not exist, - # INVALID_ARGUMENT if the request is malformed, ALREADY_EXISTS if the - # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} already exists. + # Creates an {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor}, + # and returns a copy of the new + # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor}. Returns + # NOT_FOUND if the project does not exist, INVALID_ARGUMENT if the request is + # malformed, ALREADY_EXISTS if the + # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} already + # exists. # # @overload create_attestor(request, options = nil) # Pass arguments to `create_attestor` via a request object, either of type @@ -405,13 +433,17 @@ def update_policy request, options = nil # the default parameter values, pass an empty Hash as a request object (see above). # # @param parent [::String] - # Required. The parent of this {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor}. + # Required. The parent of this + # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor}. # @param attestor_id [::String] - # Required. The {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors} ID. + # Required. The + # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors} ID. # @param attestor [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor, ::Hash] - # Required. The initial {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} value. The service will - # overwrite the {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor#name attestor name} field with the resource name, - # in the format `projects/*/attestors/*`. + # Required. The initial + # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} value. The + # service will overwrite the [attestor + # name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with + # the resource name, in the format `projects/*/attestors/*`. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor] # @yieldparam operation [::Gapic::Rest::TransportOperation] @@ -472,7 +504,9 @@ def create_attestor request, options = nil ## # Gets an {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor}. - # Returns NOT_FOUND if the {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} does not exist. + # Returns NOT_FOUND if the + # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} does not + # exist. # # @overload get_attestor(request, options = nil) # Pass arguments to `get_attestor` via a request object, either of type @@ -490,8 +524,9 @@ def create_attestor request, options = nil # the default parameter values, pass an empty Hash as a request object (see above). # # @param name [::String] - # Required. The name of the {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} to retrieve, in the format - # `projects/*/attestors/*`. + # Required. The name of the + # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} to retrieve, + # in the format `projects/*/attestors/*`. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor] # @yieldparam operation [::Gapic::Rest::TransportOperation] @@ -552,7 +587,9 @@ def get_attestor request, options = nil ## # Updates an {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor}. - # Returns NOT_FOUND if the {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} does not exist. + # Returns NOT_FOUND if the + # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} does not + # exist. # # @overload update_attestor(request, options = nil) # Pass arguments to `update_attestor` via a request object, either of type @@ -570,9 +607,12 @@ def get_attestor request, options = nil # the default parameter values, pass an empty Hash as a request object (see above). # # @param attestor [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor, ::Hash] - # Required. The updated {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} value. The service will - # overwrite the {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor#name attestor name} field with the resource name - # in the request URL, in the format `projects/*/attestors/*`. + # Required. The updated + # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} value. The + # service will overwrite the [attestor + # name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with + # the resource name in the request URL, in the format + # `projects/*/attestors/*`. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor] # @yieldparam operation [::Gapic::Rest::TransportOperation] @@ -652,14 +692,16 @@ def update_attestor request, options = nil # # @param parent [::String] # Required. The resource name of the project associated with the - # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors}, in the format `projects/*`. + # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors}, in the + # format `projects/*`. # @param page_size [::Integer] # Requested page size. The server may return fewer results than requested. If # unspecified, the server will pick an appropriate default. # @param page_token [::String] # A token identifying a page of results the server should return. Typically, - # this is the value of {::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsResponse#next_page_token ListAttestorsResponse.next_page_token} returned - # from the previous call to the `ListAttestors` method. + # this is the value of + # {::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsResponse#next_page_token ListAttestorsResponse.next_page_token} + # returned from the previous call to the `ListAttestors` method. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BinaryAuthorization::V1beta1::Attestor>] # @yieldparam operation [::Gapic::Rest::TransportOperation] @@ -725,8 +767,10 @@ def list_attestors request, options = nil end ## - # Deletes an {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor}. Returns NOT_FOUND if the - # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} does not exist. + # Deletes an {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor}. + # Returns NOT_FOUND if the + # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} does not + # exist. # # @overload delete_attestor(request, options = nil) # Pass arguments to `delete_attestor` via a request object, either of type @@ -744,8 +788,9 @@ def list_attestors request, options = nil # the default parameter values, pass an empty Hash as a request object (see above). # # @param name [::String] - # Required. The name of the {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors} to delete, in the format - # `projects/*/attestors/*`. + # Required. The name of the + # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors} to delete, + # in the format `projects/*/attestors/*`. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Protobuf::Empty] # @yieldparam operation [::Gapic::Rest::TransportOperation] @@ -912,6 +957,13 @@ class Configuration config_attr :retry_policy, nil, ::Hash, ::Proc, nil config_attr :quota_project, nil, ::String, nil config_attr :universe_domain, nil, ::String, nil + + # @private + # Overrides for http bindings for the RPCs of this service + # are only used when this service is used as mixin, and only + # by the host service. + # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] + config_attr :bindings_override, {}, ::Hash, nil config_attr :logger, :default, ::Logger, nil, :default # @private diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/bindings_override.rb b/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/bindings_override.rb similarity index 100% rename from owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/bindings_override.rb rename to google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/bindings_override.rb diff --git a/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/rest.rb b/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/rest.rb index b70b450af2c5..7cd1564cfbd5 100644 --- a/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/rest.rb +++ b/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/rest.rb @@ -18,6 +18,7 @@ require "google/cloud/binary_authorization/v1beta1/binauthz_management_service/rest" require "google/cloud/binary_authorization/v1beta1/system_policy/rest" +require "google/cloud/binary_authorization/v1beta1/bindings_override" require "google/cloud/binary_authorization/v1beta1/version" module Google diff --git a/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/client.rb b/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/client.rb index a31615800d4a..1fe8b232ca32 100644 --- a/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/client.rb +++ b/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/client.rb @@ -18,6 +18,7 @@ require "google/cloud/errors" require "google/cloud/binaryauthorization/v1beta1/service_pb" +require "google/iam/v1" module Google module Cloud @@ -170,8 +171,23 @@ def initialize entry.set "defaultTimeout", @config.timeout if @config.timeout entry.set "quotaProject", @quota_project_id if @quota_project_id end + + @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @system_policy_stub.endpoint + config.universe_domain = @system_policy_stub.universe_domain + config.logger = @system_policy_stub.logger if config.respond_to? :logger= + end end + ## + # Get the associated client for mix-in of the IAMPolicy. + # + # @return [Google::Iam::V1::IAMPolicy::Client] + # + attr_reader :iam_policy_client + ## # The logger used for request/response debug logging. # diff --git a/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/rest.rb b/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/rest.rb index d7c2b41c59d7..809893f7a951 100644 --- a/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/rest.rb +++ b/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/rest.rb @@ -21,6 +21,7 @@ require "gapic/config/method" require "google/cloud/binary_authorization/v1beta1/version" +require "google/cloud/binary_authorization/v1beta1/bindings_override" require "google/cloud/binary_authorization/v1beta1/system_policy/credentials" require "google/cloud/binary_authorization/v1beta1/system_policy/paths" diff --git a/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/rest/client.rb b/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/rest/client.rb index 50abbffc1cda..794a2932e7f2 100644 --- a/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/rest/client.rb +++ b/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/rest/client.rb @@ -19,6 +19,7 @@ require "google/cloud/errors" require "google/cloud/binaryauthorization/v1beta1/service_pb" require "google/cloud/binary_authorization/v1beta1/system_policy/rest/service_stub" +require "google/iam/v1/rest" module Google module Cloud @@ -163,8 +164,24 @@ def initialize entry.set "defaultTimeout", @config.timeout if @config.timeout entry.set "quotaProject", @quota_project_id if @quota_project_id end + + @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @system_policy_stub.endpoint + config.universe_domain = @system_policy_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @system_policy_stub.logger if config.respond_to? :logger= + end end + ## + # Get the associated client for mix-in of the IAMPolicy. + # + # @return [Google::Iam::V1::IAMPolicy::Rest::Client] + # + attr_reader :iam_policy_client + ## # The logger used for request/response debug logging. # @@ -363,6 +380,13 @@ class Configuration config_attr :retry_policy, nil, ::Hash, ::Proc, nil config_attr :quota_project, nil, ::String, nil config_attr :universe_domain, nil, ::String, nil + + # @private + # Overrides for http bindings for the RPCs of this service + # are only used when this service is used as mixin, and only + # by the host service. + # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] + config_attr :bindings_override, {}, ::Hash, nil config_attr :logger, :default, ::Logger, nil, :default # @private diff --git a/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binaryauthorization/v1beta1/resources_pb.rb b/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binaryauthorization/v1beta1/resources_pb.rb index 469851b91756..164d18d0e897 100644 --- a/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binaryauthorization/v1beta1/resources_pb.rb +++ b/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binaryauthorization/v1beta1/resources_pb.rb @@ -9,7 +9,7 @@ require 'google/protobuf/timestamp_pb' -descriptor_data = "\n8google/cloud/binaryauthorization/v1beta1/resources.proto\x12(google.cloud.binaryauthorization.v1beta1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb1\r\n\x06Policy\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12w\n\x1dglobal_policy_evaluation_mode\x18\x07 \x01(\x0e\x32K.google.cloud.binaryauthorization.v1beta1.Policy.GlobalPolicyEvaluationModeB\x03\xe0\x41\x01\x12n\n\x1c\x61\x64mission_whitelist_patterns\x18\x02 \x03(\x0b\x32\x43.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPatternB\x03\xe0\x41\x01\x12q\n\x17\x63luster_admission_rules\x18\x03 \x03(\x0b\x32K.google.cloud.binaryauthorization.v1beta1.Policy.ClusterAdmissionRulesEntryB\x03\xe0\x41\x01\x12\x8a\x01\n$kubernetes_namespace_admission_rules\x18\n \x03(\x0b\x32W.google.cloud.binaryauthorization.v1beta1.Policy.KubernetesNamespaceAdmissionRulesEntryB\x03\xe0\x41\x01\x12\x95\x01\n*kubernetes_service_account_admission_rules\x18\x08 \x03(\x0b\x32\\.google.cloud.binaryauthorization.v1beta1.Policy.KubernetesServiceAccountAdmissionRulesEntryB\x03\xe0\x41\x01\x12\x8d\x01\n&istio_service_identity_admission_rules\x18\t \x03(\x0b\x32X.google.cloud.binaryauthorization.v1beta1.Policy.IstioServiceIdentityAdmissionRulesEntryB\x03\xe0\x41\x01\x12\\\n\x16\x64\x65\x66\x61ult_admission_rule\x18\x04 \x01(\x0b\x32\x37.google.cloud.binaryauthorization.v1beta1.AdmissionRuleB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x1au\n\x1a\x43lusterAdmissionRulesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x46\n\x05value\x18\x02 \x01(\x0b\x32\x37.google.cloud.binaryauthorization.v1beta1.AdmissionRule:\x02\x38\x01\x1a\x81\x01\n&KubernetesNamespaceAdmissionRulesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x46\n\x05value\x18\x02 \x01(\x0b\x32\x37.google.cloud.binaryauthorization.v1beta1.AdmissionRule:\x02\x38\x01\x1a\x86\x01\n+KubernetesServiceAccountAdmissionRulesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x46\n\x05value\x18\x02 \x01(\x0b\x32\x37.google.cloud.binaryauthorization.v1beta1.AdmissionRule:\x02\x38\x01\x1a\x82\x01\n\'IstioServiceIdentityAdmissionRulesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x46\n\x05value\x18\x02 \x01(\x0b\x32\x37.google.cloud.binaryauthorization.v1beta1.AdmissionRule:\x02\x38\x01\"d\n\x1aGlobalPolicyEvaluationMode\x12-\n)GLOBAL_POLICY_EVALUATION_MODE_UNSPECIFIED\x10\x00\x12\n\n\x06\x45NABLE\x10\x01\x12\x0b\n\x07\x44ISABLE\x10\x02:f\xea\x41\x63\n)binaryauthorization.googleapis.com/Policy\x12\x19projects/{project}/policy\x12\x1blocations/{location}/policy\"1\n\x19\x41\x64missionWhitelistPattern\x12\x14\n\x0cname_pattern\x18\x01 \x01(\t\"\xe4\x03\n\rAdmissionRule\x12\x64\n\x0f\x65valuation_mode\x18\x01 \x01(\x0e\x32\x46.google.cloud.binaryauthorization.v1beta1.AdmissionRule.EvaluationModeB\x03\xe0\x41\x02\x12$\n\x17require_attestations_by\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12\x66\n\x10\x65nforcement_mode\x18\x03 \x01(\x0e\x32G.google.cloud.binaryauthorization.v1beta1.AdmissionRule.EnforcementModeB\x03\xe0\x41\x02\"m\n\x0e\x45valuationMode\x12\x1f\n\x1b\x45VALUATION_MODE_UNSPECIFIED\x10\x00\x12\x10\n\x0c\x41LWAYS_ALLOW\x10\x01\x12\x17\n\x13REQUIRE_ATTESTATION\x10\x02\x12\x0f\n\x0b\x41LWAYS_DENY\x10\x03\"p\n\x0f\x45nforcementMode\x12 \n\x1c\x45NFORCEMENT_MODE_UNSPECIFIED\x10\x00\x12 \n\x1c\x45NFORCED_BLOCK_AND_AUDIT_LOG\x10\x01\x12\x19\n\x15\x44RYRUN_AUDIT_LOG_ONLY\x10\x02\"\xbc\x02\n\x08\x41ttestor\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x61\n\x17user_owned_drydock_note\x18\x03 \x01(\x0b\x32>.google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNoteH\x00\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03:Y\xea\x41V\n+binaryauthorization.googleapis.com/Attestor\x12\'projects/{project}/attestors/{attestor}B\x0f\n\rattestor_type\"\xb9\x01\n\x14UserOwnedDrydockNote\x12\x1b\n\x0enote_reference\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12U\n\x0bpublic_keys\x18\x02 \x03(\x0b\x32;.google.cloud.binaryauthorization.v1beta1.AttestorPublicKeyB\x03\xe0\x41\x01\x12-\n delegation_service_account_email\x18\x03 \x01(\tB\x03\xe0\x41\x03\"\xc4\x04\n\rPkixPublicKey\x12\x16\n\x0epublic_key_pem\x18\x01 \x01(\t\x12g\n\x13signature_algorithm\x18\x02 \x01(\x0e\x32J.google.cloud.binaryauthorization.v1beta1.PkixPublicKey.SignatureAlgorithm\"\xb1\x03\n\x12SignatureAlgorithm\x12#\n\x1fSIGNATURE_ALGORITHM_UNSPECIFIED\x10\x00\x12\x17\n\x13RSA_PSS_2048_SHA256\x10\x01\x12\x17\n\x13RSA_PSS_3072_SHA256\x10\x02\x12\x17\n\x13RSA_PSS_4096_SHA256\x10\x03\x12\x17\n\x13RSA_PSS_4096_SHA512\x10\x04\x12\x1e\n\x1aRSA_SIGN_PKCS1_2048_SHA256\x10\x05\x12\x1e\n\x1aRSA_SIGN_PKCS1_3072_SHA256\x10\x06\x12\x1e\n\x1aRSA_SIGN_PKCS1_4096_SHA256\x10\x07\x12\x1e\n\x1aRSA_SIGN_PKCS1_4096_SHA512\x10\x08\x12\x15\n\x11\x45\x43\x44SA_P256_SHA256\x10\t\x12\x17\n\x13\x45\x43_SIGN_P256_SHA256\x10\t\x12\x15\n\x11\x45\x43\x44SA_P384_SHA384\x10\n\x12\x17\n\x13\x45\x43_SIGN_P384_SHA384\x10\n\x12\x15\n\x11\x45\x43\x44SA_P521_SHA512\x10\x0b\x12\x17\n\x13\x45\x43_SIGN_P521_SHA512\x10\x0b\x1a\x02\x10\x01\"\xbf\x01\n\x11\x41ttestorPublicKey\x12\x14\n\x07\x63omment\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\n\n\x02id\x18\x02 \x01(\t\x12&\n\x1c\x61scii_armored_pgp_public_key\x18\x03 \x01(\tH\x00\x12R\n\x0fpkix_public_key\x18\x05 \x01(\x0b\x32\x37.google.cloud.binaryauthorization.v1beta1.PkixPublicKeyH\x00\x42\x0c\n\npublic_keyB\xba\x02\n,com.google.cloud.binaryauthorization.v1beta1B!BinaryAuthorizationResourcesProtoP\x01Z^cloud.google.com/go/binaryauthorization/apiv1beta1/binaryauthorizationpb;binaryauthorizationpb\xf8\x01\x01\xaa\x02(Google.Cloud.BinaryAuthorization.V1Beta1\xca\x02(Google\\Cloud\\BinaryAuthorization\\V1beta1\xea\x02+Google::Cloud::BinaryAuthorization::V1beta1b\x06proto3" +descriptor_data = "\n8google/cloud/binaryauthorization/v1beta1/resources.proto\x12(google.cloud.binaryauthorization.v1beta1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc4\r\n\x06Policy\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12w\n\x1dglobal_policy_evaluation_mode\x18\x07 \x01(\x0e\x32K.google.cloud.binaryauthorization.v1beta1.Policy.GlobalPolicyEvaluationModeB\x03\xe0\x41\x01\x12n\n\x1c\x61\x64mission_whitelist_patterns\x18\x02 \x03(\x0b\x32\x43.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPatternB\x03\xe0\x41\x01\x12q\n\x17\x63luster_admission_rules\x18\x03 \x03(\x0b\x32K.google.cloud.binaryauthorization.v1beta1.Policy.ClusterAdmissionRulesEntryB\x03\xe0\x41\x01\x12\x8a\x01\n$kubernetes_namespace_admission_rules\x18\n \x03(\x0b\x32W.google.cloud.binaryauthorization.v1beta1.Policy.KubernetesNamespaceAdmissionRulesEntryB\x03\xe0\x41\x01\x12\x95\x01\n*kubernetes_service_account_admission_rules\x18\x08 \x03(\x0b\x32\\.google.cloud.binaryauthorization.v1beta1.Policy.KubernetesServiceAccountAdmissionRulesEntryB\x03\xe0\x41\x01\x12\x8d\x01\n&istio_service_identity_admission_rules\x18\t \x03(\x0b\x32X.google.cloud.binaryauthorization.v1beta1.Policy.IstioServiceIdentityAdmissionRulesEntryB\x03\xe0\x41\x01\x12\\\n\x16\x64\x65\x66\x61ult_admission_rule\x18\x04 \x01(\x0b\x32\x37.google.cloud.binaryauthorization.v1beta1.AdmissionRuleB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x11\n\x04\x65tag\x18\x0b \x01(\tB\x03\xe0\x41\x01\x1au\n\x1a\x43lusterAdmissionRulesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x46\n\x05value\x18\x02 \x01(\x0b\x32\x37.google.cloud.binaryauthorization.v1beta1.AdmissionRule:\x02\x38\x01\x1a\x81\x01\n&KubernetesNamespaceAdmissionRulesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x46\n\x05value\x18\x02 \x01(\x0b\x32\x37.google.cloud.binaryauthorization.v1beta1.AdmissionRule:\x02\x38\x01\x1a\x86\x01\n+KubernetesServiceAccountAdmissionRulesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x46\n\x05value\x18\x02 \x01(\x0b\x32\x37.google.cloud.binaryauthorization.v1beta1.AdmissionRule:\x02\x38\x01\x1a\x82\x01\n\'IstioServiceIdentityAdmissionRulesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x46\n\x05value\x18\x02 \x01(\x0b\x32\x37.google.cloud.binaryauthorization.v1beta1.AdmissionRule:\x02\x38\x01\"d\n\x1aGlobalPolicyEvaluationMode\x12-\n)GLOBAL_POLICY_EVALUATION_MODE_UNSPECIFIED\x10\x00\x12\n\n\x06\x45NABLE\x10\x01\x12\x0b\n\x07\x44ISABLE\x10\x02:f\xea\x41\x63\n)binaryauthorization.googleapis.com/Policy\x12\x19projects/{project}/policy\x12\x1blocations/{location}/policy\"1\n\x19\x41\x64missionWhitelistPattern\x12\x14\n\x0cname_pattern\x18\x01 \x01(\t\"\xe4\x03\n\rAdmissionRule\x12\x64\n\x0f\x65valuation_mode\x18\x01 \x01(\x0e\x32\x46.google.cloud.binaryauthorization.v1beta1.AdmissionRule.EvaluationModeB\x03\xe0\x41\x02\x12$\n\x17require_attestations_by\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12\x66\n\x10\x65nforcement_mode\x18\x03 \x01(\x0e\x32G.google.cloud.binaryauthorization.v1beta1.AdmissionRule.EnforcementModeB\x03\xe0\x41\x02\"m\n\x0e\x45valuationMode\x12\x1f\n\x1b\x45VALUATION_MODE_UNSPECIFIED\x10\x00\x12\x10\n\x0c\x41LWAYS_ALLOW\x10\x01\x12\x17\n\x13REQUIRE_ATTESTATION\x10\x02\x12\x0f\n\x0b\x41LWAYS_DENY\x10\x03\"p\n\x0f\x45nforcementMode\x12 \n\x1c\x45NFORCEMENT_MODE_UNSPECIFIED\x10\x00\x12 \n\x1c\x45NFORCED_BLOCK_AND_AUDIT_LOG\x10\x01\x12\x19\n\x15\x44RYRUN_AUDIT_LOG_ONLY\x10\x02\"\xcf\x02\n\x08\x41ttestor\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x61\n\x17user_owned_drydock_note\x18\x03 \x01(\x0b\x32>.google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNoteH\x00\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x11\n\x04\x65tag\x18\x07 \x01(\tB\x03\xe0\x41\x01:Y\xea\x41V\n+binaryauthorization.googleapis.com/Attestor\x12\'projects/{project}/attestors/{attestor}B\x0f\n\rattestor_type\"\xb9\x01\n\x14UserOwnedDrydockNote\x12\x1b\n\x0enote_reference\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12U\n\x0bpublic_keys\x18\x02 \x03(\x0b\x32;.google.cloud.binaryauthorization.v1beta1.AttestorPublicKeyB\x03\xe0\x41\x01\x12-\n delegation_service_account_email\x18\x03 \x01(\tB\x03\xe0\x41\x03\"\xcb\x05\n\rPkixPublicKey\x12\x16\n\x0epublic_key_pem\x18\x01 \x01(\t\x12g\n\x13signature_algorithm\x18\x02 \x01(\x0e\x32J.google.cloud.binaryauthorization.v1beta1.PkixPublicKey.SignatureAlgorithm\"\xb8\x04\n\x12SignatureAlgorithm\x12#\n\x1fSIGNATURE_ALGORITHM_UNSPECIFIED\x10\x00\x12\x17\n\x13RSA_PSS_2048_SHA256\x10\x01\x12\x1c\n\x18RSA_SIGN_PSS_2048_SHA256\x10\x01\x12\x17\n\x13RSA_PSS_3072_SHA256\x10\x02\x12\x1c\n\x18RSA_SIGN_PSS_3072_SHA256\x10\x02\x12\x17\n\x13RSA_PSS_4096_SHA256\x10\x03\x12\x1c\n\x18RSA_SIGN_PSS_4096_SHA256\x10\x03\x12\x17\n\x13RSA_PSS_4096_SHA512\x10\x04\x12\x1c\n\x18RSA_SIGN_PSS_4096_SHA512\x10\x04\x12\x1e\n\x1aRSA_SIGN_PKCS1_2048_SHA256\x10\x05\x12\x1e\n\x1aRSA_SIGN_PKCS1_3072_SHA256\x10\x06\x12\x1e\n\x1aRSA_SIGN_PKCS1_4096_SHA256\x10\x07\x12\x1e\n\x1aRSA_SIGN_PKCS1_4096_SHA512\x10\x08\x12\x15\n\x11\x45\x43\x44SA_P256_SHA256\x10\t\x12\x17\n\x13\x45\x43_SIGN_P256_SHA256\x10\t\x12\x15\n\x11\x45\x43\x44SA_P384_SHA384\x10\n\x12\x17\n\x13\x45\x43_SIGN_P384_SHA384\x10\n\x12\x15\n\x11\x45\x43\x44SA_P521_SHA512\x10\x0b\x12\x17\n\x13\x45\x43_SIGN_P521_SHA512\x10\x0b\x12\r\n\tML_DSA_65\x10\r\x1a\x02\x10\x01\"\xbf\x01\n\x11\x41ttestorPublicKey\x12\x14\n\x07\x63omment\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\n\n\x02id\x18\x02 \x01(\t\x12&\n\x1c\x61scii_armored_pgp_public_key\x18\x03 \x01(\tH\x00\x12R\n\x0fpkix_public_key\x18\x05 \x01(\x0b\x32\x37.google.cloud.binaryauthorization.v1beta1.PkixPublicKeyH\x00\x42\x0c\n\npublic_keyB\xb7\x02\n,com.google.cloud.binaryauthorization.v1beta1B!BinaryAuthorizationResourcesProtoP\x01Z^cloud.google.com/go/binaryauthorization/apiv1beta1/binaryauthorizationpb;binaryauthorizationpb\xaa\x02(Google.Cloud.BinaryAuthorization.V1Beta1\xca\x02(Google\\Cloud\\BinaryAuthorization\\V1beta1\xea\x02+Google::Cloud::BinaryAuthorization::V1beta1b\x06proto3" pool = ::Google::Protobuf::DescriptorPool.generated_pool pool.add_serialized_file(descriptor_data) diff --git a/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binaryauthorization/v1beta1/service_pb.rb b/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binaryauthorization/v1beta1/service_pb.rb index 9cb9ff3147e9..6741655dceb7 100644 --- a/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binaryauthorization/v1beta1/service_pb.rb +++ b/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binaryauthorization/v1beta1/service_pb.rb @@ -12,7 +12,7 @@ require 'google/protobuf/empty_pb' -descriptor_data = "\n6google/cloud/binaryauthorization/v1beta1/service.proto\x12(google.cloud.binaryauthorization.v1beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x38google/cloud/binaryauthorization/v1beta1/resources.proto\x1a\x1bgoogle/protobuf/empty.proto\"S\n\x10GetPolicyRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)binaryauthorization.googleapis.com/Policy\"\\\n\x13UpdatePolicyRequest\x12\x45\n\x06policy\x18\x01 \x01(\x0b\x32\x30.google.cloud.binaryauthorization.v1beta1.PolicyB\x03\xe0\x41\x02\"\xc1\x01\n\x15\x43reateAttestorRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x18\n\x0b\x61ttestor_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12I\n\x08\x61ttestor\x18\x03 \x01(\x0b\x32\x32.google.cloud.binaryauthorization.v1beta1.AttestorB\x03\xe0\x41\x02\"W\n\x12GetAttestorRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+binaryauthorization.googleapis.com/Attestor\"b\n\x15UpdateAttestorRequest\x12I\n\x08\x61ttestor\x18\x01 \x01(\x0b\x32\x32.google.cloud.binaryauthorization.v1beta1.AttestorB\x03\xe0\x41\x02\"\x82\x01\n\x14ListAttestorsRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"w\n\x15ListAttestorsResponse\x12\x45\n\tattestors\x18\x01 \x03(\x0b\x32\x32.google.cloud.binaryauthorization.v1beta1.Attestor\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"Z\n\x15\x44\x65leteAttestorRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+binaryauthorization.googleapis.com/Attestor\"Y\n\x16GetSystemPolicyRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)binaryauthorization.googleapis.com/Policy2\xcb\x0b\n BinauthzManagementServiceV1Beta1\x12\xab\x01\n\tGetPolicy\x12:.google.cloud.binaryauthorization.v1beta1.GetPolicyRequest\x1a\x30.google.cloud.binaryauthorization.v1beta1.Policy\"0\xda\x41\x04name\x82\xd3\xe4\x93\x02#\x12!/v1beta1/{name=projects/*/policy}\x12\xc2\x01\n\x0cUpdatePolicy\x12=.google.cloud.binaryauthorization.v1beta1.UpdatePolicyRequest\x1a\x30.google.cloud.binaryauthorization.v1beta1.Policy\"A\xda\x41\x06policy\x82\xd3\xe4\x93\x02\x32\x1a(/v1beta1/{policy.name=projects/*/policy}:\x06policy\x12\xdd\x01\n\x0e\x43reateAttestor\x12?.google.cloud.binaryauthorization.v1beta1.CreateAttestorRequest\x1a\x32.google.cloud.binaryauthorization.v1beta1.Attestor\"V\xda\x41\x1bparent,attestor_id,attestor\x82\xd3\xe4\x93\x02\x32\"&/v1beta1/{parent=projects/*}/attestors:\x08\x61ttestor\x12\xb6\x01\n\x0bGetAttestor\x12<.google.cloud.binaryauthorization.v1beta1.GetAttestorRequest\x1a\x32.google.cloud.binaryauthorization.v1beta1.Attestor\"5\xda\x41\x04name\x82\xd3\xe4\x93\x02(\x12&/v1beta1/{name=projects/*/attestors/*}\x12\xd3\x01\n\x0eUpdateAttestor\x12?.google.cloud.binaryauthorization.v1beta1.UpdateAttestorRequest\x1a\x32.google.cloud.binaryauthorization.v1beta1.Attestor\"L\xda\x41\x08\x61ttestor\x82\xd3\xe4\x93\x02;\x1a//v1beta1/{attestor.name=projects/*/attestors/*}:\x08\x61ttestor\x12\xc9\x01\n\rListAttestors\x12>.google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest\x1a?.google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse\"7\xda\x41\x06parent\x82\xd3\xe4\x93\x02(\x12&/v1beta1/{parent=projects/*}/attestors\x12\xa0\x01\n\x0e\x44\x65leteAttestor\x12?.google.cloud.binaryauthorization.v1beta1.DeleteAttestorRequest\x1a\x16.google.protobuf.Empty\"5\xda\x41\x04name\x82\xd3\xe4\x93\x02(*&/v1beta1/{name=projects/*/attestors/*}\x1aV\xca\x41\"binaryauthorization.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platform2\xa8\x02\n\x13SystemPolicyV1Beta1\x12\xb8\x01\n\x0fGetSystemPolicy\x12@.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest\x1a\x30.google.cloud.binaryauthorization.v1beta1.Policy\"1\xda\x41\x04name\x82\xd3\xe4\x93\x02$\x12\"/v1beta1/{name=locations/*/policy}\x1aV\xca\x41\"binaryauthorization.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xb8\x02\n,com.google.cloud.binaryauthorization.v1beta1B\x1f\x42inaryAuthorizationServiceProtoP\x01Z^cloud.google.com/go/binaryauthorization/apiv1beta1/binaryauthorizationpb;binaryauthorizationpb\xf8\x01\x01\xaa\x02(Google.Cloud.BinaryAuthorization.V1Beta1\xca\x02(Google\\Cloud\\BinaryAuthorization\\V1beta1\xea\x02+Google::Cloud::BinaryAuthorization::V1beta1b\x06proto3" +descriptor_data = "\n6google/cloud/binaryauthorization/v1beta1/service.proto\x12(google.cloud.binaryauthorization.v1beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x38google/cloud/binaryauthorization/v1beta1/resources.proto\x1a\x1bgoogle/protobuf/empty.proto\"S\n\x10GetPolicyRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)binaryauthorization.googleapis.com/Policy\"\\\n\x13UpdatePolicyRequest\x12\x45\n\x06policy\x18\x01 \x01(\x0b\x32\x30.google.cloud.binaryauthorization.v1beta1.PolicyB\x03\xe0\x41\x02\"\xc1\x01\n\x15\x43reateAttestorRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x18\n\x0b\x61ttestor_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12I\n\x08\x61ttestor\x18\x03 \x01(\x0b\x32\x32.google.cloud.binaryauthorization.v1beta1.AttestorB\x03\xe0\x41\x02\"W\n\x12GetAttestorRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+binaryauthorization.googleapis.com/Attestor\"b\n\x15UpdateAttestorRequest\x12I\n\x08\x61ttestor\x18\x01 \x01(\x0b\x32\x32.google.cloud.binaryauthorization.v1beta1.AttestorB\x03\xe0\x41\x02\"\x82\x01\n\x14ListAttestorsRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"w\n\x15ListAttestorsResponse\x12\x45\n\tattestors\x18\x01 \x03(\x0b\x32\x32.google.cloud.binaryauthorization.v1beta1.Attestor\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"Z\n\x15\x44\x65leteAttestorRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+binaryauthorization.googleapis.com/Attestor\"Y\n\x16GetSystemPolicyRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)binaryauthorization.googleapis.com/Policy2\xcb\x0b\n BinauthzManagementServiceV1Beta1\x12\xab\x01\n\tGetPolicy\x12:.google.cloud.binaryauthorization.v1beta1.GetPolicyRequest\x1a\x30.google.cloud.binaryauthorization.v1beta1.Policy\"0\xda\x41\x04name\x82\xd3\xe4\x93\x02#\x12!/v1beta1/{name=projects/*/policy}\x12\xc2\x01\n\x0cUpdatePolicy\x12=.google.cloud.binaryauthorization.v1beta1.UpdatePolicyRequest\x1a\x30.google.cloud.binaryauthorization.v1beta1.Policy\"A\xda\x41\x06policy\x82\xd3\xe4\x93\x02\x32\x1a(/v1beta1/{policy.name=projects/*/policy}:\x06policy\x12\xdd\x01\n\x0e\x43reateAttestor\x12?.google.cloud.binaryauthorization.v1beta1.CreateAttestorRequest\x1a\x32.google.cloud.binaryauthorization.v1beta1.Attestor\"V\xda\x41\x1bparent,attestor_id,attestor\x82\xd3\xe4\x93\x02\x32\"&/v1beta1/{parent=projects/*}/attestors:\x08\x61ttestor\x12\xb6\x01\n\x0bGetAttestor\x12<.google.cloud.binaryauthorization.v1beta1.GetAttestorRequest\x1a\x32.google.cloud.binaryauthorization.v1beta1.Attestor\"5\xda\x41\x04name\x82\xd3\xe4\x93\x02(\x12&/v1beta1/{name=projects/*/attestors/*}\x12\xd3\x01\n\x0eUpdateAttestor\x12?.google.cloud.binaryauthorization.v1beta1.UpdateAttestorRequest\x1a\x32.google.cloud.binaryauthorization.v1beta1.Attestor\"L\xda\x41\x08\x61ttestor\x82\xd3\xe4\x93\x02;\x1a//v1beta1/{attestor.name=projects/*/attestors/*}:\x08\x61ttestor\x12\xc9\x01\n\rListAttestors\x12>.google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest\x1a?.google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse\"7\xda\x41\x06parent\x82\xd3\xe4\x93\x02(\x12&/v1beta1/{parent=projects/*}/attestors\x12\xa0\x01\n\x0e\x44\x65leteAttestor\x12?.google.cloud.binaryauthorization.v1beta1.DeleteAttestorRequest\x1a\x16.google.protobuf.Empty\"5\xda\x41\x04name\x82\xd3\xe4\x93\x02(*&/v1beta1/{name=projects/*/attestors/*}\x1aV\xca\x41\"binaryauthorization.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platform2\xa8\x02\n\x13SystemPolicyV1Beta1\x12\xb8\x01\n\x0fGetSystemPolicy\x12@.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest\x1a\x30.google.cloud.binaryauthorization.v1beta1.Policy\"1\xda\x41\x04name\x82\xd3\xe4\x93\x02$\x12\"/v1beta1/{name=locations/*/policy}\x1aV\xca\x41\"binaryauthorization.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xb5\x02\n,com.google.cloud.binaryauthorization.v1beta1B\x1f\x42inaryAuthorizationServiceProtoP\x01Z^cloud.google.com/go/binaryauthorization/apiv1beta1/binaryauthorizationpb;binaryauthorizationpb\xaa\x02(Google.Cloud.BinaryAuthorization.V1Beta1\xca\x02(Google\\Cloud\\BinaryAuthorization\\V1beta1\xea\x02+Google::Cloud::BinaryAuthorization::V1beta1b\x06proto3" pool = ::Google::Protobuf::DescriptorPool.generated_pool pool.add_serialized_file(descriptor_data) diff --git a/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binaryauthorization/v1beta1/service_services_pb.rb b/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binaryauthorization/v1beta1/service_services_pb.rb index 5dc927516469..ed7a59035e57 100644 --- a/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binaryauthorization/v1beta1/service_services_pb.rb +++ b/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binaryauthorization/v1beta1/service_services_pb.rb @@ -41,36 +41,50 @@ class Service self.unmarshal_class_method = :decode self.service_name = 'google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1' - # A [policy][google.cloud.binaryauthorization.v1beta1.Policy] specifies the [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] that must attest to - # a container image, before the project is allowed to deploy that + # A [policy][google.cloud.binaryauthorization.v1beta1.Policy] specifies the + # [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] that must + # attest to a container image, before the project is allowed to deploy that # image. There is at most one policy per project. All image admission # requests are permitted if a project has no policy. # - # Gets the [policy][google.cloud.binaryauthorization.v1beta1.Policy] for this project. Returns a default - # [policy][google.cloud.binaryauthorization.v1beta1.Policy] if the project does not have one. + # Gets the [policy][google.cloud.binaryauthorization.v1beta1.Policy] for this + # project. Returns a default + # [policy][google.cloud.binaryauthorization.v1beta1.Policy] if the project + # does not have one. rpc :GetPolicy, ::Google::Cloud::BinaryAuthorization::V1beta1::GetPolicyRequest, ::Google::Cloud::BinaryAuthorization::V1beta1::Policy - # Creates or updates a project's [policy][google.cloud.binaryauthorization.v1beta1.Policy], and returns a copy of the - # new [policy][google.cloud.binaryauthorization.v1beta1.Policy]. A policy is always updated as a whole, to avoid race - # conditions with concurrent policy enforcement (or management!) - # requests. Returns NOT_FOUND if the project does not exist, INVALID_ARGUMENT - # if the request is malformed. + # Creates or updates a project's + # [policy][google.cloud.binaryauthorization.v1beta1.Policy], and returns a + # copy of the new [policy][google.cloud.binaryauthorization.v1beta1.Policy]. + # A policy is always updated as a whole, to avoid race conditions with + # concurrent policy enforcement (or management!) requests. Returns NOT_FOUND + # if the project does not exist, INVALID_ARGUMENT if the request is + # malformed. rpc :UpdatePolicy, ::Google::Cloud::BinaryAuthorization::V1beta1::UpdatePolicyRequest, ::Google::Cloud::BinaryAuthorization::V1beta1::Policy - # Creates an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor], and returns a copy of the new - # [attestor][google.cloud.binaryauthorization.v1beta1.Attestor]. Returns NOT_FOUND if the project does not exist, - # INVALID_ARGUMENT if the request is malformed, ALREADY_EXISTS if the - # [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] already exists. + # Creates an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor], + # and returns a copy of the new + # [attestor][google.cloud.binaryauthorization.v1beta1.Attestor]. Returns + # NOT_FOUND if the project does not exist, INVALID_ARGUMENT if the request is + # malformed, ALREADY_EXISTS if the + # [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] already + # exists. rpc :CreateAttestor, ::Google::Cloud::BinaryAuthorization::V1beta1::CreateAttestorRequest, ::Google::Cloud::BinaryAuthorization::V1beta1::Attestor # Gets an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor]. - # Returns NOT_FOUND if the [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] does not exist. + # Returns NOT_FOUND if the + # [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] does not + # exist. rpc :GetAttestor, ::Google::Cloud::BinaryAuthorization::V1beta1::GetAttestorRequest, ::Google::Cloud::BinaryAuthorization::V1beta1::Attestor # Updates an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor]. - # Returns NOT_FOUND if the [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] does not exist. + # Returns NOT_FOUND if the + # [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] does not + # exist. rpc :UpdateAttestor, ::Google::Cloud::BinaryAuthorization::V1beta1::UpdateAttestorRequest, ::Google::Cloud::BinaryAuthorization::V1beta1::Attestor # Lists [attestors][google.cloud.binaryauthorization.v1beta1.Attestor]. # Returns INVALID_ARGUMENT if the project does not exist. rpc :ListAttestors, ::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsRequest, ::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsResponse - # Deletes an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor]. Returns NOT_FOUND if the - # [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] does not exist. + # Deletes an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor]. + # Returns NOT_FOUND if the + # [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] does not + # exist. rpc :DeleteAttestor, ::Google::Cloud::BinaryAuthorization::V1beta1::DeleteAttestorRequest, ::Google::Protobuf::Empty end diff --git a/google-cloud-binary_authorization-v1beta1/proto_docs/google/cloud/binaryauthorization/v1beta1/resources.rb b/google-cloud-binary_authorization-v1beta1/proto_docs/google/cloud/binaryauthorization/v1beta1/resources.rb index cd980eded5f4..1eed38486f03 100644 --- a/google-cloud-binary_authorization-v1beta1/proto_docs/google/cloud/binaryauthorization/v1beta1/resources.rb +++ b/google-cloud-binary_authorization-v1beta1/proto_docs/google/cloud/binaryauthorization/v1beta1/resources.rb @@ -21,7 +21,8 @@ module Google module Cloud module BinaryAuthorization module V1beta1 - # A {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy} for Binary Authorization. + # A {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy} for Binary + # Authorization. # @!attribute [r] name # @return [::String] # Output only. The resource name, in the format `projects/*/policy`. There is @@ -51,7 +52,8 @@ module V1beta1 # https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters. # @!attribute [rw] kubernetes_namespace_admission_rules # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::BinaryAuthorization::V1beta1::AdmissionRule}] - # Optional. Per-kubernetes-namespace admission rules. K8s namespace spec format: + # Optional. Per-kubernetes-namespace admission rules. K8s namespace spec + # format: # `[a-z.-]+`, e.g. `some-namespace` # @!attribute [rw] kubernetes_service_account_admission_rules # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::BinaryAuthorization::V1beta1::AdmissionRule}] @@ -71,6 +73,11 @@ module V1beta1 # @!attribute [r] update_time # @return [::Google::Protobuf::Timestamp] # Output only. Time when the policy was last updated. + # @!attribute [rw] etag + # @return [::String] + # Optional. A checksum, returned by the server, that can be sent on update + # requests to ensure the policy has an up-to-date value before attempting to + # update it. See https://google.aip.dev/154. class Policy include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -123,8 +130,10 @@ module GlobalPolicyEvaluationMode end end - # An {::Google::Cloud::BinaryAuthorization::V1beta1::AdmissionWhitelistPattern admission allowlist pattern} exempts images - # from checks by {::Google::Cloud::BinaryAuthorization::V1beta1::AdmissionRule admission rules}. + # An [admission allowlist + # pattern][google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern] + # exempts images from checks by [admission + # rules][google.cloud.binaryauthorization.v1beta1.AdmissionRule]. # @!attribute [rw] name_pattern # @return [::String] # An image name pattern to allowlist, in the form `registry/path/to/image`. @@ -139,26 +148,20 @@ class AdmissionWhitelistPattern extend ::Google::Protobuf::MessageExts::ClassMethods end - # An {::Google::Cloud::BinaryAuthorization::V1beta1::AdmissionRule admission rule} specifies either that all container images - # used in a pod creation request must be attested to by one or more - # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors}, that all pod creations will be allowed, or that all - # pod creations will be denied. + # An {::Google::Cloud::BinaryAuthorization::V1beta1::AdmissionRule admission rule} + # specifies either that all container images used in a pod creation request + # must be attested to by one or more + # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors}, that all pod + # creations will be allowed, or that all pod creations will be denied. # - # Images matching an {::Google::Cloud::BinaryAuthorization::V1beta1::AdmissionWhitelistPattern admission allowlist pattern} + # Images matching an [admission allowlist + # pattern][google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern] # are exempted from admission rules and will never block a pod creation. # @!attribute [rw] evaluation_mode # @return [::Google::Cloud::BinaryAuthorization::V1beta1::AdmissionRule::EvaluationMode] # Required. How this admission rule will be evaluated. # @!attribute [rw] require_attestations_by # @return [::Array<::String>] - # Optional. The resource names of the attestors that must attest to - # a container image, in the format `projects/*/attestors/*`. Each - # attestor must exist before a policy can reference it. To add an attestor - # to a policy the principal issuing the policy change request must be able - # to read the attestor resource. - # - # Note: this field must be non-empty when the evaluation_mode field specifies - # REQUIRE_ATTESTATION, otherwise it must be empty. # @!attribute [rw] enforcement_mode # @return [::Google::Cloud::BinaryAuthorization::V1beta1::AdmissionRule::EnforcementMode] # Required. The action when a pod creation is denied by the admission rule. @@ -182,6 +185,8 @@ module EvaluationMode ALWAYS_DENY = 3 end + # TODO(wietse) re-word this text to 'per-image' instead of 'per-pod' and to + # allow for three-way evaluation (allow, deny, delegate). # Defines the possible actions when a pod creation is denied by an admission # rule. module EnforcementMode @@ -197,9 +202,9 @@ module EnforcementMode end end - # An {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} that attests to container image - # artifacts. An existing attestor cannot be modified except where - # indicated. + # An {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} that attests + # to container image artifacts. An existing attestor cannot be modified except + # where indicated. # @!attribute [rw] name # @return [::String] # Required. The resource name, in the format: @@ -214,13 +219,19 @@ module EnforcementMode # @!attribute [r] update_time # @return [::Google::Protobuf::Timestamp] # Output only. Time when the attestor was last updated. + # @!attribute [rw] etag + # @return [::String] + # Optional. A checksum, returned by the server, that can be sent on update + # requests to ensure the attestor has an up-to-date value before attempting + # to update it. See https://google.aip.dev/154. class Attestor include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end - # An {::Google::Cloud::BinaryAuthorization::V1beta1::UserOwnedDrydockNote user owned drydock note} references a Drydock - # ATTESTATION_AUTHORITY Note created by the user. + # An [user owned drydock + # note][google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote] + # references a Drydock ATTESTATION_AUTHORITY Note created by the user. # @!attribute [rw] note_reference # @return [::String] # Required. The Drydock resource name of a ATTESTATION_AUTHORITY Note, @@ -289,15 +300,27 @@ module SignatureAlgorithm # RSASSA-PSS 2048 bit key with a SHA256 digest. RSA_PSS_2048_SHA256 = 1 + # RSASSA-PSS 2048 bit key with a SHA256 digest. + RSA_SIGN_PSS_2048_SHA256 = 1 + # RSASSA-PSS 3072 bit key with a SHA256 digest. RSA_PSS_3072_SHA256 = 2 + # RSASSA-PSS 3072 bit key with a SHA256 digest. + RSA_SIGN_PSS_3072_SHA256 = 2 + # RSASSA-PSS 4096 bit key with a SHA256 digest. RSA_PSS_4096_SHA256 = 3 + # RSASSA-PSS 4096 bit key with a SHA256 digest. + RSA_SIGN_PSS_4096_SHA256 = 3 + # RSASSA-PSS 4096 bit key with a SHA512 digest. RSA_PSS_4096_SHA512 = 4 + # RSASSA-PSS 4096 bit key with a SHA512 digest. + RSA_SIGN_PSS_4096_SHA512 = 4 + # RSASSA-PKCS1-v1_5 with a 2048 bit key and a SHA256 digest. RSA_SIGN_PKCS1_2048_SHA256 = 5 @@ -327,11 +350,15 @@ module SignatureAlgorithm # ECDSA on the NIST P-521 curve with a SHA512 digest. EC_SIGN_P521_SHA512 = 11 + + # ML-DSA-65 Post-Quantum Cryptography signature algorithm. + ML_DSA_65 = 13 end end - # An {::Google::Cloud::BinaryAuthorization::V1beta1::AttestorPublicKey attestor public key} that will be used to verify - # attestations signed by this attestor. + # An [attestor public + # key][google.cloud.binaryauthorization.v1beta1.AttestorPublicKey] that will be + # used to verify attestations signed by this attestor. # @!attribute [rw] comment # @return [::String] # Optional. A descriptive comment. This field may be updated. diff --git a/google-cloud-binary_authorization-v1beta1/proto_docs/google/cloud/binaryauthorization/v1beta1/service.rb b/google-cloud-binary_authorization-v1beta1/proto_docs/google/cloud/binaryauthorization/v1beta1/service.rb index 743963ebd250..c7f5ba668ca3 100644 --- a/google-cloud-binary_authorization-v1beta1/proto_docs/google/cloud/binaryauthorization/v1beta1/service.rb +++ b/google-cloud-binary_authorization-v1beta1/proto_docs/google/cloud/binaryauthorization/v1beta1/service.rb @@ -24,8 +24,9 @@ module V1beta1 # Request message for [BinauthzManagementService.GetPolicy][]. # @!attribute [rw] name # @return [::String] - # Required. The resource name of the {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy} to retrieve, - # in the format `projects/*/policy`. + # Required. The resource name of the + # {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy} to retrieve, in + # the format `projects/*/policy`. class GetPolicyRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -34,9 +35,11 @@ class GetPolicyRequest # Request message for [BinauthzManagementService.UpdatePolicy][]. # @!attribute [rw] policy # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Policy] - # Required. A new or updated {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy} value. The service will - # overwrite the {::Google::Cloud::BinaryAuthorization::V1beta1::Policy#name policy name} field with the resource name in - # the request URL, in the format `projects/*/policy`. + # Required. A new or updated + # {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy} value. The + # service will overwrite the [policy + # name][google.cloud.binaryauthorization.v1beta1.Policy.name] field with the + # resource name in the request URL, in the format `projects/*/policy`. class UpdatePolicyRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -45,15 +48,19 @@ class UpdatePolicyRequest # Request message for [BinauthzManagementService.CreateAttestor][]. # @!attribute [rw] parent # @return [::String] - # Required. The parent of this {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor}. + # Required. The parent of this + # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor}. # @!attribute [rw] attestor_id # @return [::String] - # Required. The {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors} ID. + # Required. The + # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors} ID. # @!attribute [rw] attestor # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor] - # Required. The initial {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} value. The service will - # overwrite the {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor#name attestor name} field with the resource name, - # in the format `projects/*/attestors/*`. + # Required. The initial + # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} value. The + # service will overwrite the [attestor + # name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with + # the resource name, in the format `projects/*/attestors/*`. class CreateAttestorRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -62,8 +69,9 @@ class CreateAttestorRequest # Request message for [BinauthzManagementService.GetAttestor][]. # @!attribute [rw] name # @return [::String] - # Required. The name of the {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} to retrieve, in the format - # `projects/*/attestors/*`. + # Required. The name of the + # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} to retrieve, + # in the format `projects/*/attestors/*`. class GetAttestorRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -72,9 +80,12 @@ class GetAttestorRequest # Request message for [BinauthzManagementService.UpdateAttestor][]. # @!attribute [rw] attestor # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor] - # Required. The updated {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} value. The service will - # overwrite the {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor#name attestor name} field with the resource name - # in the request URL, in the format `projects/*/attestors/*`. + # Required. The updated + # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} value. The + # service will overwrite the [attestor + # name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with + # the resource name in the request URL, in the format + # `projects/*/attestors/*`. class UpdateAttestorRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -84,7 +95,8 @@ class UpdateAttestorRequest # @!attribute [rw] parent # @return [::String] # Required. The resource name of the project associated with the - # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors}, in the format `projects/*`. + # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors}, in the + # format `projects/*`. # @!attribute [rw] page_size # @return [::Integer] # Requested page size. The server may return fewer results than requested. If @@ -92,8 +104,9 @@ class UpdateAttestorRequest # @!attribute [rw] page_token # @return [::String] # A token identifying a page of results the server should return. Typically, - # this is the value of {::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsResponse#next_page_token ListAttestorsResponse.next_page_token} returned - # from the previous call to the `ListAttestors` method. + # this is the value of + # {::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsResponse#next_page_token ListAttestorsResponse.next_page_token} + # returned from the previous call to the `ListAttestors` method. class ListAttestorsRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -106,8 +119,9 @@ class ListAttestorsRequest # @!attribute [rw] next_page_token # @return [::String] # A token to retrieve the next page of results. Pass this value in the - # {::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsRequest#page_token ListAttestorsRequest.page_token} field in the subsequent call to the - # `ListAttestors` method to retrieve the next page of results. + # {::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsRequest#page_token ListAttestorsRequest.page_token} + # field in the subsequent call to the `ListAttestors` method to retrieve the + # next page of results. class ListAttestorsResponse include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -116,8 +130,9 @@ class ListAttestorsResponse # Request message for [BinauthzManagementService.DeleteAttestor][]. # @!attribute [rw] name # @return [::String] - # Required. The name of the {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors} to delete, in the format - # `projects/*/attestors/*`. + # Required. The name of the + # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors} to delete, + # in the format `projects/*/attestors/*`. class DeleteAttestorRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/protobuf/field_mask.rb b/google-cloud-binary_authorization-v1beta1/proto_docs/google/protobuf/field_mask.rb similarity index 100% rename from owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/protobuf/field_mask.rb rename to google-cloud-binary_authorization-v1beta1/proto_docs/google/protobuf/field_mask.rb diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/type/expr.rb b/google-cloud-binary_authorization-v1beta1/proto_docs/google/type/expr.rb similarity index 100% rename from owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/type/expr.rb rename to google-cloud-binary_authorization-v1beta1/proto_docs/google/type/expr.rb diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/.gitignore b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/.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-binary_authorization-v1beta1/.repo-metadata.json b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/.repo-metadata.json deleted file mode 100644 index 4d21ef558c4c..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/.repo-metadata.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "api_id": "binaryauthorization.googleapis.com", - "api_shortname": "binaryauthorization", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1beta1/latest", - "distribution_name": "google-cloud-binary_authorization-v1beta1", - "is_cloud": true, - "language": "ruby", - "name": "binaryauthorization", - "name_pretty": "Binary Authorization V1beta1 API", - "product_documentation": "https://cloud.google.com/binary-authorization/", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Binary Authorization is a service on Google Cloud that provides centralized software supply-chain security for applications that run on Google Kubernetes Engine (GKE) and GKE on-prem. Note that google-cloud-binary_authorization-v1beta1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-binary_authorization instead. See the readme for more details.", - "ruby-cloud-env-prefix": "BINARY_AUTHORIZATION", - "ruby-cloud-product-url": "https://cloud.google.com/binary-authorization/", - "ruby-cloud-service-override": "BinauthzManagementServiceV1Beta1=BinauthzManagementService;SystemPolicyV1Beta1=SystemPolicy", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/.rubocop.yml b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/.rubocop.yml deleted file mode 100644 index 7496dd195e5b..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-binary_authorization-v1beta1.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-binary_authorization-v1beta1.rb" diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/.toys.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/.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-binary_authorization-v1beta1/.yardopts b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/.yardopts deleted file mode 100644 index d1b2fdebca77..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Binary Authorization V1beta1 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-binary_authorization-v1beta1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/AUTHENTICATION.md deleted file mode 100644 index ab598dfa7e16..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-binary_authorization-v1beta1 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-binary_authorization-v1beta1 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/binary_authorization/v1beta1" - -client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/binary_authorization/v1beta1" - -::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::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-binary_authorization-v1beta1 -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/binary_authorization/v1beta1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::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-binary_authorization-v1beta1/CHANGELOG.md b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/Gemfile b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/Gemfile deleted file mode 100644 index 1d08558908d8..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/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-binary_authorization-v1beta1/LICENSE.md b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/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-binary_authorization-v1beta1/README.md b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/README.md deleted file mode 100644 index 84667672376f..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Binary Authorization V1beta1 API - -The management interface for Binary Authorization, a service that provides policy-based deployment validation and control for images deployed to Google Kubernetes Engine (GKE), Anthos Service Mesh, Anthos Clusters, and Cloud Run. - -Binary Authorization is a service on Google Cloud that provides centralized software supply-chain security for applications that run on Google Kubernetes Engine (GKE) and GKE on-prem. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Binary Authorization V1beta1 API. Most users should consider using -the main client gem, -[google-cloud-binary_authorization](https://rubygems.org/gems/google-cloud-binary_authorization). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-binary_authorization-v1beta1 -``` - -## 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/binaryauthorization.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/binary_authorization/v1beta1" - -client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new -request = ::Google::Cloud::BinaryAuthorization::V1beta1::GetPolicyRequest.new # (request fields as keyword arguments...) -response = client.get_policy request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-binary_authorization-v1beta1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/binary-authorization/) -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/binary_authorization/v1beta1" -require "logger" - -client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::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-binary_authorization`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-binary_authorization-v1beta1`. -_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-binary_authorization`. -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-binary_authorization-v1beta1`. - -### 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-binary_authorization-v1beta1/Rakefile b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/Rakefile deleted file mode 100644 index 1ce7279d8545..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/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-binary_authorization-v1beta1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["BINARY_AUTHORIZATION_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["BINARY_AUTHORIZATION_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["BINARY_AUTHORIZATION_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 BINARY_AUTHORIZATION_TEST_PROJECT=test123 BINARY_AUTHORIZATION_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/binary_authorization/v1beta1/binauthz_management_service/credentials" - ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["BINARY_AUTHORIZATION_PROJECT"] = project - ENV["BINARY_AUTHORIZATION_TEST_PROJECT"] = project - ENV["BINARY_AUTHORIZATION_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-binary_authorization-v1beta1 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-binary_authorization-v1beta1 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-binary_authorization-v1beta1 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-binary_authorization-v1beta1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-binary_authorization-v1beta1" - header "google-cloud-binary_authorization-v1beta1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-binary_authorization-v1beta1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-binary_authorization-v1beta1 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-binary_authorization-v1beta1 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-binary_authorization-v1beta1 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-binary_authorization-v1beta1/gapic_metadata.json b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/gapic_metadata.json deleted file mode 100644 index b3053a044eb8..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/gapic_metadata.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.binaryauthorization.v1beta1", - "libraryPackage": "::Google::Cloud::BinaryAuthorization::V1beta1", - "services": { - "BinauthzManagementServiceV1Beta1": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client", - "rpcs": { - "GetPolicy": { - "methods": [ - "get_policy" - ] - }, - "UpdatePolicy": { - "methods": [ - "update_policy" - ] - }, - "CreateAttestor": { - "methods": [ - "create_attestor" - ] - }, - "GetAttestor": { - "methods": [ - "get_attestor" - ] - }, - "UpdateAttestor": { - "methods": [ - "update_attestor" - ] - }, - "ListAttestors": { - "methods": [ - "list_attestors" - ] - }, - "DeleteAttestor": { - "methods": [ - "delete_attestor" - ] - } - } - } - } - }, - "SystemPolicyV1Beta1": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Client", - "rpcs": { - "GetSystemPolicy": { - "methods": [ - "get_system_policy" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/google-cloud-binary_authorization-v1beta1.gemspec b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/google-cloud-binary_authorization-v1beta1.gemspec deleted file mode 100644 index 8baa815ccb07..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/google-cloud-binary_authorization-v1beta1.gemspec +++ /dev/null @@ -1,29 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/binary_authorization/v1beta1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-binary_authorization-v1beta1" - gem.version = Google::Cloud::BinaryAuthorization::V1beta1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Binary Authorization is a service on Google Cloud that provides centralized software supply-chain security for applications that run on Google Kubernetes Engine (GKE) and GKE on-prem. Note that google-cloud-binary_authorization-v1beta1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-binary_authorization instead. See the readme for more details." - gem.summary = "The management interface for Binary Authorization, a service that provides policy-based deployment validation and control for images deployed to Google Kubernetes Engine (GKE), Anthos Service Mesh, Anthos Clusters, and Cloud Run." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.2" - - gem.add_dependency "gapic-common", "~> 1.3" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "google-iam-v1", "~> 1.3" -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google-cloud-binary_authorization-v1beta1.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google-cloud-binary_authorization-v1beta1.rb deleted file mode 100644 index 8a412c54b91b..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google-cloud-binary_authorization-v1beta1.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/binary_authorization/v1beta1" diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1.rb deleted file mode 100644 index 1a6abd865063..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1.rb +++ /dev/null @@ -1,46 +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/binary_authorization/v1beta1/binauthz_management_service" -require "google/cloud/binary_authorization/v1beta1/system_policy" -require "google/cloud/binary_authorization/v1beta1/version" - -module Google - module Cloud - module BinaryAuthorization - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/binary_authorization/v1beta1" - # client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/binary_authorization/v1beta1" - # client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new - # - module V1beta1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1beta1", "_helpers.rb" -require "google/cloud/binary_authorization/v1beta1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service.rb deleted file mode 100644 index 514a9421da0a..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service.rb +++ /dev/null @@ -1,61 +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/binary_authorization/v1beta1/version" - -require "google/cloud/binary_authorization/v1beta1/binauthz_management_service/credentials" -require "google/cloud/binary_authorization/v1beta1/binauthz_management_service/paths" -require "google/cloud/binary_authorization/v1beta1/binauthz_management_service/client" -require "google/cloud/binary_authorization/v1beta1/binauthz_management_service/rest" - -module Google - module Cloud - module BinaryAuthorization - module V1beta1 - ## - # Google Cloud Management Service for Binary Authorization admission policies - # and attestation authorities. - # - # This API implements a REST model with the following objects: - # - # * {::Google::Cloud::BinaryAuthorization::V1beta1::Policy Policy} - # * {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor Attestor} - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/binary_authorization/v1beta1/binauthz_management_service" - # client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/binary_authorization/v1beta1/binauthz_management_service/rest" - # client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new - # - module BinauthzManagementService - end - end - end - end -end - -helper_path = ::File.join __dir__, "binauthz_management_service", "helpers.rb" -require "google/cloud/binary_authorization/v1beta1/binauthz_management_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/client.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/client.rb deleted file mode 100644 index e837d5f8adbd..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/client.rb +++ /dev/null @@ -1,1154 +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/binaryauthorization/v1beta1/service_pb" -require "google/iam/v1" - -module Google - module Cloud - module BinaryAuthorization - module V1beta1 - module BinauthzManagementService - ## - # Client for the BinauthzManagementService service. - # - # Google Cloud Management Service for Binary Authorization admission policies - # and attestation authorities. - # - # This API implements a REST model with the following objects: - # - # * {::Google::Cloud::BinaryAuthorization::V1beta1::Policy Policy} - # * {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor Attestor} - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "binaryauthorization.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :binauthz_management_service_stub - - ## - # Configure the BinauthzManagementService Client class. - # - # See {::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all BinauthzManagementService clients - # ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::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", "BinaryAuthorization", "V1beta1"] - 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_policy.timeout = 600.0 - default_config.rpcs.get_policy.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.update_policy.timeout = 600.0 - default_config.rpcs.update_policy.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.create_attestor.timeout = 600.0 - - default_config.rpcs.get_attestor.timeout = 600.0 - default_config.rpcs.get_attestor.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.update_attestor.timeout = 600.0 - default_config.rpcs.update_attestor.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.list_attestors.timeout = 600.0 - default_config.rpcs.list_attestors.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.delete_attestor.timeout = 600.0 - default_config.rpcs.delete_attestor.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the BinauthzManagementService 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::BinaryAuthorization::V1beta1::BinauthzManagementService::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 - @binauthz_management_service_stub.universe_domain - end - - ## - # Create a new BinauthzManagementService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the BinauthzManagementService 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/binaryauthorization/v1beta1/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 - - @binauthz_management_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementServiceV1Beta1::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 - ) - - @binauthz_management_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 - - @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @binauthz_management_service_stub.endpoint - config.universe_domain = @binauthz_management_service_stub.universe_domain - config.logger = @binauthz_management_service_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for mix-in of the IAMPolicy. - # - # @return [Google::Iam::V1::IAMPolicy::Client] - # - attr_reader :iam_policy_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @binauthz_management_service_stub.logger - end - - # Service calls - - ## - # A {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy} specifies the - # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors} that must - # attest to a container image, before the project is allowed to deploy that - # image. There is at most one policy per project. All image admission - # requests are permitted if a project has no policy. - # - # Gets the {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy} for this - # project. Returns a default - # {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy} if the project - # does not have one. - # - # @overload get_policy(request, options = nil) - # Pass arguments to `get_policy` via a request object, either of type - # {::Google::Cloud::BinaryAuthorization::V1beta1::GetPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BinaryAuthorization::V1beta1::GetPolicyRequest, ::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_policy(name: nil) - # Pass arguments to `get_policy` 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 resource name of the - # {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy} to retrieve, in - # the format `projects/*/policy`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::BinaryAuthorization::V1beta1::Policy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Policy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/binary_authorization/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BinaryAuthorization::V1beta1::GetPolicyRequest.new - # - # # Call the get_policy method. - # result = client.get_policy request - # - # # The returned object is of type Google::Cloud::BinaryAuthorization::V1beta1::Policy. - # p result - # - def get_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1beta1::GetPolicyRequest - - # 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_policy.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::BinaryAuthorization::V1beta1::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_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @binauthz_management_service_stub.call_rpc :get_policy, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates or updates a project's - # {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy}, and returns a - # copy of the new {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy}. - # A policy is always updated as a whole, to avoid race conditions with - # concurrent policy enforcement (or management!) requests. Returns NOT_FOUND - # if the project does not exist, INVALID_ARGUMENT if the request is - # malformed. - # - # @overload update_policy(request, options = nil) - # Pass arguments to `update_policy` via a request object, either of type - # {::Google::Cloud::BinaryAuthorization::V1beta1::UpdatePolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BinaryAuthorization::V1beta1::UpdatePolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_policy(policy: nil) - # Pass arguments to `update_policy` 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 policy [::Google::Cloud::BinaryAuthorization::V1beta1::Policy, ::Hash] - # Required. A new or updated - # {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy} value. The - # service will overwrite the [policy - # name][google.cloud.binaryauthorization.v1beta1.Policy.name] field with the - # resource name in the request URL, in the format `projects/*/policy`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::BinaryAuthorization::V1beta1::Policy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Policy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/binary_authorization/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BinaryAuthorization::V1beta1::UpdatePolicyRequest.new - # - # # Call the update_policy method. - # result = client.update_policy request - # - # # The returned object is of type Google::Cloud::BinaryAuthorization::V1beta1::Policy. - # p result - # - def update_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1beta1::UpdatePolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_policy.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::BinaryAuthorization::V1beta1::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.policy&.name - header_params["policy.name"] = request.policy.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @binauthz_management_service_stub.call_rpc :update_policy, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates an {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor}, - # and returns a copy of the new - # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor}. Returns - # NOT_FOUND if the project does not exist, INVALID_ARGUMENT if the request is - # malformed, ALREADY_EXISTS if the - # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} already - # exists. - # - # @overload create_attestor(request, options = nil) - # Pass arguments to `create_attestor` via a request object, either of type - # {::Google::Cloud::BinaryAuthorization::V1beta1::CreateAttestorRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BinaryAuthorization::V1beta1::CreateAttestorRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_attestor(parent: nil, attestor_id: nil, attestor: nil) - # Pass arguments to `create_attestor` 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. The parent of this - # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor}. - # @param attestor_id [::String] - # Required. The - # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors} ID. - # @param attestor [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor, ::Hash] - # Required. The initial - # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} value. The - # service will overwrite the [attestor - # name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with - # the resource name, in the format `projects/*/attestors/*`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/binary_authorization/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BinaryAuthorization::V1beta1::CreateAttestorRequest.new - # - # # Call the create_attestor method. - # result = client.create_attestor request - # - # # The returned object is of type Google::Cloud::BinaryAuthorization::V1beta1::Attestor. - # p result - # - def create_attestor request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1beta1::CreateAttestorRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_attestor.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::BinaryAuthorization::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_attestor.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_attestor.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @binauthz_management_service_stub.call_rpc :create_attestor, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets an {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor}. - # Returns NOT_FOUND if the - # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} does not - # exist. - # - # @overload get_attestor(request, options = nil) - # Pass arguments to `get_attestor` via a request object, either of type - # {::Google::Cloud::BinaryAuthorization::V1beta1::GetAttestorRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BinaryAuthorization::V1beta1::GetAttestorRequest, ::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_attestor(name: nil) - # Pass arguments to `get_attestor` 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 - # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} to retrieve, - # in the format `projects/*/attestors/*`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/binary_authorization/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BinaryAuthorization::V1beta1::GetAttestorRequest.new - # - # # Call the get_attestor method. - # result = client.get_attestor request - # - # # The returned object is of type Google::Cloud::BinaryAuthorization::V1beta1::Attestor. - # p result - # - def get_attestor request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1beta1::GetAttestorRequest - - # 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_attestor.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::BinaryAuthorization::V1beta1::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_attestor.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_attestor.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @binauthz_management_service_stub.call_rpc :get_attestor, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor}. - # Returns NOT_FOUND if the - # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} does not - # exist. - # - # @overload update_attestor(request, options = nil) - # Pass arguments to `update_attestor` via a request object, either of type - # {::Google::Cloud::BinaryAuthorization::V1beta1::UpdateAttestorRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BinaryAuthorization::V1beta1::UpdateAttestorRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_attestor(attestor: nil) - # Pass arguments to `update_attestor` 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 attestor [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor, ::Hash] - # Required. The updated - # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} value. The - # service will overwrite the [attestor - # name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with - # the resource name in the request URL, in the format - # `projects/*/attestors/*`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/binary_authorization/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BinaryAuthorization::V1beta1::UpdateAttestorRequest.new - # - # # Call the update_attestor method. - # result = client.update_attestor request - # - # # The returned object is of type Google::Cloud::BinaryAuthorization::V1beta1::Attestor. - # p result - # - def update_attestor request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1beta1::UpdateAttestorRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_attestor.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::BinaryAuthorization::V1beta1::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.attestor&.name - header_params["attestor.name"] = request.attestor.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_attestor.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_attestor.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @binauthz_management_service_stub.call_rpc :update_attestor, 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 {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors}. - # Returns INVALID_ARGUMENT if the project does not exist. - # - # @overload list_attestors(request, options = nil) - # Pass arguments to `list_attestors` via a request object, either of type - # {::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsRequest, ::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_attestors(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_attestors` 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. The resource name of the project associated with the - # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors}, in the - # format `projects/*`. - # @param page_size [::Integer] - # Requested page size. The server may return fewer results than requested. If - # unspecified, the server will pick an appropriate default. - # @param page_token [::String] - # A token identifying a page of results the server should return. Typically, - # this is the value of - # {::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsResponse#next_page_token ListAttestorsResponse.next_page_token} - # returned from the previous call to the `ListAttestors` method. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BinaryAuthorization::V1beta1::Attestor>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::BinaryAuthorization::V1beta1::Attestor>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/binary_authorization/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsRequest.new - # - # # Call the list_attestors method. - # result = client.list_attestors 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::BinaryAuthorization::V1beta1::Attestor. - # p item - # end - # - def list_attestors request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsRequest - - # 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_attestors.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::BinaryAuthorization::V1beta1::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_attestors.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_attestors.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @binauthz_management_service_stub.call_rpc :list_attestors, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @binauthz_management_service_stub, :list_attestors, 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 - - ## - # Deletes an {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor}. - # Returns NOT_FOUND if the - # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} does not - # exist. - # - # @overload delete_attestor(request, options = nil) - # Pass arguments to `delete_attestor` via a request object, either of type - # {::Google::Cloud::BinaryAuthorization::V1beta1::DeleteAttestorRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BinaryAuthorization::V1beta1::DeleteAttestorRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_attestor(name: nil) - # Pass arguments to `delete_attestor` 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 - # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors} to delete, - # in the format `projects/*/attestors/*`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::Empty] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/binary_authorization/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BinaryAuthorization::V1beta1::DeleteAttestorRequest.new - # - # # Call the delete_attestor method. - # result = client.delete_attestor request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_attestor request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1beta1::DeleteAttestorRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_attestor.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::BinaryAuthorization::V1beta1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_attestor.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_attestor.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @binauthz_management_service_stub.call_rpc :delete_attestor, 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 BinauthzManagementService API. - # - # This class represents the configuration for BinauthzManagementService, - # 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::BinaryAuthorization::V1beta1::BinauthzManagementService::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_policy to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_policy.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_policy.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::BinaryAuthorization::V1beta1::BinauthzManagementService::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 = "binaryauthorization.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 BinauthzManagementService 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_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_policy - ## - # RPC-specific configuration for `update_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :update_policy - ## - # RPC-specific configuration for `create_attestor` - # @return [::Gapic::Config::Method] - # - attr_reader :create_attestor - ## - # RPC-specific configuration for `get_attestor` - # @return [::Gapic::Config::Method] - # - attr_reader :get_attestor - ## - # RPC-specific configuration for `update_attestor` - # @return [::Gapic::Config::Method] - # - attr_reader :update_attestor - ## - # RPC-specific configuration for `list_attestors` - # @return [::Gapic::Config::Method] - # - attr_reader :list_attestors - ## - # RPC-specific configuration for `delete_attestor` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_attestor - - # @private - def initialize parent_rpcs = nil - get_policy_config = parent_rpcs.get_policy if parent_rpcs.respond_to? :get_policy - @get_policy = ::Gapic::Config::Method.new get_policy_config - update_policy_config = parent_rpcs.update_policy if parent_rpcs.respond_to? :update_policy - @update_policy = ::Gapic::Config::Method.new update_policy_config - create_attestor_config = parent_rpcs.create_attestor if parent_rpcs.respond_to? :create_attestor - @create_attestor = ::Gapic::Config::Method.new create_attestor_config - get_attestor_config = parent_rpcs.get_attestor if parent_rpcs.respond_to? :get_attestor - @get_attestor = ::Gapic::Config::Method.new get_attestor_config - update_attestor_config = parent_rpcs.update_attestor if parent_rpcs.respond_to? :update_attestor - @update_attestor = ::Gapic::Config::Method.new update_attestor_config - list_attestors_config = parent_rpcs.list_attestors if parent_rpcs.respond_to? :list_attestors - @list_attestors = ::Gapic::Config::Method.new list_attestors_config - delete_attestor_config = parent_rpcs.delete_attestor if parent_rpcs.respond_to? :delete_attestor - @delete_attestor = ::Gapic::Config::Method.new delete_attestor_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/credentials.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/credentials.rb deleted file mode 100644 index 62123b4765a6..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/credentials.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! - -require "googleauth" - -module Google - module Cloud - module BinaryAuthorization - module V1beta1 - module BinauthzManagementService - # Credentials for the BinauthzManagementService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "BINARY_AUTHORIZATION_CREDENTIALS", - "BINARY_AUTHORIZATION_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "BINARY_AUTHORIZATION_CREDENTIALS_JSON", - "BINARY_AUTHORIZATION_KEYFILE_JSON", - "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-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/paths.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/paths.rb deleted file mode 100644 index 64f9546c9431..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/paths.rb +++ /dev/null @@ -1,97 +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 BinaryAuthorization - module V1beta1 - module BinauthzManagementService - # Path helper methods for the BinauthzManagementService API. - module Paths - ## - # Create a fully-qualified Attestor resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/attestors/{attestor}` - # - # @param project [String] - # @param attestor [String] - # - # @return [::String] - def attestor_path project:, attestor: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/attestors/#{attestor}" - end - - ## - # Create a fully-qualified Policy resource string. - # - # @overload policy_path(project:) - # The resource will be in the following format: - # - # `projects/{project}/policy` - # - # @param project [String] - # - # @overload policy_path(location:) - # The resource will be in the following format: - # - # `locations/{location}/policy` - # - # @param location [String] - # - # @return [::String] - def policy_path **args - resources = { - "project" => (proc do |project:| - "projects/#{project}/policy" - end), - "location" => (proc do |location:| - "locations/#{location}/policy" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - ## - # Create a fully-qualified Project resource string. - # - # The resource will be in the following format: - # - # `projects/{project}` - # - # @param project [String] - # - # @return [::String] - def project_path project: - "projects/#{project}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/rest.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/rest.rb deleted file mode 100644 index ab2685b4d1be..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/rest.rb +++ /dev/null @@ -1,59 +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/binary_authorization/v1beta1/version" -require "google/cloud/binary_authorization/v1beta1/bindings_override" - -require "google/cloud/binary_authorization/v1beta1/binauthz_management_service/credentials" -require "google/cloud/binary_authorization/v1beta1/binauthz_management_service/paths" -require "google/cloud/binary_authorization/v1beta1/binauthz_management_service/rest/client" - -module Google - module Cloud - module BinaryAuthorization - module V1beta1 - ## - # Google Cloud Management Service for Binary Authorization admission policies - # and attestation authorities. - # - # This API implements a REST model with the following objects: - # - # * {::Google::Cloud::BinaryAuthorization::V1beta1::Policy Policy} - # * {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor Attestor} - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/binary_authorization/v1beta1/binauthz_management_service/rest" - # client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new - # - module BinauthzManagementService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/binary_authorization/v1beta1/binauthz_management_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/rest/client.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/rest/client.rb deleted file mode 100644 index 71a425323112..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/rest/client.rb +++ /dev/null @@ -1,1070 +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/binaryauthorization/v1beta1/service_pb" -require "google/cloud/binary_authorization/v1beta1/binauthz_management_service/rest/service_stub" -require "google/iam/v1/rest" - -module Google - module Cloud - module BinaryAuthorization - module V1beta1 - module BinauthzManagementService - module Rest - ## - # REST client for the BinauthzManagementService service. - # - # Google Cloud Management Service for Binary Authorization admission policies - # and attestation authorities. - # - # This API implements a REST model with the following objects: - # - # * {::Google::Cloud::BinaryAuthorization::V1beta1::Policy Policy} - # * {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor Attestor} - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "binaryauthorization.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :binauthz_management_service_stub - - ## - # Configure the BinauthzManagementService Client class. - # - # See {::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all BinauthzManagementService clients - # ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::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", "BinaryAuthorization", "V1beta1"] - 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_policy.timeout = 600.0 - default_config.rpcs.get_policy.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.update_policy.timeout = 600.0 - default_config.rpcs.update_policy.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.create_attestor.timeout = 600.0 - - default_config.rpcs.get_attestor.timeout = 600.0 - default_config.rpcs.get_attestor.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.update_attestor.timeout = 600.0 - default_config.rpcs.update_attestor.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.list_attestors.timeout = 600.0 - default_config.rpcs.list_attestors.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.delete_attestor.timeout = 600.0 - default_config.rpcs.delete_attestor.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the BinauthzManagementService 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::BinaryAuthorization::V1beta1::BinauthzManagementService::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 - @binauthz_management_service_stub.universe_domain - end - - ## - # Create a new BinauthzManagementService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the BinauthzManagementService 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 - - @binauthz_management_service_stub = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @binauthz_management_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 - - @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @binauthz_management_service_stub.endpoint - config.universe_domain = @binauthz_management_service_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @binauthz_management_service_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for mix-in of the IAMPolicy. - # - # @return [Google::Iam::V1::IAMPolicy::Rest::Client] - # - attr_reader :iam_policy_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @binauthz_management_service_stub.logger - end - - # Service calls - - ## - # A {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy} specifies the - # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors} that must - # attest to a container image, before the project is allowed to deploy that - # image. There is at most one policy per project. All image admission - # requests are permitted if a project has no policy. - # - # Gets the {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy} for this - # project. Returns a default - # {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy} if the project - # does not have one. - # - # @overload get_policy(request, options = nil) - # Pass arguments to `get_policy` via a request object, either of type - # {::Google::Cloud::BinaryAuthorization::V1beta1::GetPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BinaryAuthorization::V1beta1::GetPolicyRequest, ::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_policy(name: nil) - # Pass arguments to `get_policy` 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 resource name of the - # {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy} to retrieve, in - # the format `projects/*/policy`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BinaryAuthorization::V1beta1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Policy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/binary_authorization/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BinaryAuthorization::V1beta1::GetPolicyRequest.new - # - # # Call the get_policy method. - # result = client.get_policy request - # - # # The returned object is of type Google::Cloud::BinaryAuthorization::V1beta1::Policy. - # p result - # - def get_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1beta1::GetPolicyRequest - - # 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_policy.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::BinaryAuthorization::V1beta1::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_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @binauthz_management_service_stub.get_policy request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates or updates a project's - # {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy}, and returns a - # copy of the new {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy}. - # A policy is always updated as a whole, to avoid race conditions with - # concurrent policy enforcement (or management!) requests. Returns NOT_FOUND - # if the project does not exist, INVALID_ARGUMENT if the request is - # malformed. - # - # @overload update_policy(request, options = nil) - # Pass arguments to `update_policy` via a request object, either of type - # {::Google::Cloud::BinaryAuthorization::V1beta1::UpdatePolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BinaryAuthorization::V1beta1::UpdatePolicyRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_policy(policy: nil) - # Pass arguments to `update_policy` 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 policy [::Google::Cloud::BinaryAuthorization::V1beta1::Policy, ::Hash] - # Required. A new or updated - # {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy} value. The - # service will overwrite the [policy - # name][google.cloud.binaryauthorization.v1beta1.Policy.name] field with the - # resource name in the request URL, in the format `projects/*/policy`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BinaryAuthorization::V1beta1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Policy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/binary_authorization/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BinaryAuthorization::V1beta1::UpdatePolicyRequest.new - # - # # Call the update_policy method. - # result = client.update_policy request - # - # # The returned object is of type Google::Cloud::BinaryAuthorization::V1beta1::Policy. - # p result - # - def update_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1beta1::UpdatePolicyRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_policy.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::BinaryAuthorization::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @binauthz_management_service_stub.update_policy request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates an {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor}, - # and returns a copy of the new - # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor}. Returns - # NOT_FOUND if the project does not exist, INVALID_ARGUMENT if the request is - # malformed, ALREADY_EXISTS if the - # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} already - # exists. - # - # @overload create_attestor(request, options = nil) - # Pass arguments to `create_attestor` via a request object, either of type - # {::Google::Cloud::BinaryAuthorization::V1beta1::CreateAttestorRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BinaryAuthorization::V1beta1::CreateAttestorRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_attestor(parent: nil, attestor_id: nil, attestor: nil) - # Pass arguments to `create_attestor` 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. The parent of this - # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor}. - # @param attestor_id [::String] - # Required. The - # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors} ID. - # @param attestor [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor, ::Hash] - # Required. The initial - # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} value. The - # service will overwrite the [attestor - # name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with - # the resource name, in the format `projects/*/attestors/*`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/binary_authorization/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BinaryAuthorization::V1beta1::CreateAttestorRequest.new - # - # # Call the create_attestor method. - # result = client.create_attestor request - # - # # The returned object is of type Google::Cloud::BinaryAuthorization::V1beta1::Attestor. - # p result - # - def create_attestor request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1beta1::CreateAttestorRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.create_attestor.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::BinaryAuthorization::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_attestor.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_attestor.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @binauthz_management_service_stub.create_attestor request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets an {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor}. - # Returns NOT_FOUND if the - # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} does not - # exist. - # - # @overload get_attestor(request, options = nil) - # Pass arguments to `get_attestor` via a request object, either of type - # {::Google::Cloud::BinaryAuthorization::V1beta1::GetAttestorRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BinaryAuthorization::V1beta1::GetAttestorRequest, ::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_attestor(name: nil) - # Pass arguments to `get_attestor` 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 - # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} to retrieve, - # in the format `projects/*/attestors/*`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/binary_authorization/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BinaryAuthorization::V1beta1::GetAttestorRequest.new - # - # # Call the get_attestor method. - # result = client.get_attestor request - # - # # The returned object is of type Google::Cloud::BinaryAuthorization::V1beta1::Attestor. - # p result - # - def get_attestor request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1beta1::GetAttestorRequest - - # 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_attestor.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::BinaryAuthorization::V1beta1::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_attestor.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_attestor.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @binauthz_management_service_stub.get_attestor request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor}. - # Returns NOT_FOUND if the - # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} does not - # exist. - # - # @overload update_attestor(request, options = nil) - # Pass arguments to `update_attestor` via a request object, either of type - # {::Google::Cloud::BinaryAuthorization::V1beta1::UpdateAttestorRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BinaryAuthorization::V1beta1::UpdateAttestorRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_attestor(attestor: nil) - # Pass arguments to `update_attestor` 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 attestor [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor, ::Hash] - # Required. The updated - # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} value. The - # service will overwrite the [attestor - # name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with - # the resource name in the request URL, in the format - # `projects/*/attestors/*`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/binary_authorization/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BinaryAuthorization::V1beta1::UpdateAttestorRequest.new - # - # # Call the update_attestor method. - # result = client.update_attestor request - # - # # The returned object is of type Google::Cloud::BinaryAuthorization::V1beta1::Attestor. - # p result - # - def update_attestor request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1beta1::UpdateAttestorRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_attestor.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::BinaryAuthorization::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_attestor.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_attestor.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @binauthz_management_service_stub.update_attestor 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 {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors}. - # Returns INVALID_ARGUMENT if the project does not exist. - # - # @overload list_attestors(request, options = nil) - # Pass arguments to `list_attestors` via a request object, either of type - # {::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsRequest, ::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_attestors(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_attestors` 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. The resource name of the project associated with the - # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors}, in the - # format `projects/*`. - # @param page_size [::Integer] - # Requested page size. The server may return fewer results than requested. If - # unspecified, the server will pick an appropriate default. - # @param page_token [::String] - # A token identifying a page of results the server should return. Typically, - # this is the value of - # {::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsResponse#next_page_token ListAttestorsResponse.next_page_token} - # returned from the previous call to the `ListAttestors` method. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BinaryAuthorization::V1beta1::Attestor>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::BinaryAuthorization::V1beta1::Attestor>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/binary_authorization/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsRequest.new - # - # # Call the list_attestors method. - # result = client.list_attestors 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::BinaryAuthorization::V1beta1::Attestor. - # p item - # end - # - def list_attestors request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsRequest - - # 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_attestors.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::BinaryAuthorization::V1beta1::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_attestors.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_attestors.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @binauthz_management_service_stub.list_attestors request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @binauthz_management_service_stub, :list_attestors, "attestors", 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 - - ## - # Deletes an {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor}. - # Returns NOT_FOUND if the - # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} does not - # exist. - # - # @overload delete_attestor(request, options = nil) - # Pass arguments to `delete_attestor` via a request object, either of type - # {::Google::Cloud::BinaryAuthorization::V1beta1::DeleteAttestorRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BinaryAuthorization::V1beta1::DeleteAttestorRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_attestor(name: nil) - # Pass arguments to `delete_attestor` 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 - # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors} to delete, - # in the format `projects/*/attestors/*`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/binary_authorization/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BinaryAuthorization::V1beta1::DeleteAttestorRequest.new - # - # # Call the delete_attestor method. - # result = client.delete_attestor request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_attestor request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1beta1::DeleteAttestorRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_attestor.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::BinaryAuthorization::V1beta1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_attestor.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_attestor.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @binauthz_management_service_stub.delete_attestor 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 BinauthzManagementService REST API. - # - # This class represents the configuration for BinauthzManagementService 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::BinaryAuthorization::V1beta1::BinauthzManagementService::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_policy to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_policy.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_policy.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 = "binaryauthorization.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - # Overrides for http bindings for the RPCs of this service - # are only used when this service is used as mixin, and only - # by the host service. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the BinauthzManagementService 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_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_policy - ## - # RPC-specific configuration for `update_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :update_policy - ## - # RPC-specific configuration for `create_attestor` - # @return [::Gapic::Config::Method] - # - attr_reader :create_attestor - ## - # RPC-specific configuration for `get_attestor` - # @return [::Gapic::Config::Method] - # - attr_reader :get_attestor - ## - # RPC-specific configuration for `update_attestor` - # @return [::Gapic::Config::Method] - # - attr_reader :update_attestor - ## - # RPC-specific configuration for `list_attestors` - # @return [::Gapic::Config::Method] - # - attr_reader :list_attestors - ## - # RPC-specific configuration for `delete_attestor` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_attestor - - # @private - def initialize parent_rpcs = nil - get_policy_config = parent_rpcs.get_policy if parent_rpcs.respond_to? :get_policy - @get_policy = ::Gapic::Config::Method.new get_policy_config - update_policy_config = parent_rpcs.update_policy if parent_rpcs.respond_to? :update_policy - @update_policy = ::Gapic::Config::Method.new update_policy_config - create_attestor_config = parent_rpcs.create_attestor if parent_rpcs.respond_to? :create_attestor - @create_attestor = ::Gapic::Config::Method.new create_attestor_config - get_attestor_config = parent_rpcs.get_attestor if parent_rpcs.respond_to? :get_attestor - @get_attestor = ::Gapic::Config::Method.new get_attestor_config - update_attestor_config = parent_rpcs.update_attestor if parent_rpcs.respond_to? :update_attestor - @update_attestor = ::Gapic::Config::Method.new update_attestor_config - list_attestors_config = parent_rpcs.list_attestors if parent_rpcs.respond_to? :list_attestors - @list_attestors = ::Gapic::Config::Method.new list_attestors_config - delete_attestor_config = parent_rpcs.delete_attestor if parent_rpcs.respond_to? :delete_attestor - @delete_attestor = ::Gapic::Config::Method.new delete_attestor_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/rest/service_stub.rb deleted file mode 100644 index e95cf3599a62..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/binauthz_management_service/rest/service_stub.rb +++ /dev/null @@ -1,511 +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/binaryauthorization/v1beta1/service_pb" - -module Google - module Cloud - module BinaryAuthorization - module V1beta1 - module BinauthzManagementService - module Rest - ## - # REST service stub for the BinauthzManagementService 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_policy REST call - # - # @param request_pb [::Google::Cloud::BinaryAuthorization::V1beta1::GetPolicyRequest] - # 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::BinaryAuthorization::V1beta1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Policy] - # A result object deserialized from the server's reply - def get_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_policy_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_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BinaryAuthorization::V1beta1::Policy.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_policy REST call - # - # @param request_pb [::Google::Cloud::BinaryAuthorization::V1beta1::UpdatePolicyRequest] - # 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::BinaryAuthorization::V1beta1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Policy] - # A result object deserialized from the server's reply - def update_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_policy_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BinaryAuthorization::V1beta1::Policy.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the create_attestor REST call - # - # @param request_pb [::Google::Cloud::BinaryAuthorization::V1beta1::CreateAttestorRequest] - # 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::BinaryAuthorization::V1beta1::Attestor] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor] - # A result object deserialized from the server's reply - def create_attestor request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_attestor_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "create_attestor", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BinaryAuthorization::V1beta1::Attestor.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_attestor REST call - # - # @param request_pb [::Google::Cloud::BinaryAuthorization::V1beta1::GetAttestorRequest] - # 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::BinaryAuthorization::V1beta1::Attestor] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor] - # A result object deserialized from the server's reply - def get_attestor request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_attestor_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_attestor", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BinaryAuthorization::V1beta1::Attestor.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_attestor REST call - # - # @param request_pb [::Google::Cloud::BinaryAuthorization::V1beta1::UpdateAttestorRequest] - # 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::BinaryAuthorization::V1beta1::Attestor] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor] - # A result object deserialized from the server's reply - def update_attestor request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_attestor_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_attestor", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BinaryAuthorization::V1beta1::Attestor.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_attestors REST call - # - # @param request_pb [::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsRequest] - # 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::BinaryAuthorization::V1beta1::ListAttestorsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsResponse] - # A result object deserialized from the server's reply - def list_attestors request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_attestors_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_attestors", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_attestor REST call - # - # @param request_pb [::Google::Cloud::BinaryAuthorization::V1beta1::DeleteAttestorRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_attestor request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_attestor_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_attestor", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the get_policy REST call - # - # @param request_pb [::Google::Cloud::BinaryAuthorization::V1beta1::GetPolicyRequest] - # 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_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/policy/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_policy REST call - # - # @param request_pb [::Google::Cloud::BinaryAuthorization::V1beta1::UpdatePolicyRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :put, - uri_template: "/v1beta1/{policy.name}", - body: "policy", - matches: [ - ["policy.name", %r{^projects/[^/]+/policy/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_attestor REST call - # - # @param request_pb [::Google::Cloud::BinaryAuthorization::V1beta1::CreateAttestorRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_create_attestor_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta1/{parent}/attestors", - body: "attestor", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_attestor REST call - # - # @param request_pb [::Google::Cloud::BinaryAuthorization::V1beta1::GetAttestorRequest] - # 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_attestor_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/attestors/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_attestor REST call - # - # @param request_pb [::Google::Cloud::BinaryAuthorization::V1beta1::UpdateAttestorRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_attestor_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :put, - uri_template: "/v1beta1/{attestor.name}", - body: "attestor", - matches: [ - ["attestor.name", %r{^projects/[^/]+/attestors/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_attestors REST call - # - # @param request_pb [::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsRequest] - # 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_attestors_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta1/{parent}/attestors", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_attestor REST call - # - # @param request_pb [::Google::Cloud::BinaryAuthorization::V1beta1::DeleteAttestorRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_attestor_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1beta1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/attestors/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/rest.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/rest.rb deleted file mode 100644 index e5f8c1e78405..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/rest.rb +++ /dev/null @@ -1,39 +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/binary_authorization/v1beta1/binauthz_management_service/rest" -require "google/cloud/binary_authorization/v1beta1/system_policy/rest" -require "google/cloud/binary_authorization/v1beta1/bindings_override" -require "google/cloud/binary_authorization/v1beta1/version" - -module Google - module Cloud - module BinaryAuthorization - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/binary_authorization/v1beta1/rest" - # client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new - # - module V1beta1 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy.rb deleted file mode 100644 index 69c5ebc8bbe2..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy.rb +++ /dev/null @@ -1,55 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/binary_authorization/v1beta1/version" - -require "google/cloud/binary_authorization/v1beta1/system_policy/credentials" -require "google/cloud/binary_authorization/v1beta1/system_policy/paths" -require "google/cloud/binary_authorization/v1beta1/system_policy/client" -require "google/cloud/binary_authorization/v1beta1/system_policy/rest" - -module Google - module Cloud - module BinaryAuthorization - module V1beta1 - ## - # API for working with the system policy. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/binary_authorization/v1beta1/system_policy" - # client = ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/binary_authorization/v1beta1/system_policy/rest" - # client = ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Rest::Client.new - # - module SystemPolicy - end - end - end - end -end - -helper_path = ::File.join __dir__, "system_policy", "helpers.rb" -require "google/cloud/binary_authorization/v1beta1/system_policy/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/client.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/client.rb deleted file mode 100644 index d54421dd9f0f..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/client.rb +++ /dev/null @@ -1,493 +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/binaryauthorization/v1beta1/service_pb" -require "google/iam/v1" - -module Google - module Cloud - module BinaryAuthorization - module V1beta1 - module SystemPolicy - ## - # Client for the SystemPolicy service. - # - # API for working with the system policy. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "binaryauthorization.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :system_policy_stub - - ## - # Configure the SystemPolicy Client class. - # - # See {::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all SystemPolicy clients - # ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::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", "BinaryAuthorization", "V1beta1"] - 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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the SystemPolicy 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::BinaryAuthorization::V1beta1::SystemPolicy::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 - @system_policy_stub.universe_domain - end - - ## - # Create a new SystemPolicy client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the SystemPolicy 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/binaryauthorization/v1beta1/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 - - @system_policy_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicyV1Beta1::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 - ) - - @system_policy_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 - - @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @system_policy_stub.endpoint - config.universe_domain = @system_policy_stub.universe_domain - config.logger = @system_policy_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for mix-in of the IAMPolicy. - # - # @return [Google::Iam::V1::IAMPolicy::Client] - # - attr_reader :iam_policy_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @system_policy_stub.logger - end - - # Service calls - - ## - # Gets the current system policy in the specified location. - # - # @overload get_system_policy(request, options = nil) - # Pass arguments to `get_system_policy` via a request object, either of type - # {::Google::Cloud::BinaryAuthorization::V1beta1::GetSystemPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BinaryAuthorization::V1beta1::GetSystemPolicyRequest, ::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_system_policy(name: nil) - # Pass arguments to `get_system_policy` 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 resource name, in the format `locations/*/policy`. - # Note that the system policy is not associated with a project. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::BinaryAuthorization::V1beta1::Policy] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Policy] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/binary_authorization/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BinaryAuthorization::V1beta1::GetSystemPolicyRequest.new - # - # # Call the get_system_policy method. - # result = client.get_system_policy request - # - # # The returned object is of type Google::Cloud::BinaryAuthorization::V1beta1::Policy. - # p result - # - def get_system_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1beta1::GetSystemPolicyRequest - - # 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_system_policy.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::BinaryAuthorization::V1beta1::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_system_policy.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_system_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @system_policy_stub.call_rpc :get_system_policy, 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 SystemPolicy API. - # - # This class represents the configuration for SystemPolicy, - # 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::BinaryAuthorization::V1beta1::SystemPolicy::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_system_policy to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_system_policy.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_system_policy.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::BinaryAuthorization::V1beta1::SystemPolicy::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 = "binaryauthorization.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 SystemPolicy 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_system_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_system_policy - - # @private - def initialize parent_rpcs = nil - get_system_policy_config = parent_rpcs.get_system_policy if parent_rpcs.respond_to? :get_system_policy - @get_system_policy = ::Gapic::Config::Method.new get_system_policy_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/credentials.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/credentials.rb deleted file mode 100644 index 5086add422bf..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/credentials.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! - -require "googleauth" - -module Google - module Cloud - module BinaryAuthorization - module V1beta1 - module SystemPolicy - # Credentials for the SystemPolicy API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "BINARY_AUTHORIZATION_CREDENTIALS", - "BINARY_AUTHORIZATION_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "BINARY_AUTHORIZATION_CREDENTIALS_JSON", - "BINARY_AUTHORIZATION_KEYFILE_JSON", - "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-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/paths.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/paths.rb deleted file mode 100644 index acd18465e582..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/paths.rb +++ /dev/null @@ -1,66 +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 BinaryAuthorization - module V1beta1 - module SystemPolicy - # Path helper methods for the SystemPolicy API. - module Paths - ## - # Create a fully-qualified Policy resource string. - # - # @overload policy_path(project:) - # The resource will be in the following format: - # - # `projects/{project}/policy` - # - # @param project [String] - # - # @overload policy_path(location:) - # The resource will be in the following format: - # - # `locations/{location}/policy` - # - # @param location [String] - # - # @return [::String] - def policy_path **args - resources = { - "project" => (proc do |project:| - "projects/#{project}/policy" - end), - "location" => (proc do |location:| - "locations/#{location}/policy" - end) - } - - resource = resources[args.keys.sort.join(":")] - raise ::ArgumentError, "no resource found for values #{args.keys}" if resource.nil? - resource.call(**args) - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/rest.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/rest.rb deleted file mode 100644 index 59ce8a98a273..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/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/binary_authorization/v1beta1/version" -require "google/cloud/binary_authorization/v1beta1/bindings_override" - -require "google/cloud/binary_authorization/v1beta1/system_policy/credentials" -require "google/cloud/binary_authorization/v1beta1/system_policy/paths" -require "google/cloud/binary_authorization/v1beta1/system_policy/rest/client" - -module Google - module Cloud - module BinaryAuthorization - module V1beta1 - ## - # API for working with the system policy. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/binary_authorization/v1beta1/system_policy/rest" - # client = ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Rest::Client.new - # - module SystemPolicy - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/binary_authorization/v1beta1/system_policy/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/rest/client.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/rest/client.rb deleted file mode 100644 index 008d58539e00..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/rest/client.rb +++ /dev/null @@ -1,451 +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/binaryauthorization/v1beta1/service_pb" -require "google/cloud/binary_authorization/v1beta1/system_policy/rest/service_stub" -require "google/iam/v1/rest" - -module Google - module Cloud - module BinaryAuthorization - module V1beta1 - module SystemPolicy - module Rest - ## - # REST client for the SystemPolicy service. - # - # API for working with the system policy. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "binaryauthorization.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :system_policy_stub - - ## - # Configure the SystemPolicy Client class. - # - # See {::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all SystemPolicy clients - # ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::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", "BinaryAuthorization", "V1beta1"] - 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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the SystemPolicy 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::BinaryAuthorization::V1beta1::SystemPolicy::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 - @system_policy_stub.universe_domain - end - - ## - # Create a new SystemPolicy REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the SystemPolicy 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 - - @system_policy_stub = ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @system_policy_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 - - @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @system_policy_stub.endpoint - config.universe_domain = @system_policy_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @system_policy_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for mix-in of the IAMPolicy. - # - # @return [Google::Iam::V1::IAMPolicy::Rest::Client] - # - attr_reader :iam_policy_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @system_policy_stub.logger - end - - # Service calls - - ## - # Gets the current system policy in the specified location. - # - # @overload get_system_policy(request, options = nil) - # Pass arguments to `get_system_policy` via a request object, either of type - # {::Google::Cloud::BinaryAuthorization::V1beta1::GetSystemPolicyRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::BinaryAuthorization::V1beta1::GetSystemPolicyRequest, ::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_system_policy(name: nil) - # Pass arguments to `get_system_policy` 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 resource name, in the format `locations/*/policy`. - # Note that the system policy is not associated with a project. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::BinaryAuthorization::V1beta1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Policy] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/binary_authorization/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::BinaryAuthorization::V1beta1::GetSystemPolicyRequest.new - # - # # Call the get_system_policy method. - # result = client.get_system_policy request - # - # # The returned object is of type Google::Cloud::BinaryAuthorization::V1beta1::Policy. - # p result - # - def get_system_policy request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BinaryAuthorization::V1beta1::GetSystemPolicyRequest - - # 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_system_policy.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::BinaryAuthorization::V1beta1::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_system_policy.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_system_policy.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @system_policy_stub.get_system_policy 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 SystemPolicy REST API. - # - # This class represents the configuration for SystemPolicy 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::BinaryAuthorization::V1beta1::SystemPolicy::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_system_policy to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_system_policy.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_system_policy.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 = "binaryauthorization.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - - # @private - # Overrides for http bindings for the RPCs of this service - # are only used when this service is used as mixin, and only - # by the host service. - # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}] - config_attr :bindings_override, {}, ::Hash, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the SystemPolicy 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_system_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_system_policy - - # @private - def initialize parent_rpcs = nil - get_system_policy_config = parent_rpcs.get_system_policy if parent_rpcs.respond_to? :get_system_policy - @get_system_policy = ::Gapic::Config::Method.new get_system_policy_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/rest/service_stub.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/rest/service_stub.rb deleted file mode 100644 index 6e02f227b484..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/system_policy/rest/service_stub.rb +++ /dev/null @@ -1,142 +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/binaryauthorization/v1beta1/service_pb" - -module Google - module Cloud - module BinaryAuthorization - module V1beta1 - module SystemPolicy - module Rest - ## - # REST service stub for the SystemPolicy 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_system_policy REST call - # - # @param request_pb [::Google::Cloud::BinaryAuthorization::V1beta1::GetSystemPolicyRequest] - # 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::BinaryAuthorization::V1beta1::Policy] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Policy] - # A result object deserialized from the server's reply - def get_system_policy request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_system_policy_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_system_policy", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::BinaryAuthorization::V1beta1::Policy.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_system_policy REST call - # - # @param request_pb [::Google::Cloud::BinaryAuthorization::V1beta1::GetSystemPolicyRequest] - # 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_system_policy_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta1/{name}", - matches: [ - ["name", %r{^locations/[^/]+/policy/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/version.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/version.rb deleted file mode 100644 index a42a2a29d560..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binary_authorization/v1beta1/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 BinaryAuthorization - module V1beta1 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binaryauthorization/v1beta1/continuous_validation_logging_pb.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binaryauthorization/v1beta1/continuous_validation_logging_pb.rb deleted file mode 100644 index 051ea7515920..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binaryauthorization/v1beta1/continuous_validation_logging_pb.rb +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/binaryauthorization/v1beta1/continuous_validation_logging.proto - -require 'google/protobuf' - -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\nLgoogle/cloud/binaryauthorization/v1beta1/continuous_validation_logging.proto\x12(google.cloud.binaryauthorization.v1beta1\x1a\x1fgoogle/protobuf/timestamp.proto\"\x85\x11\n\x19\x43ontinuousValidationEvent\x12u\n\tpod_event\x18\x01 \x01(\x0b\x32`.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEventH\x00\x12r\n\x12\x63onfig_error_event\x18\x04 \x01(\x0b\x32T.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ConfigErrorEventH\x00\x1a\xc5\x0e\n\x1c\x43ontinuousValidationPodEvent\x12\x15\n\rpod_namespace\x18\x07 \x01(\t\x12\x0b\n\x03pod\x18\x01 \x01(\t\x12\x13\n\x0bpolicy_name\x18\x08 \x01(\t\x12/\n\x0b\x64\x65ploy_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x8a\x01\n\x07verdict\x18\x04 \x01(\x0e\x32y.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.PolicyConformanceVerdict\x12}\n\x06images\x18\x05 \x03(\x0b\x32m.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails\x1a\xa3\n\n\x0cImageDetails\x12\r\n\x05image\x18\x01 \x01(\t\x12\x16\n\x0e\x63ontainer_name\x18\x05 \x01(\t\x12\x93\x01\n\x0e\x63ontainer_type\x18\x06 \x01(\x0e\x32{.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails.ContainerType\x12\x89\x01\n\x06result\x18\x02 \x01(\x0e\x32y.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails.AuditResult\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x90\x01\n\rcheck_results\x18\x04 \x03(\x0b\x32y.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails.CheckResult\x1a\xf2\x04\n\x0b\x43heckResult\x12\x17\n\x0f\x63heck_set_index\x18\x01 \x01(\t\x12\x16\n\x0e\x63heck_set_name\x18\x02 \x01(\t\x12\xa1\x01\n\x0f\x63heck_set_scope\x18\x03 \x01(\x0b\x32\x87\x01.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails.CheckResult.CheckSetScope\x12\x13\n\x0b\x63heck_index\x18\x04 \x01(\t\x12\x12\n\ncheck_name\x18\x05 \x01(\t\x12\x12\n\ncheck_type\x18\x06 \x01(\t\x12\x98\x01\n\x07verdict\x18\x07 \x01(\x0e\x32\x86\x01.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails.CheckResult.CheckVerdict\x12\x13\n\x0b\x65xplanation\x18\x08 \x01(\t\x1a^\n\rCheckSetScope\x12$\n\x1akubernetes_service_account\x18\x01 \x01(\tH\x00\x12\x1e\n\x14kubernetes_namespace\x18\x02 \x01(\tH\x00\x42\x07\n\x05scope\"A\n\x0c\x43heckVerdict\x12\x1d\n\x19\x43HECK_VERDICT_UNSPECIFIED\x10\x00\x12\x12\n\x0eNON_CONFORMANT\x10\x01\"k\n\rContainerType\x12\x1e\n\x1a\x43ONTAINER_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tCONTAINER\x10\x01\x12\x12\n\x0eINIT_CONTAINER\x10\x02\x12\x17\n\x13\x45PHEMERAL_CONTAINER\x10\x03\"@\n\x0b\x41uditResult\x12\x1c\n\x18\x41UDIT_RESULT_UNSPECIFIED\x10\x00\x12\t\n\x05\x41LLOW\x10\x01\x12\x08\n\x04\x44\x45NY\x10\x02\"[\n\x18PolicyConformanceVerdict\x12*\n&POLICY_CONFORMANCE_VERDICT_UNSPECIFIED\x10\x00\x12\x13\n\x0fVIOLATES_POLICY\x10\x01\x1a\'\n\x10\x43onfigErrorEvent\x12\x13\n\x0b\x64\x65scription\x18\x01 \x01(\tB\x0c\n\nevent_typeB\xb9\x02\n,com.google.cloud.binaryauthorization.v1beta1B ContinuousValidationLoggingProtoP\x01Z^cloud.google.com/go/binaryauthorization/apiv1beta1/binaryauthorizationpb;binaryauthorizationpb\xf8\x01\x01\xaa\x02(Google.Cloud.BinaryAuthorization.V1Beta1\xca\x02(Google\\Cloud\\BinaryAuthorization\\V1beta1\xea\x02+Google::Cloud::BinaryAuthorization::V1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module BinaryAuthorization - module V1beta1 - ContinuousValidationEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent").msgclass - ContinuousValidationEvent::ContinuousValidationPodEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent").msgclass - ContinuousValidationEvent::ContinuousValidationPodEvent::ImageDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails").msgclass - ContinuousValidationEvent::ContinuousValidationPodEvent::ImageDetails::CheckResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails.CheckResult").msgclass - ContinuousValidationEvent::ContinuousValidationPodEvent::ImageDetails::CheckResult::CheckSetScope = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails.CheckResult.CheckSetScope").msgclass - ContinuousValidationEvent::ContinuousValidationPodEvent::ImageDetails::CheckResult::CheckVerdict = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails.CheckResult.CheckVerdict").enummodule - ContinuousValidationEvent::ContinuousValidationPodEvent::ImageDetails::ContainerType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails.ContainerType").enummodule - ContinuousValidationEvent::ContinuousValidationPodEvent::ImageDetails::AuditResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails.AuditResult").enummodule - ContinuousValidationEvent::ContinuousValidationPodEvent::PolicyConformanceVerdict = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.PolicyConformanceVerdict").enummodule - ContinuousValidationEvent::ConfigErrorEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ConfigErrorEvent").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binaryauthorization/v1beta1/resources_pb.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binaryauthorization/v1beta1/resources_pb.rb deleted file mode 100644 index 164d18d0e897..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binaryauthorization/v1beta1/resources_pb.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/binaryauthorization/v1beta1/resources.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n8google/cloud/binaryauthorization/v1beta1/resources.proto\x12(google.cloud.binaryauthorization.v1beta1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc4\r\n\x06Policy\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12w\n\x1dglobal_policy_evaluation_mode\x18\x07 \x01(\x0e\x32K.google.cloud.binaryauthorization.v1beta1.Policy.GlobalPolicyEvaluationModeB\x03\xe0\x41\x01\x12n\n\x1c\x61\x64mission_whitelist_patterns\x18\x02 \x03(\x0b\x32\x43.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPatternB\x03\xe0\x41\x01\x12q\n\x17\x63luster_admission_rules\x18\x03 \x03(\x0b\x32K.google.cloud.binaryauthorization.v1beta1.Policy.ClusterAdmissionRulesEntryB\x03\xe0\x41\x01\x12\x8a\x01\n$kubernetes_namespace_admission_rules\x18\n \x03(\x0b\x32W.google.cloud.binaryauthorization.v1beta1.Policy.KubernetesNamespaceAdmissionRulesEntryB\x03\xe0\x41\x01\x12\x95\x01\n*kubernetes_service_account_admission_rules\x18\x08 \x03(\x0b\x32\\.google.cloud.binaryauthorization.v1beta1.Policy.KubernetesServiceAccountAdmissionRulesEntryB\x03\xe0\x41\x01\x12\x8d\x01\n&istio_service_identity_admission_rules\x18\t \x03(\x0b\x32X.google.cloud.binaryauthorization.v1beta1.Policy.IstioServiceIdentityAdmissionRulesEntryB\x03\xe0\x41\x01\x12\\\n\x16\x64\x65\x66\x61ult_admission_rule\x18\x04 \x01(\x0b\x32\x37.google.cloud.binaryauthorization.v1beta1.AdmissionRuleB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x11\n\x04\x65tag\x18\x0b \x01(\tB\x03\xe0\x41\x01\x1au\n\x1a\x43lusterAdmissionRulesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x46\n\x05value\x18\x02 \x01(\x0b\x32\x37.google.cloud.binaryauthorization.v1beta1.AdmissionRule:\x02\x38\x01\x1a\x81\x01\n&KubernetesNamespaceAdmissionRulesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x46\n\x05value\x18\x02 \x01(\x0b\x32\x37.google.cloud.binaryauthorization.v1beta1.AdmissionRule:\x02\x38\x01\x1a\x86\x01\n+KubernetesServiceAccountAdmissionRulesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x46\n\x05value\x18\x02 \x01(\x0b\x32\x37.google.cloud.binaryauthorization.v1beta1.AdmissionRule:\x02\x38\x01\x1a\x82\x01\n\'IstioServiceIdentityAdmissionRulesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x46\n\x05value\x18\x02 \x01(\x0b\x32\x37.google.cloud.binaryauthorization.v1beta1.AdmissionRule:\x02\x38\x01\"d\n\x1aGlobalPolicyEvaluationMode\x12-\n)GLOBAL_POLICY_EVALUATION_MODE_UNSPECIFIED\x10\x00\x12\n\n\x06\x45NABLE\x10\x01\x12\x0b\n\x07\x44ISABLE\x10\x02:f\xea\x41\x63\n)binaryauthorization.googleapis.com/Policy\x12\x19projects/{project}/policy\x12\x1blocations/{location}/policy\"1\n\x19\x41\x64missionWhitelistPattern\x12\x14\n\x0cname_pattern\x18\x01 \x01(\t\"\xe4\x03\n\rAdmissionRule\x12\x64\n\x0f\x65valuation_mode\x18\x01 \x01(\x0e\x32\x46.google.cloud.binaryauthorization.v1beta1.AdmissionRule.EvaluationModeB\x03\xe0\x41\x02\x12$\n\x17require_attestations_by\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12\x66\n\x10\x65nforcement_mode\x18\x03 \x01(\x0e\x32G.google.cloud.binaryauthorization.v1beta1.AdmissionRule.EnforcementModeB\x03\xe0\x41\x02\"m\n\x0e\x45valuationMode\x12\x1f\n\x1b\x45VALUATION_MODE_UNSPECIFIED\x10\x00\x12\x10\n\x0c\x41LWAYS_ALLOW\x10\x01\x12\x17\n\x13REQUIRE_ATTESTATION\x10\x02\x12\x0f\n\x0b\x41LWAYS_DENY\x10\x03\"p\n\x0f\x45nforcementMode\x12 \n\x1c\x45NFORCEMENT_MODE_UNSPECIFIED\x10\x00\x12 \n\x1c\x45NFORCED_BLOCK_AND_AUDIT_LOG\x10\x01\x12\x19\n\x15\x44RYRUN_AUDIT_LOG_ONLY\x10\x02\"\xcf\x02\n\x08\x41ttestor\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12\x61\n\x17user_owned_drydock_note\x18\x03 \x01(\x0b\x32>.google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNoteH\x00\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x11\n\x04\x65tag\x18\x07 \x01(\tB\x03\xe0\x41\x01:Y\xea\x41V\n+binaryauthorization.googleapis.com/Attestor\x12\'projects/{project}/attestors/{attestor}B\x0f\n\rattestor_type\"\xb9\x01\n\x14UserOwnedDrydockNote\x12\x1b\n\x0enote_reference\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12U\n\x0bpublic_keys\x18\x02 \x03(\x0b\x32;.google.cloud.binaryauthorization.v1beta1.AttestorPublicKeyB\x03\xe0\x41\x01\x12-\n delegation_service_account_email\x18\x03 \x01(\tB\x03\xe0\x41\x03\"\xcb\x05\n\rPkixPublicKey\x12\x16\n\x0epublic_key_pem\x18\x01 \x01(\t\x12g\n\x13signature_algorithm\x18\x02 \x01(\x0e\x32J.google.cloud.binaryauthorization.v1beta1.PkixPublicKey.SignatureAlgorithm\"\xb8\x04\n\x12SignatureAlgorithm\x12#\n\x1fSIGNATURE_ALGORITHM_UNSPECIFIED\x10\x00\x12\x17\n\x13RSA_PSS_2048_SHA256\x10\x01\x12\x1c\n\x18RSA_SIGN_PSS_2048_SHA256\x10\x01\x12\x17\n\x13RSA_PSS_3072_SHA256\x10\x02\x12\x1c\n\x18RSA_SIGN_PSS_3072_SHA256\x10\x02\x12\x17\n\x13RSA_PSS_4096_SHA256\x10\x03\x12\x1c\n\x18RSA_SIGN_PSS_4096_SHA256\x10\x03\x12\x17\n\x13RSA_PSS_4096_SHA512\x10\x04\x12\x1c\n\x18RSA_SIGN_PSS_4096_SHA512\x10\x04\x12\x1e\n\x1aRSA_SIGN_PKCS1_2048_SHA256\x10\x05\x12\x1e\n\x1aRSA_SIGN_PKCS1_3072_SHA256\x10\x06\x12\x1e\n\x1aRSA_SIGN_PKCS1_4096_SHA256\x10\x07\x12\x1e\n\x1aRSA_SIGN_PKCS1_4096_SHA512\x10\x08\x12\x15\n\x11\x45\x43\x44SA_P256_SHA256\x10\t\x12\x17\n\x13\x45\x43_SIGN_P256_SHA256\x10\t\x12\x15\n\x11\x45\x43\x44SA_P384_SHA384\x10\n\x12\x17\n\x13\x45\x43_SIGN_P384_SHA384\x10\n\x12\x15\n\x11\x45\x43\x44SA_P521_SHA512\x10\x0b\x12\x17\n\x13\x45\x43_SIGN_P521_SHA512\x10\x0b\x12\r\n\tML_DSA_65\x10\r\x1a\x02\x10\x01\"\xbf\x01\n\x11\x41ttestorPublicKey\x12\x14\n\x07\x63omment\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\n\n\x02id\x18\x02 \x01(\t\x12&\n\x1c\x61scii_armored_pgp_public_key\x18\x03 \x01(\tH\x00\x12R\n\x0fpkix_public_key\x18\x05 \x01(\x0b\x32\x37.google.cloud.binaryauthorization.v1beta1.PkixPublicKeyH\x00\x42\x0c\n\npublic_keyB\xb7\x02\n,com.google.cloud.binaryauthorization.v1beta1B!BinaryAuthorizationResourcesProtoP\x01Z^cloud.google.com/go/binaryauthorization/apiv1beta1/binaryauthorizationpb;binaryauthorizationpb\xaa\x02(Google.Cloud.BinaryAuthorization.V1Beta1\xca\x02(Google\\Cloud\\BinaryAuthorization\\V1beta1\xea\x02+Google::Cloud::BinaryAuthorization::V1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module BinaryAuthorization - module V1beta1 - Policy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.Policy").msgclass - Policy::GlobalPolicyEvaluationMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.Policy.GlobalPolicyEvaluationMode").enummodule - AdmissionWhitelistPattern = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern").msgclass - AdmissionRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.AdmissionRule").msgclass - AdmissionRule::EvaluationMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.AdmissionRule.EvaluationMode").enummodule - AdmissionRule::EnforcementMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.AdmissionRule.EnforcementMode").enummodule - Attestor = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.Attestor").msgclass - UserOwnedDrydockNote = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote").msgclass - PkixPublicKey = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.PkixPublicKey").msgclass - PkixPublicKey::SignatureAlgorithm = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.PkixPublicKey.SignatureAlgorithm").enummodule - AttestorPublicKey = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.AttestorPublicKey").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binaryauthorization/v1beta1/service_pb.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binaryauthorization/v1beta1/service_pb.rb deleted file mode 100644 index 6741655dceb7..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binaryauthorization/v1beta1/service_pb.rb +++ /dev/null @@ -1,36 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/binaryauthorization/v1beta1/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/binaryauthorization/v1beta1/resources_pb' -require 'google/protobuf/empty_pb' - - -descriptor_data = "\n6google/cloud/binaryauthorization/v1beta1/service.proto\x12(google.cloud.binaryauthorization.v1beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x38google/cloud/binaryauthorization/v1beta1/resources.proto\x1a\x1bgoogle/protobuf/empty.proto\"S\n\x10GetPolicyRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)binaryauthorization.googleapis.com/Policy\"\\\n\x13UpdatePolicyRequest\x12\x45\n\x06policy\x18\x01 \x01(\x0b\x32\x30.google.cloud.binaryauthorization.v1beta1.PolicyB\x03\xe0\x41\x02\"\xc1\x01\n\x15\x43reateAttestorRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x18\n\x0b\x61ttestor_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12I\n\x08\x61ttestor\x18\x03 \x01(\x0b\x32\x32.google.cloud.binaryauthorization.v1beta1.AttestorB\x03\xe0\x41\x02\"W\n\x12GetAttestorRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+binaryauthorization.googleapis.com/Attestor\"b\n\x15UpdateAttestorRequest\x12I\n\x08\x61ttestor\x18\x01 \x01(\x0b\x32\x32.google.cloud.binaryauthorization.v1beta1.AttestorB\x03\xe0\x41\x02\"\x82\x01\n\x14ListAttestorsRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"w\n\x15ListAttestorsResponse\x12\x45\n\tattestors\x18\x01 \x03(\x0b\x32\x32.google.cloud.binaryauthorization.v1beta1.Attestor\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"Z\n\x15\x44\x65leteAttestorRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+binaryauthorization.googleapis.com/Attestor\"Y\n\x16GetSystemPolicyRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)binaryauthorization.googleapis.com/Policy2\xcb\x0b\n BinauthzManagementServiceV1Beta1\x12\xab\x01\n\tGetPolicy\x12:.google.cloud.binaryauthorization.v1beta1.GetPolicyRequest\x1a\x30.google.cloud.binaryauthorization.v1beta1.Policy\"0\xda\x41\x04name\x82\xd3\xe4\x93\x02#\x12!/v1beta1/{name=projects/*/policy}\x12\xc2\x01\n\x0cUpdatePolicy\x12=.google.cloud.binaryauthorization.v1beta1.UpdatePolicyRequest\x1a\x30.google.cloud.binaryauthorization.v1beta1.Policy\"A\xda\x41\x06policy\x82\xd3\xe4\x93\x02\x32\x1a(/v1beta1/{policy.name=projects/*/policy}:\x06policy\x12\xdd\x01\n\x0e\x43reateAttestor\x12?.google.cloud.binaryauthorization.v1beta1.CreateAttestorRequest\x1a\x32.google.cloud.binaryauthorization.v1beta1.Attestor\"V\xda\x41\x1bparent,attestor_id,attestor\x82\xd3\xe4\x93\x02\x32\"&/v1beta1/{parent=projects/*}/attestors:\x08\x61ttestor\x12\xb6\x01\n\x0bGetAttestor\x12<.google.cloud.binaryauthorization.v1beta1.GetAttestorRequest\x1a\x32.google.cloud.binaryauthorization.v1beta1.Attestor\"5\xda\x41\x04name\x82\xd3\xe4\x93\x02(\x12&/v1beta1/{name=projects/*/attestors/*}\x12\xd3\x01\n\x0eUpdateAttestor\x12?.google.cloud.binaryauthorization.v1beta1.UpdateAttestorRequest\x1a\x32.google.cloud.binaryauthorization.v1beta1.Attestor\"L\xda\x41\x08\x61ttestor\x82\xd3\xe4\x93\x02;\x1a//v1beta1/{attestor.name=projects/*/attestors/*}:\x08\x61ttestor\x12\xc9\x01\n\rListAttestors\x12>.google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest\x1a?.google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse\"7\xda\x41\x06parent\x82\xd3\xe4\x93\x02(\x12&/v1beta1/{parent=projects/*}/attestors\x12\xa0\x01\n\x0e\x44\x65leteAttestor\x12?.google.cloud.binaryauthorization.v1beta1.DeleteAttestorRequest\x1a\x16.google.protobuf.Empty\"5\xda\x41\x04name\x82\xd3\xe4\x93\x02(*&/v1beta1/{name=projects/*/attestors/*}\x1aV\xca\x41\"binaryauthorization.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platform2\xa8\x02\n\x13SystemPolicyV1Beta1\x12\xb8\x01\n\x0fGetSystemPolicy\x12@.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest\x1a\x30.google.cloud.binaryauthorization.v1beta1.Policy\"1\xda\x41\x04name\x82\xd3\xe4\x93\x02$\x12\"/v1beta1/{name=locations/*/policy}\x1aV\xca\x41\"binaryauthorization.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xb5\x02\n,com.google.cloud.binaryauthorization.v1beta1B\x1f\x42inaryAuthorizationServiceProtoP\x01Z^cloud.google.com/go/binaryauthorization/apiv1beta1/binaryauthorizationpb;binaryauthorizationpb\xaa\x02(Google.Cloud.BinaryAuthorization.V1Beta1\xca\x02(Google\\Cloud\\BinaryAuthorization\\V1beta1\xea\x02+Google::Cloud::BinaryAuthorization::V1beta1b\x06proto3" - -pool = ::Google::Protobuf::DescriptorPool.generated_pool -pool.add_serialized_file(descriptor_data) - -module Google - module Cloud - module BinaryAuthorization - module V1beta1 - GetPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.GetPolicyRequest").msgclass - UpdatePolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.UpdatePolicyRequest").msgclass - CreateAttestorRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.CreateAttestorRequest").msgclass - GetAttestorRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.GetAttestorRequest").msgclass - UpdateAttestorRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.UpdateAttestorRequest").msgclass - ListAttestorsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest").msgclass - ListAttestorsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse").msgclass - DeleteAttestorRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.DeleteAttestorRequest").msgclass - GetSystemPolicyRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binaryauthorization/v1beta1/service_services_pb.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binaryauthorization/v1beta1/service_services_pb.rb deleted file mode 100644 index 68b5c171433a..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/lib/google/cloud/binaryauthorization/v1beta1/service_services_pb.rb +++ /dev/null @@ -1,112 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/binaryauthorization/v1beta1/service.proto for package 'Google.Cloud.BinaryAuthorization.V1beta1' -# 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/binaryauthorization/v1beta1/service_pb' - -module Google - module Cloud - module BinaryAuthorization - module V1beta1 - module BinauthzManagementServiceV1Beta1 - # Customer-facing API for Cloud Binary Authorization. - # - # Google Cloud Management Service for Binary Authorization admission policies - # and attestation authorities. - # - # This API implements a REST model with the following objects: - # - # * [Policy][google.cloud.binaryauthorization.v1beta1.Policy] - # * [Attestor][google.cloud.binaryauthorization.v1beta1.Attestor] - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1' - - # A [policy][google.cloud.binaryauthorization.v1beta1.Policy] specifies the - # [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] that must - # attest to a container image, before the project is allowed to deploy that - # image. There is at most one policy per project. All image admission - # requests are permitted if a project has no policy. - # - # Gets the [policy][google.cloud.binaryauthorization.v1beta1.Policy] for this - # project. Returns a default - # [policy][google.cloud.binaryauthorization.v1beta1.Policy] if the project - # does not have one. - rpc :GetPolicy, ::Google::Cloud::BinaryAuthorization::V1beta1::GetPolicyRequest, ::Google::Cloud::BinaryAuthorization::V1beta1::Policy - # Creates or updates a project's - # [policy][google.cloud.binaryauthorization.v1beta1.Policy], and returns a - # copy of the new [policy][google.cloud.binaryauthorization.v1beta1.Policy]. - # A policy is always updated as a whole, to avoid race conditions with - # concurrent policy enforcement (or management!) requests. Returns NOT_FOUND - # if the project does not exist, INVALID_ARGUMENT if the request is - # malformed. - rpc :UpdatePolicy, ::Google::Cloud::BinaryAuthorization::V1beta1::UpdatePolicyRequest, ::Google::Cloud::BinaryAuthorization::V1beta1::Policy - # Creates an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor], - # and returns a copy of the new - # [attestor][google.cloud.binaryauthorization.v1beta1.Attestor]. Returns - # NOT_FOUND if the project does not exist, INVALID_ARGUMENT if the request is - # malformed, ALREADY_EXISTS if the - # [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] already - # exists. - rpc :CreateAttestor, ::Google::Cloud::BinaryAuthorization::V1beta1::CreateAttestorRequest, ::Google::Cloud::BinaryAuthorization::V1beta1::Attestor - # Gets an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor]. - # Returns NOT_FOUND if the - # [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] does not - # exist. - rpc :GetAttestor, ::Google::Cloud::BinaryAuthorization::V1beta1::GetAttestorRequest, ::Google::Cloud::BinaryAuthorization::V1beta1::Attestor - # Updates an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor]. - # Returns NOT_FOUND if the - # [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] does not - # exist. - rpc :UpdateAttestor, ::Google::Cloud::BinaryAuthorization::V1beta1::UpdateAttestorRequest, ::Google::Cloud::BinaryAuthorization::V1beta1::Attestor - # Lists [attestors][google.cloud.binaryauthorization.v1beta1.Attestor]. - # Returns INVALID_ARGUMENT if the project does not exist. - rpc :ListAttestors, ::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsRequest, ::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsResponse - # Deletes an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor]. - # Returns NOT_FOUND if the - # [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] does not - # exist. - rpc :DeleteAttestor, ::Google::Cloud::BinaryAuthorization::V1beta1::DeleteAttestorRequest, ::Google::Protobuf::Empty - end - - Stub = Service.rpc_stub_class - end - module SystemPolicyV1Beta1 - # API for working with the system policy. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.binaryauthorization.v1beta1.SystemPolicyV1Beta1' - - # Gets the current system policy in the specified location. - rpc :GetSystemPolicy, ::Google::Cloud::BinaryAuthorization::V1beta1::GetSystemPolicyRequest, ::Google::Cloud::BinaryAuthorization::V1beta1::Policy - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/README.md b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/README.md deleted file mode 100644 index be8531e0c118..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Binary Authorization V1beta1 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-binary_authorization-v1beta1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/api/client.rb deleted file mode 100644 index 3ab0b096d445..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/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-binary_authorization-v1beta1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/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-binary_authorization-v1beta1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/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-binary_authorization-v1beta1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/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-binary_authorization-v1beta1/proto_docs/google/cloud/binaryauthorization/v1beta1/continuous_validation_logging.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/cloud/binaryauthorization/v1beta1/continuous_validation_logging.rb deleted file mode 100644 index b6a5fb241fd4..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/cloud/binaryauthorization/v1beta1/continuous_validation_logging.rb +++ /dev/null @@ -1,201 +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 BinaryAuthorization - module V1beta1 - # Represents an auditing event from Continuous Validation. - # @!attribute [rw] pod_event - # @return [::Google::Cloud::BinaryAuthorization::V1beta1::ContinuousValidationEvent::ContinuousValidationPodEvent] - # Pod event. - # - # Note: The following fields are mutually exclusive: `pod_event`, `config_error_event`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] config_error_event - # @return [::Google::Cloud::BinaryAuthorization::V1beta1::ContinuousValidationEvent::ConfigErrorEvent] - # Config error event. - # - # Note: The following fields are mutually exclusive: `config_error_event`, `pod_event`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class ContinuousValidationEvent - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # An auditing event for one Pod. - # @!attribute [rw] pod_namespace - # @return [::String] - # The k8s namespace of the Pod. - # @!attribute [rw] pod - # @return [::String] - # The name of the Pod. - # @!attribute [rw] policy_name - # @return [::String] - # The name of the policy. - # @!attribute [rw] deploy_time - # @return [::Google::Protobuf::Timestamp] - # Deploy time of the Pod from k8s. - # @!attribute [rw] end_time - # @return [::Google::Protobuf::Timestamp] - # Termination time of the Pod from k8s, or nothing if still running. - # @!attribute [rw] verdict - # @return [::Google::Cloud::BinaryAuthorization::V1beta1::ContinuousValidationEvent::ContinuousValidationPodEvent::PolicyConformanceVerdict] - # Auditing verdict for this Pod. - # @!attribute [rw] images - # @return [::Array<::Google::Cloud::BinaryAuthorization::V1beta1::ContinuousValidationEvent::ContinuousValidationPodEvent::ImageDetails>] - # List of images with auditing details. - class ContinuousValidationPodEvent - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Container image with auditing details. - # @!attribute [rw] image - # @return [::String] - # The name of the image. - # @!attribute [rw] container_name - # @return [::String] - # The name of the container. - # @!attribute [rw] container_type - # @return [::Google::Cloud::BinaryAuthorization::V1beta1::ContinuousValidationEvent::ContinuousValidationPodEvent::ImageDetails::ContainerType] - # The container type that this image belongs to. - # @!attribute [rw] result - # @return [::Google::Cloud::BinaryAuthorization::V1beta1::ContinuousValidationEvent::ContinuousValidationPodEvent::ImageDetails::AuditResult] - # The result of the audit for this image. - # @!attribute [rw] description - # @return [::String] - # Description of the above result. - # @!attribute [rw] check_results - # @return [::Array<::Google::Cloud::BinaryAuthorization::V1beta1::ContinuousValidationEvent::ContinuousValidationPodEvent::ImageDetails::CheckResult>] - # List of check results. - class ImageDetails - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] check_set_index - # @return [::String] - # The index of the check set. - # @!attribute [rw] check_set_name - # @return [::String] - # The name of the check set. - # @!attribute [rw] check_set_scope - # @return [::Google::Cloud::BinaryAuthorization::V1beta1::ContinuousValidationEvent::ContinuousValidationPodEvent::ImageDetails::CheckResult::CheckSetScope] - # The scope of the check set. - # @!attribute [rw] check_index - # @return [::String] - # The index of the check. - # @!attribute [rw] check_name - # @return [::String] - # The name of the check. - # @!attribute [rw] check_type - # @return [::String] - # The type of the check. - # @!attribute [rw] verdict - # @return [::Google::Cloud::BinaryAuthorization::V1beta1::ContinuousValidationEvent::ContinuousValidationPodEvent::ImageDetails::CheckResult::CheckVerdict] - # The verdict of this check. - # @!attribute [rw] explanation - # @return [::String] - # User-friendly explanation of this check result. - class CheckResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A scope specifier for check sets. - # @!attribute [rw] kubernetes_service_account - # @return [::String] - # Matches a single Kubernetes service account, e.g. - # 'my-namespace:my-service-account'. - # `kubernetes_service_account` scope is always more specific than - # `kubernetes_namespace` scope for the same namespace. - # - # Note: The following fields are mutually exclusive: `kubernetes_service_account`, `kubernetes_namespace`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] kubernetes_namespace - # @return [::String] - # Matches all Kubernetes service accounts in the provided - # namespace, unless a more specific `kubernetes_service_account` - # scope already matched. - # - # Note: The following fields are mutually exclusive: `kubernetes_namespace`, `kubernetes_service_account`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class CheckSetScope - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Result of evaluating one check. - module CheckVerdict - # We should always have a verdict. This is an error. - CHECK_VERDICT_UNSPECIFIED = 0 - - # The check was successfully evaluated and the image did not satisfy - # the check. - NON_CONFORMANT = 1 - end - end - - # The container type. - module ContainerType - # The container type should always be specified. This is an error. - CONTAINER_TYPE_UNSPECIFIED = 0 - - # A regular deployment. - CONTAINER = 1 - - # Init container defined as specified at - # https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ - INIT_CONTAINER = 2 - - # Ephemeral container defined as specified at - # https://kubernetes.io/docs/concepts/workloads/pods/ephemeral-containers/ - EPHEMERAL_CONTAINER = 3 - end - - # Result of the audit. - module AuditResult - # Unspecified result. This is an error. - AUDIT_RESULT_UNSPECIFIED = 0 - - # Image is allowed. - ALLOW = 1 - - # Image is denied. - DENY = 2 - end - end - - # Audit time policy conformance verdict. - module PolicyConformanceVerdict - # We should always have a verdict. This is an error. - POLICY_CONFORMANCE_VERDICT_UNSPECIFIED = 0 - - # The pod violates the policy. - VIOLATES_POLICY = 1 - end - end - - # An event describing a user-actionable configuration issue that prevents CV - # from auditing. - # @!attribute [rw] description - # @return [::String] - # A description of the issue. - class ConfigErrorEvent - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/cloud/binaryauthorization/v1beta1/resources.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/cloud/binaryauthorization/v1beta1/resources.rb deleted file mode 100644 index bce1c007c5da..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/cloud/binaryauthorization/v1beta1/resources.rb +++ /dev/null @@ -1,403 +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 BinaryAuthorization - module V1beta1 - # A {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy} for Binary - # Authorization. - # @!attribute [r] name - # @return [::String] - # Output only. The resource name, in the format `projects/*/policy`. There is - # at most one policy per project. - # @!attribute [rw] description - # @return [::String] - # Optional. A descriptive comment. - # @!attribute [rw] global_policy_evaluation_mode - # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Policy::GlobalPolicyEvaluationMode] - # Optional. Controls the evaluation of a Google-maintained global admission - # policy for common system-level images. Images not covered by the global - # policy will be subject to the project admission policy. This setting - # has no effect when specified inside a global admission policy. - # @!attribute [rw] admission_whitelist_patterns - # @return [::Array<::Google::Cloud::BinaryAuthorization::V1beta1::AdmissionWhitelistPattern>] - # Optional. Admission policy allowlisting. A matching admission request will - # always be permitted. This feature is typically used to exclude Google or - # third-party infrastructure images from Binary Authorization policies. - # @!attribute [rw] cluster_admission_rules - # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::BinaryAuthorization::V1beta1::AdmissionRule}] - # Optional. Per-cluster admission rules. Cluster spec format: - # `location.clusterId`. There can be at most one admission rule per cluster - # spec. - # A `location` is either a compute zone (e.g. us-central1-a) or a region - # (e.g. us-central1). - # For `clusterId` syntax restrictions see - # https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters. - # @!attribute [rw] kubernetes_namespace_admission_rules - # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::BinaryAuthorization::V1beta1::AdmissionRule}] - # Optional. Per-kubernetes-namespace admission rules. K8s namespace spec - # format: - # `[a-z.-]+`, e.g. `some-namespace` - # @!attribute [rw] kubernetes_service_account_admission_rules - # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::BinaryAuthorization::V1beta1::AdmissionRule}] - # Optional. Per-kubernetes-service-account admission rules. Service account - # spec format: `namespace:serviceaccount`. e.g. `test-ns:default` - # @!attribute [rw] istio_service_identity_admission_rules - # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::BinaryAuthorization::V1beta1::AdmissionRule}] - # Optional. Per-istio-service-identity admission rules. Istio service - # identity spec format: - # `spiffe:///ns//sa/` or - # `/ns//sa/` - # e.g. `spiffe://example.com/ns/test-ns/sa/default` - # @!attribute [rw] default_admission_rule - # @return [::Google::Cloud::BinaryAuthorization::V1beta1::AdmissionRule] - # Required. Default admission rule for a cluster without a per-cluster, per- - # kubernetes-service-account, or per-istio-service-identity admission rule. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time when the policy was last updated. - # @!attribute [rw] etag - # @return [::String] - # Optional. A checksum, returned by the server, that can be sent on update - # requests to ensure the policy has an up-to-date value before attempting to - # update it. See https://google.aip.dev/154. - class Policy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Cloud::BinaryAuthorization::V1beta1::AdmissionRule] - class ClusterAdmissionRulesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Cloud::BinaryAuthorization::V1beta1::AdmissionRule] - class KubernetesNamespaceAdmissionRulesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Cloud::BinaryAuthorization::V1beta1::AdmissionRule] - class KubernetesServiceAccountAdmissionRulesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Cloud::BinaryAuthorization::V1beta1::AdmissionRule] - class IstioServiceIdentityAdmissionRulesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - module GlobalPolicyEvaluationMode - # Not specified: DISABLE is assumed. - GLOBAL_POLICY_EVALUATION_MODE_UNSPECIFIED = 0 - - # Enables system policy evaluation. - ENABLE = 1 - - # Disables system policy evaluation. - DISABLE = 2 - end - end - - # An [admission allowlist - # pattern][google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern] - # exempts images from checks by [admission - # rules][google.cloud.binaryauthorization.v1beta1.AdmissionRule]. - # @!attribute [rw] name_pattern - # @return [::String] - # An image name pattern to allowlist, in the form `registry/path/to/image`. - # This supports a trailing `*` as a wildcard, but this is allowed only in - # text after the `registry/` part. `*` wildcard does not match `/`, i.e., - # `gcr.io/nginx*` matches `gcr.io/nginx@latest`, but it does not match - # `gcr.io/nginx/image`. This also supports a trailing `**` wildcard which - # matches subdirectories, i.e., `gcr.io/nginx**` matches - # `gcr.io/nginx/image`. - class AdmissionWhitelistPattern - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An {::Google::Cloud::BinaryAuthorization::V1beta1::AdmissionRule admission rule} - # specifies either that all container images used in a pod creation request - # must be attested to by one or more - # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors}, that all pod - # creations will be allowed, or that all pod creations will be denied. - # - # Images matching an [admission allowlist - # pattern][google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern] - # are exempted from admission rules and will never block a pod creation. - # @!attribute [rw] evaluation_mode - # @return [::Google::Cloud::BinaryAuthorization::V1beta1::AdmissionRule::EvaluationMode] - # Required. How this admission rule will be evaluated. - # @!attribute [rw] require_attestations_by - # @return [::Array<::String>] - # @!attribute [rw] enforcement_mode - # @return [::Google::Cloud::BinaryAuthorization::V1beta1::AdmissionRule::EnforcementMode] - # Required. The action when a pod creation is denied by the admission rule. - class AdmissionRule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - module EvaluationMode - # Do not use. - EVALUATION_MODE_UNSPECIFIED = 0 - - # This rule allows all all pod creations. - ALWAYS_ALLOW = 1 - - # This rule allows a pod creation if all the attestors listed in - # `require_attestations_by` have valid attestations for all of the - # images in the pod spec. - REQUIRE_ATTESTATION = 2 - - # This rule denies all pod creations. - ALWAYS_DENY = 3 - end - - # TODO(wietse) re-word this text to 'per-image' instead of 'per-pod' and to - # allow for three-way evaluation (allow, deny, delegate). - # Defines the possible actions when a pod creation is denied by an admission - # rule. - module EnforcementMode - # Do not use. - ENFORCEMENT_MODE_UNSPECIFIED = 0 - - # Enforce the admission rule by blocking the pod creation. - ENFORCED_BLOCK_AND_AUDIT_LOG = 1 - - # Dryrun mode: Audit logging only. This will allow the pod creation as if - # the admission request had specified break-glass. - DRYRUN_AUDIT_LOG_ONLY = 2 - end - end - - # An {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} that attests - # to container image artifacts. An existing attestor cannot be modified except - # where indicated. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name, in the format: - # `projects/*/attestors/*`. This field may not be updated. - # @!attribute [rw] description - # @return [::String] - # Optional. A descriptive comment. This field may be updated. - # The field may be displayed in chooser dialogs. - # @!attribute [rw] user_owned_drydock_note - # @return [::Google::Cloud::BinaryAuthorization::V1beta1::UserOwnedDrydockNote] - # A Drydock ATTESTATION_AUTHORITY Note, created by the user. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time when the attestor was last updated. - # @!attribute [rw] etag - # @return [::String] - # Optional. A checksum, returned by the server, that can be sent on update - # requests to ensure the attestor has an up-to-date value before attempting - # to update it. See https://google.aip.dev/154. - class Attestor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An [user owned drydock - # note][google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote] - # references a Drydock ATTESTATION_AUTHORITY Note created by the user. - # @!attribute [rw] note_reference - # @return [::String] - # Required. The Drydock resource name of a ATTESTATION_AUTHORITY Note, - # created by the user, in the format: `projects/*/notes/*` (or the legacy - # `providers/*/notes/*`). This field may not be updated. - # - # An attestation by this attestor is stored as a Drydock - # ATTESTATION_AUTHORITY Occurrence that names a container image and that - # links to this Note. Drydock is an external dependency. - # @!attribute [rw] public_keys - # @return [::Array<::Google::Cloud::BinaryAuthorization::V1beta1::AttestorPublicKey>] - # Optional. Public keys that verify attestations signed by this - # attestor. This field may be updated. - # - # If this field is non-empty, one of the specified public keys must - # verify that an attestation was signed by this attestor for the - # image specified in the admission request. - # - # If this field is empty, this attestor always returns that no - # valid attestations exist. - # @!attribute [r] delegation_service_account_email - # @return [::String] - # Output only. This field will contain the service account email address - # that this Attestor will use as the principal when querying Container - # Analysis. Attestor administrators must grant this service account the - # IAM role needed to read attestations from the [note_reference][Note] in - # Container Analysis (`containeranalysis.notes.occurrences.viewer`). - # - # This email address is fixed for the lifetime of the Attestor, but callers - # should not make any other assumptions about the service account email; - # future versions may use an email based on a different naming pattern. - class UserOwnedDrydockNote - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A public key in the PkixPublicKey format (see - # https://tools.ietf.org/html/rfc5280#section-4.1.2.7 for details). - # Public keys of this type are typically textually encoded using the PEM - # format. - # @!attribute [rw] public_key_pem - # @return [::String] - # A PEM-encoded public key, as described in - # https://tools.ietf.org/html/rfc7468#section-13 - # @!attribute [rw] signature_algorithm - # @return [::Google::Cloud::BinaryAuthorization::V1beta1::PkixPublicKey::SignatureAlgorithm] - # The signature algorithm used to verify a message against a signature using - # this key. - # These signature algorithm must match the structure and any object - # identifiers encoded in `public_key_pem` (i.e. this algorithm must match - # that of the public key). - class PkixPublicKey - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Represents a signature algorithm and other information necessary to verify - # signatures with a given public key. - # This is based primarily on the public key types supported by Tink's - # PemKeyType, which is in turn based on KMS's supported signing algorithms. - # See https://cloud.google.com/kms/docs/algorithms. In the future, BinAuthz - # might support additional public key types independently of Tink and/or KMS. - module SignatureAlgorithm - # Not specified. - SIGNATURE_ALGORITHM_UNSPECIFIED = 0 - - # RSASSA-PSS 2048 bit key with a SHA256 digest. - RSA_PSS_2048_SHA256 = 1 - - # RSASSA-PSS 2048 bit key with a SHA256 digest. - RSA_SIGN_PSS_2048_SHA256 = 1 - - # RSASSA-PSS 3072 bit key with a SHA256 digest. - RSA_PSS_3072_SHA256 = 2 - - # RSASSA-PSS 3072 bit key with a SHA256 digest. - RSA_SIGN_PSS_3072_SHA256 = 2 - - # RSASSA-PSS 4096 bit key with a SHA256 digest. - RSA_PSS_4096_SHA256 = 3 - - # RSASSA-PSS 4096 bit key with a SHA256 digest. - RSA_SIGN_PSS_4096_SHA256 = 3 - - # RSASSA-PSS 4096 bit key with a SHA512 digest. - RSA_PSS_4096_SHA512 = 4 - - # RSASSA-PSS 4096 bit key with a SHA512 digest. - RSA_SIGN_PSS_4096_SHA512 = 4 - - # RSASSA-PKCS1-v1_5 with a 2048 bit key and a SHA256 digest. - RSA_SIGN_PKCS1_2048_SHA256 = 5 - - # RSASSA-PKCS1-v1_5 with a 3072 bit key and a SHA256 digest. - RSA_SIGN_PKCS1_3072_SHA256 = 6 - - # RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA256 digest. - RSA_SIGN_PKCS1_4096_SHA256 = 7 - - # RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA512 digest. - RSA_SIGN_PKCS1_4096_SHA512 = 8 - - # ECDSA on the NIST P-256 curve with a SHA256 digest. - ECDSA_P256_SHA256 = 9 - - # ECDSA on the NIST P-256 curve with a SHA256 digest. - EC_SIGN_P256_SHA256 = 9 - - # ECDSA on the NIST P-384 curve with a SHA384 digest. - ECDSA_P384_SHA384 = 10 - - # ECDSA on the NIST P-384 curve with a SHA384 digest. - EC_SIGN_P384_SHA384 = 10 - - # ECDSA on the NIST P-521 curve with a SHA512 digest. - ECDSA_P521_SHA512 = 11 - - # ECDSA on the NIST P-521 curve with a SHA512 digest. - EC_SIGN_P521_SHA512 = 11 - - # ML-DSA-65 Post-Quantum Cryptography signature algorithm. - ML_DSA_65 = 13 - end - end - - # An [attestor public - # key][google.cloud.binaryauthorization.v1beta1.AttestorPublicKey] that will be - # used to verify attestations signed by this attestor. - # @!attribute [rw] comment - # @return [::String] - # Optional. A descriptive comment. This field may be updated. - # @!attribute [rw] id - # @return [::String] - # The ID of this public key. - # Signatures verified by BinAuthz must include the ID of the public key that - # can be used to verify them, and that ID must match the contents of this - # field exactly. - # Additional restrictions on this field can be imposed based on which public - # key type is encapsulated. See the documentation on `public_key` cases below - # for details. - # @!attribute [rw] ascii_armored_pgp_public_key - # @return [::String] - # ASCII-armored representation of a PGP public key, as the entire output by - # the command `gpg --export --armor foo@example.com` (either LF or CRLF - # line endings). - # When using this field, `id` should be left blank. The BinAuthz API - # handlers will calculate the ID and fill it in automatically. BinAuthz - # computes this ID as the OpenPGP RFC4880 V4 fingerprint, represented as - # upper-case hex. If `id` is provided by the caller, it will be - # overwritten by the API-calculated ID. - # - # Note: The following fields are mutually exclusive: `ascii_armored_pgp_public_key`, `pkix_public_key`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] pkix_public_key - # @return [::Google::Cloud::BinaryAuthorization::V1beta1::PkixPublicKey] - # A raw PKIX SubjectPublicKeyInfo format public key. - # - # NOTE: `id` may be explicitly provided by the caller when using this - # type of public key, but it MUST be a valid RFC3986 URI. If `id` is left - # blank, a default one will be computed based on the digest of the DER - # encoding of the public key. - # - # Note: The following fields are mutually exclusive: `pkix_public_key`, `ascii_armored_pgp_public_key`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class AttestorPublicKey - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/cloud/binaryauthorization/v1beta1/service.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/cloud/binaryauthorization/v1beta1/service.rb deleted file mode 100644 index aa3b65a11a46..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/cloud/binaryauthorization/v1beta1/service.rb +++ /dev/null @@ -1,153 +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 BinaryAuthorization - module V1beta1 - # Request message for [BinauthzManagementService.GetPolicy][]. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the - # {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy} to retrieve, in - # the format `projects/*/policy`. - class GetPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for [BinauthzManagementService.UpdatePolicy][]. - # @!attribute [rw] policy - # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Policy] - # Required. A new or updated - # {::Google::Cloud::BinaryAuthorization::V1beta1::Policy policy} value. The - # service will overwrite the [policy - # name][google.cloud.binaryauthorization.v1beta1.Policy.name] field with the - # resource name in the request URL, in the format `projects/*/policy`. - class UpdatePolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for [BinauthzManagementService.CreateAttestor][]. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent of this - # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor}. - # @!attribute [rw] attestor_id - # @return [::String] - # Required. The - # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors} ID. - # @!attribute [rw] attestor - # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor] - # Required. The initial - # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} value. The - # service will overwrite the [attestor - # name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with - # the resource name, in the format `projects/*/attestors/*`. - class CreateAttestorRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for [BinauthzManagementService.GetAttestor][]. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the - # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} to retrieve, - # in the format `projects/*/attestors/*`. - class GetAttestorRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for [BinauthzManagementService.UpdateAttestor][]. - # @!attribute [rw] attestor - # @return [::Google::Cloud::BinaryAuthorization::V1beta1::Attestor] - # Required. The updated - # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestor} value. The - # service will overwrite the [attestor - # name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with - # the resource name in the request URL, in the format - # `projects/*/attestors/*`. - class UpdateAttestorRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for [BinauthzManagementService.ListAttestors][]. - # @!attribute [rw] parent - # @return [::String] - # Required. The resource name of the project associated with the - # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors}, in the - # format `projects/*`. - # @!attribute [rw] page_size - # @return [::Integer] - # Requested page size. The server may return fewer results than requested. If - # unspecified, the server will pick an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # A token identifying a page of results the server should return. Typically, - # this is the value of - # {::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsResponse#next_page_token ListAttestorsResponse.next_page_token} - # returned from the previous call to the `ListAttestors` method. - class ListAttestorsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for [BinauthzManagementService.ListAttestors][]. - # @!attribute [rw] attestors - # @return [::Array<::Google::Cloud::BinaryAuthorization::V1beta1::Attestor>] - # The list of {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors}. - # @!attribute [rw] next_page_token - # @return [::String] - # A token to retrieve the next page of results. Pass this value in the - # {::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsRequest#page_token ListAttestorsRequest.page_token} - # field in the subsequent call to the `ListAttestors` method to retrieve the - # next page of results. - class ListAttestorsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for [BinauthzManagementService.DeleteAttestor][]. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the - # {::Google::Cloud::BinaryAuthorization::V1beta1::Attestor attestors} to delete, - # in the format `projects/*/attestors/*`. - class DeleteAttestorRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to read the current system policy. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name, in the format `locations/*/policy`. - # Note that the system policy is not associated with a project. - class GetSystemPolicyRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/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-binary_authorization-v1beta1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/protobuf/empty.rb +++ /dev/null @@ -1,34 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A generic empty message that you can re-use to avoid defining duplicated - # empty messages in your APIs. A typical example is to use it as the request - # or the response type of an API method. For instance: - # - # service Foo { - # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); - # } - class Empty - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,127 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/Gemfile b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/Gemfile deleted file mode 100644 index 8f4b3597354e..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/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-binary_authorization-v1beta1", path: "../" -else - gem "google-cloud-binary_authorization-v1beta1" -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-binary_authorization-v1beta1/snippets/binauthz_management_service/create_attestor.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/create_attestor.rb deleted file mode 100644 index c46ee14890e1..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/create_attestor.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 binaryauthorization_v1beta1_generated_BinauthzManagementService_CreateAttestor_sync] -require "google/cloud/binary_authorization/v1beta1" - -## -# Snippet for the create_attestor call in the BinauthzManagementService 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::BinaryAuthorization::V1beta1::BinauthzManagementService::Client#create_attestor. -# -def create_attestor - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BinaryAuthorization::V1beta1::CreateAttestorRequest.new - - # Call the create_attestor method. - result = client.create_attestor request - - # The returned object is of type Google::Cloud::BinaryAuthorization::V1beta1::Attestor. - p result -end -# [END binaryauthorization_v1beta1_generated_BinauthzManagementService_CreateAttestor_sync] diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/delete_attestor.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/delete_attestor.rb deleted file mode 100644 index 51992644d116..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/delete_attestor.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 binaryauthorization_v1beta1_generated_BinauthzManagementService_DeleteAttestor_sync] -require "google/cloud/binary_authorization/v1beta1" - -## -# Snippet for the delete_attestor call in the BinauthzManagementService 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::BinaryAuthorization::V1beta1::BinauthzManagementService::Client#delete_attestor. -# -def delete_attestor - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BinaryAuthorization::V1beta1::DeleteAttestorRequest.new - - # Call the delete_attestor method. - result = client.delete_attestor request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END binaryauthorization_v1beta1_generated_BinauthzManagementService_DeleteAttestor_sync] diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/get_attestor.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/get_attestor.rb deleted file mode 100644 index ef7b221c8b46..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/get_attestor.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 binaryauthorization_v1beta1_generated_BinauthzManagementService_GetAttestor_sync] -require "google/cloud/binary_authorization/v1beta1" - -## -# Snippet for the get_attestor call in the BinauthzManagementService 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::BinaryAuthorization::V1beta1::BinauthzManagementService::Client#get_attestor. -# -def get_attestor - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BinaryAuthorization::V1beta1::GetAttestorRequest.new - - # Call the get_attestor method. - result = client.get_attestor request - - # The returned object is of type Google::Cloud::BinaryAuthorization::V1beta1::Attestor. - p result -end -# [END binaryauthorization_v1beta1_generated_BinauthzManagementService_GetAttestor_sync] diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/get_policy.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/get_policy.rb deleted file mode 100644 index dce4e31a50aa..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/get_policy.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 binaryauthorization_v1beta1_generated_BinauthzManagementService_GetPolicy_sync] -require "google/cloud/binary_authorization/v1beta1" - -## -# Snippet for the get_policy call in the BinauthzManagementService 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::BinaryAuthorization::V1beta1::BinauthzManagementService::Client#get_policy. -# -def get_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BinaryAuthorization::V1beta1::GetPolicyRequest.new - - # Call the get_policy method. - result = client.get_policy request - - # The returned object is of type Google::Cloud::BinaryAuthorization::V1beta1::Policy. - p result -end -# [END binaryauthorization_v1beta1_generated_BinauthzManagementService_GetPolicy_sync] diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/list_attestors.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/list_attestors.rb deleted file mode 100644 index c2fbab3a0f9a..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/list_attestors.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 binaryauthorization_v1beta1_generated_BinauthzManagementService_ListAttestors_sync] -require "google/cloud/binary_authorization/v1beta1" - -## -# Snippet for the list_attestors call in the BinauthzManagementService 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::BinaryAuthorization::V1beta1::BinauthzManagementService::Client#list_attestors. -# -def list_attestors - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsRequest.new - - # Call the list_attestors method. - result = client.list_attestors 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::BinaryAuthorization::V1beta1::Attestor. - p item - end -end -# [END binaryauthorization_v1beta1_generated_BinauthzManagementService_ListAttestors_sync] diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/update_attestor.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/update_attestor.rb deleted file mode 100644 index ff23b5b74d4d..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/update_attestor.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 binaryauthorization_v1beta1_generated_BinauthzManagementService_UpdateAttestor_sync] -require "google/cloud/binary_authorization/v1beta1" - -## -# Snippet for the update_attestor call in the BinauthzManagementService 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::BinaryAuthorization::V1beta1::BinauthzManagementService::Client#update_attestor. -# -def update_attestor - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BinaryAuthorization::V1beta1::UpdateAttestorRequest.new - - # Call the update_attestor method. - result = client.update_attestor request - - # The returned object is of type Google::Cloud::BinaryAuthorization::V1beta1::Attestor. - p result -end -# [END binaryauthorization_v1beta1_generated_BinauthzManagementService_UpdateAttestor_sync] diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/update_policy.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/update_policy.rb deleted file mode 100644 index b802404b7a59..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/binauthz_management_service/update_policy.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 binaryauthorization_v1beta1_generated_BinauthzManagementService_UpdatePolicy_sync] -require "google/cloud/binary_authorization/v1beta1" - -## -# Snippet for the update_policy call in the BinauthzManagementService 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::BinaryAuthorization::V1beta1::BinauthzManagementService::Client#update_policy. -# -def update_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BinaryAuthorization::V1beta1::UpdatePolicyRequest.new - - # Call the update_policy method. - result = client.update_policy request - - # The returned object is of type Google::Cloud::BinaryAuthorization::V1beta1::Policy. - p result -end -# [END binaryauthorization_v1beta1_generated_BinauthzManagementService_UpdatePolicy_sync] diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/snippet_metadata_google.cloud.binaryauthorization.v1beta1.json b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/snippet_metadata_google.cloud.binaryauthorization.v1beta1.json deleted file mode 100644 index a14f6813b420..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/snippet_metadata_google.cloud.binaryauthorization.v1beta1.json +++ /dev/null @@ -1,335 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-binary_authorization-v1beta1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.binaryauthorization.v1beta1", - "version": "v1beta1" - } - ] - }, - "snippets": [ - { - "region_tag": "binaryauthorization_v1beta1_generated_BinauthzManagementService_GetPolicy_sync", - "title": "Snippet for the get_policy call in the BinauthzManagementService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client#get_policy.", - "file": "binauthz_management_service/get_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_policy", - "full_name": "::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client#get_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BinaryAuthorization::V1beta1::GetPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BinaryAuthorization::V1beta1::Policy", - "client": { - "short_name": "BinauthzManagementService::Client", - "full_name": "::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client" - }, - "method": { - "short_name": "GetPolicy", - "full_name": "google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1.GetPolicy", - "service": { - "short_name": "BinauthzManagementService", - "full_name": "google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "binaryauthorization_v1beta1_generated_BinauthzManagementService_UpdatePolicy_sync", - "title": "Snippet for the update_policy call in the BinauthzManagementService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client#update_policy.", - "file": "binauthz_management_service/update_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_policy", - "full_name": "::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client#update_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BinaryAuthorization::V1beta1::UpdatePolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BinaryAuthorization::V1beta1::Policy", - "client": { - "short_name": "BinauthzManagementService::Client", - "full_name": "::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client" - }, - "method": { - "short_name": "UpdatePolicy", - "full_name": "google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1.UpdatePolicy", - "service": { - "short_name": "BinauthzManagementService", - "full_name": "google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "binaryauthorization_v1beta1_generated_BinauthzManagementService_CreateAttestor_sync", - "title": "Snippet for the create_attestor call in the BinauthzManagementService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client#create_attestor.", - "file": "binauthz_management_service/create_attestor.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_attestor", - "full_name": "::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client#create_attestor", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BinaryAuthorization::V1beta1::CreateAttestorRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BinaryAuthorization::V1beta1::Attestor", - "client": { - "short_name": "BinauthzManagementService::Client", - "full_name": "::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client" - }, - "method": { - "short_name": "CreateAttestor", - "full_name": "google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1.CreateAttestor", - "service": { - "short_name": "BinauthzManagementService", - "full_name": "google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "binaryauthorization_v1beta1_generated_BinauthzManagementService_GetAttestor_sync", - "title": "Snippet for the get_attestor call in the BinauthzManagementService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client#get_attestor.", - "file": "binauthz_management_service/get_attestor.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_attestor", - "full_name": "::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client#get_attestor", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BinaryAuthorization::V1beta1::GetAttestorRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BinaryAuthorization::V1beta1::Attestor", - "client": { - "short_name": "BinauthzManagementService::Client", - "full_name": "::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client" - }, - "method": { - "short_name": "GetAttestor", - "full_name": "google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1.GetAttestor", - "service": { - "short_name": "BinauthzManagementService", - "full_name": "google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "binaryauthorization_v1beta1_generated_BinauthzManagementService_UpdateAttestor_sync", - "title": "Snippet for the update_attestor call in the BinauthzManagementService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client#update_attestor.", - "file": "binauthz_management_service/update_attestor.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_attestor", - "full_name": "::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client#update_attestor", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BinaryAuthorization::V1beta1::UpdateAttestorRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BinaryAuthorization::V1beta1::Attestor", - "client": { - "short_name": "BinauthzManagementService::Client", - "full_name": "::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client" - }, - "method": { - "short_name": "UpdateAttestor", - "full_name": "google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1.UpdateAttestor", - "service": { - "short_name": "BinauthzManagementService", - "full_name": "google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "binaryauthorization_v1beta1_generated_BinauthzManagementService_ListAttestors_sync", - "title": "Snippet for the list_attestors call in the BinauthzManagementService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client#list_attestors.", - "file": "binauthz_management_service/list_attestors.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_attestors", - "full_name": "::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client#list_attestors", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsResponse", - "client": { - "short_name": "BinauthzManagementService::Client", - "full_name": "::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client" - }, - "method": { - "short_name": "ListAttestors", - "full_name": "google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1.ListAttestors", - "service": { - "short_name": "BinauthzManagementService", - "full_name": "google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "binaryauthorization_v1beta1_generated_BinauthzManagementService_DeleteAttestor_sync", - "title": "Snippet for the delete_attestor call in the BinauthzManagementService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client#delete_attestor.", - "file": "binauthz_management_service/delete_attestor.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_attestor", - "full_name": "::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client#delete_attestor", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BinaryAuthorization::V1beta1::DeleteAttestorRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "BinauthzManagementService::Client", - "full_name": "::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client" - }, - "method": { - "short_name": "DeleteAttestor", - "full_name": "google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1.DeleteAttestor", - "service": { - "short_name": "BinauthzManagementService", - "full_name": "google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "binaryauthorization_v1beta1_generated_SystemPolicy_GetSystemPolicy_sync", - "title": "Snippet for the get_system_policy call in the SystemPolicy service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Client#get_system_policy.", - "file": "system_policy/get_system_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_system_policy", - "full_name": "::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Client#get_system_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::BinaryAuthorization::V1beta1::GetSystemPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::BinaryAuthorization::V1beta1::Policy", - "client": { - "short_name": "SystemPolicy::Client", - "full_name": "::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Client" - }, - "method": { - "short_name": "GetSystemPolicy", - "full_name": "google.cloud.binaryauthorization.v1beta1.SystemPolicyV1Beta1.GetSystemPolicy", - "service": { - "short_name": "SystemPolicy", - "full_name": "google.cloud.binaryauthorization.v1beta1.SystemPolicyV1Beta1" - } - } - }, - "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-binary_authorization-v1beta1/snippets/system_policy/get_system_policy.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/system_policy/get_system_policy.rb deleted file mode 100644 index 3c42be712580..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/snippets/system_policy/get_system_policy.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 binaryauthorization_v1beta1_generated_SystemPolicy_GetSystemPolicy_sync] -require "google/cloud/binary_authorization/v1beta1" - -## -# Snippet for the get_system_policy call in the SystemPolicy 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::BinaryAuthorization::V1beta1::SystemPolicy::Client#get_system_policy. -# -def get_system_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::BinaryAuthorization::V1beta1::GetSystemPolicyRequest.new - - # Call the get_system_policy method. - result = client.get_system_policy request - - # The returned object is of type Google::Cloud::BinaryAuthorization::V1beta1::Policy. - p result -end -# [END binaryauthorization_v1beta1_generated_SystemPolicy_GetSystemPolicy_sync] diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/binauthz_management_service_paths_test.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/binauthz_management_service_paths_test.rb deleted file mode 100644 index ab4e972dbb0f..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/binauthz_management_service_paths_test.rb +++ /dev/null @@ -1,82 +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/binary_authorization/v1beta1/binauthz_management_service" - -class ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::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_attestor_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.attestor_path project: "value0", attestor: "value1" - assert_equal "projects/value0/attestors/value1", path - end - end - - def test_policy_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.policy_path project: "value0" - assert_equal "projects/value0/policy", path - - path = client.policy_path location: "value0" - assert_equal "locations/value0/policy", path - end - end - - def test_project_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.project_path project: "value0" - assert_equal "projects/value0", path - end - end -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/binauthz_management_service_rest_test.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/binauthz_management_service_rest_test.rb deleted file mode 100644 index 1a2d3876da85..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/binauthz_management_service_rest_test.rb +++ /dev/null @@ -1,481 +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/binaryauthorization/v1beta1/service_pb" -require "google/cloud/binary_authorization/v1beta1/binauthz_management_service/rest" - - -class ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::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_policy - # Create test objects. - client_result = ::Google::Cloud::BinaryAuthorization::V1beta1::Policy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_policy_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::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::ServiceStub.stub :transcode_get_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_policy_client_stub do - # Create client - c = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_policy({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_policy name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_policy ::Google::Cloud::BinaryAuthorization::V1beta1::GetPolicyRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_policy({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_policy(::Google::Cloud::BinaryAuthorization::V1beta1::GetPolicyRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_policy_client_stub.call_count - end - end - end - - def test_update_policy - # Create test objects. - client_result = ::Google::Cloud::BinaryAuthorization::V1beta1::Policy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - policy = {} - - update_policy_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::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::ServiceStub.stub :transcode_update_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_policy_client_stub do - # Create client - c = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_policy({ policy: policy }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_policy policy: policy do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_policy ::Google::Cloud::BinaryAuthorization::V1beta1::UpdatePolicyRequest.new(policy: policy) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_policy({ policy: policy }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_policy(::Google::Cloud::BinaryAuthorization::V1beta1::UpdatePolicyRequest.new(policy: policy), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_policy_client_stub.call_count - end - end - end - - def test_create_attestor - # Create test objects. - client_result = ::Google::Cloud::BinaryAuthorization::V1beta1::Attestor.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - attestor_id = "hello world" - attestor = {} - - create_attestor_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::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::ServiceStub.stub :transcode_create_attestor_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_attestor_client_stub do - # Create client - c = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.create_attestor({ parent: parent, attestor_id: attestor_id, attestor: attestor }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.create_attestor parent: parent, attestor_id: attestor_id, attestor: attestor do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.create_attestor ::Google::Cloud::BinaryAuthorization::V1beta1::CreateAttestorRequest.new(parent: parent, attestor_id: attestor_id, attestor: attestor) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.create_attestor({ parent: parent, attestor_id: attestor_id, attestor: attestor }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.create_attestor(::Google::Cloud::BinaryAuthorization::V1beta1::CreateAttestorRequest.new(parent: parent, attestor_id: attestor_id, attestor: attestor), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_attestor_client_stub.call_count - end - end - end - - def test_get_attestor - # Create test objects. - client_result = ::Google::Cloud::BinaryAuthorization::V1beta1::Attestor.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_attestor_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::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::ServiceStub.stub :transcode_get_attestor_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_attestor_client_stub do - # Create client - c = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_attestor({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_attestor name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_attestor ::Google::Cloud::BinaryAuthorization::V1beta1::GetAttestorRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_attestor({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_attestor(::Google::Cloud::BinaryAuthorization::V1beta1::GetAttestorRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_attestor_client_stub.call_count - end - end - end - - def test_update_attestor - # Create test objects. - client_result = ::Google::Cloud::BinaryAuthorization::V1beta1::Attestor.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - attestor = {} - - update_attestor_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::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::ServiceStub.stub :transcode_update_attestor_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_attestor_client_stub do - # Create client - c = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.update_attestor({ attestor: attestor }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.update_attestor attestor: attestor do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.update_attestor ::Google::Cloud::BinaryAuthorization::V1beta1::UpdateAttestorRequest.new(attestor: attestor) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.update_attestor({ attestor: attestor }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.update_attestor(::Google::Cloud::BinaryAuthorization::V1beta1::UpdateAttestorRequest.new(attestor: attestor), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_attestor_client_stub.call_count - end - end - end - - def test_list_attestors - # Create test objects. - client_result = ::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsResponse.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_attestors_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::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::ServiceStub.stub :transcode_list_attestors_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_attestors_client_stub do - # Create client - c = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.list_attestors({ 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_attestors 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_attestors ::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsRequest.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_attestors({ 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_attestors(::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsRequest.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_attestors_client_stub.call_count - end - end - end - - def test_delete_attestor - # Create test objects. - client_result = ::Google::Protobuf::Empty.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_attestor_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::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::ServiceStub.stub :transcode_delete_attestor_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_attestor_client_stub do - # Create client - c = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.delete_attestor({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.delete_attestor name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.delete_attestor ::Google::Cloud::BinaryAuthorization::V1beta1::DeleteAttestorRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.delete_attestor({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.delete_attestor(::Google::Cloud::BinaryAuthorization::V1beta1::DeleteAttestorRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_attestor_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::BinaryAuthorization::V1beta1::BinauthzManagementService::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::BinaryAuthorization::V1beta1::BinauthzManagementService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/binauthz_management_service_test.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/binauthz_management_service_test.rb deleted file mode 100644 index a97fd1677eb4..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/binauthz_management_service_test.rb +++ /dev/null @@ -1,523 +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/binaryauthorization/v1beta1/service_pb" -require "google/cloud/binary_authorization/v1beta1/binauthz_management_service" - -class ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::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_policy - # Create GRPC objects. - grpc_response = ::Google::Cloud::BinaryAuthorization::V1beta1::Policy.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_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_policy, name - assert_kind_of ::Google::Cloud::BinaryAuthorization::V1beta1::GetPolicyRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_policy_client_stub do - # Create client - c = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_policy({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_policy name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_policy ::Google::Cloud::BinaryAuthorization::V1beta1::GetPolicyRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_policy({ 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_policy(::Google::Cloud::BinaryAuthorization::V1beta1::GetPolicyRequest.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_policy_client_stub.call_rpc_count - end - end - - def test_update_policy - # Create GRPC objects. - grpc_response = ::Google::Cloud::BinaryAuthorization::V1beta1::Policy.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. - policy = {} - - update_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_policy, name - assert_kind_of ::Google::Cloud::BinaryAuthorization::V1beta1::UpdatePolicyRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BinaryAuthorization::V1beta1::Policy), request["policy"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_policy_client_stub do - # Create client - c = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_policy({ policy: policy }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_policy policy: policy do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_policy ::Google::Cloud::BinaryAuthorization::V1beta1::UpdatePolicyRequest.new(policy: policy) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_policy({ policy: policy }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_policy(::Google::Cloud::BinaryAuthorization::V1beta1::UpdatePolicyRequest.new(policy: policy), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_policy_client_stub.call_rpc_count - end - end - - def test_create_attestor - # Create GRPC objects. - grpc_response = ::Google::Cloud::BinaryAuthorization::V1beta1::Attestor.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" - attestor_id = "hello world" - attestor = {} - - create_attestor_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_attestor, name - assert_kind_of ::Google::Cloud::BinaryAuthorization::V1beta1::CreateAttestorRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["attestor_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BinaryAuthorization::V1beta1::Attestor), request["attestor"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_attestor_client_stub do - # Create client - c = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.create_attestor({ parent: parent, attestor_id: attestor_id, attestor: attestor }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.create_attestor parent: parent, attestor_id: attestor_id, attestor: attestor do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.create_attestor ::Google::Cloud::BinaryAuthorization::V1beta1::CreateAttestorRequest.new(parent: parent, attestor_id: attestor_id, attestor: attestor) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.create_attestor({ parent: parent, attestor_id: attestor_id, attestor: attestor }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.create_attestor(::Google::Cloud::BinaryAuthorization::V1beta1::CreateAttestorRequest.new(parent: parent, attestor_id: attestor_id, attestor: attestor), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_attestor_client_stub.call_rpc_count - end - end - - def test_get_attestor - # Create GRPC objects. - grpc_response = ::Google::Cloud::BinaryAuthorization::V1beta1::Attestor.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_attestor_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_attestor, name - assert_kind_of ::Google::Cloud::BinaryAuthorization::V1beta1::GetAttestorRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_attestor_client_stub do - # Create client - c = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_attestor({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_attestor name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_attestor ::Google::Cloud::BinaryAuthorization::V1beta1::GetAttestorRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_attestor({ 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_attestor(::Google::Cloud::BinaryAuthorization::V1beta1::GetAttestorRequest.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_attestor_client_stub.call_rpc_count - end - end - - def test_update_attestor - # Create GRPC objects. - grpc_response = ::Google::Cloud::BinaryAuthorization::V1beta1::Attestor.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. - attestor = {} - - update_attestor_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_attestor, name - assert_kind_of ::Google::Cloud::BinaryAuthorization::V1beta1::UpdateAttestorRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::BinaryAuthorization::V1beta1::Attestor), request["attestor"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_attestor_client_stub do - # Create client - c = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.update_attestor({ attestor: attestor }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.update_attestor attestor: attestor do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.update_attestor ::Google::Cloud::BinaryAuthorization::V1beta1::UpdateAttestorRequest.new(attestor: attestor) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.update_attestor({ attestor: attestor }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.update_attestor(::Google::Cloud::BinaryAuthorization::V1beta1::UpdateAttestorRequest.new(attestor: attestor), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_attestor_client_stub.call_rpc_count - end - end - - def test_list_attestors - # Create GRPC objects. - grpc_response = ::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsResponse.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_attestors_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_attestors, name - assert_kind_of ::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsRequest, 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_attestors_client_stub do - # Create client - c = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.list_attestors({ 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_attestors 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_attestors ::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsRequest.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_attestors({ 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_attestors(::Google::Cloud::BinaryAuthorization::V1beta1::ListAttestorsRequest.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_attestors_client_stub.call_rpc_count - end - end - - def test_delete_attestor - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_attestor_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_attestor, name - assert_kind_of ::Google::Cloud::BinaryAuthorization::V1beta1::DeleteAttestorRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_attestor_client_stub do - # Create client - c = ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.delete_attestor({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.delete_attestor name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.delete_attestor ::Google::Cloud::BinaryAuthorization::V1beta1::DeleteAttestorRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.delete_attestor({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - c.delete_attestor(::Google::Cloud::BinaryAuthorization::V1beta1::DeleteAttestorRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_attestor_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::BinaryAuthorization::V1beta1::BinauthzManagementService::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::BinaryAuthorization::V1beta1::BinauthzManagementService::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::BinaryAuthorization::V1beta1::BinauthzManagementService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::BinaryAuthorization::V1beta1::BinauthzManagementService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/system_policy_paths_test.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/system_policy_paths_test.rb deleted file mode 100644 index 4133cf9a2fdf..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/system_policy_paths_test.rb +++ /dev/null @@ -1,58 +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/binary_authorization/v1beta1/system_policy" - -class ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::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_policy_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.policy_path project: "value0" - assert_equal "projects/value0/policy", path - - path = client.policy_path location: "value0" - assert_equal "locations/value0/policy", path - end - end -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/system_policy_rest_test.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/system_policy_rest_test.rb deleted file mode 100644 index bd48c3606241..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/system_policy_rest_test.rb +++ /dev/null @@ -1,153 +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/binaryauthorization/v1beta1/service_pb" -require "google/cloud/binary_authorization/v1beta1/system_policy/rest" - - -class ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::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_system_policy - # Create test objects. - client_result = ::Google::Cloud::BinaryAuthorization::V1beta1::Policy.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_system_policy_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::BinaryAuthorization::V1beta1::SystemPolicy::Rest::ServiceStub.stub :transcode_get_system_policy_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_system_policy_client_stub do - # Create client - c = ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - c.get_system_policy({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - c.get_system_policy name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - c.get_system_policy ::Google::Cloud::BinaryAuthorization::V1beta1::GetSystemPolicyRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - c.get_system_policy({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - c.get_system_policy(::Google::Cloud::BinaryAuthorization::V1beta1::GetSystemPolicyRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_system_policy_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::BinaryAuthorization::V1beta1::SystemPolicy::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::BinaryAuthorization::V1beta1::SystemPolicy::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/system_policy_test.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/system_policy_test.rb deleted file mode 100644 index 71860931b93d..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/google/cloud/binary_authorization/v1beta1/system_policy_test.rb +++ /dev/null @@ -1,162 +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/binaryauthorization/v1beta1/service_pb" -require "google/cloud/binary_authorization/v1beta1/system_policy" - -class ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::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_system_policy - # Create GRPC objects. - grpc_response = ::Google::Cloud::BinaryAuthorization::V1beta1::Policy.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_system_policy_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_system_policy, name - assert_kind_of ::Google::Cloud::BinaryAuthorization::V1beta1::GetSystemPolicyRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_system_policy_client_stub do - # Create client - c = ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - c.get_system_policy({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - c.get_system_policy name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - c.get_system_policy ::Google::Cloud::BinaryAuthorization::V1beta1::GetSystemPolicyRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - c.get_system_policy({ 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_system_policy(::Google::Cloud::BinaryAuthorization::V1beta1::GetSystemPolicyRequest.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_system_policy_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::BinaryAuthorization::V1beta1::SystemPolicy::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::BinaryAuthorization::V1beta1::SystemPolicy::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::BinaryAuthorization::V1beta1::SystemPolicy::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::BinaryAuthorization::V1beta1::SystemPolicy::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/helper.rb b/owl-bot-staging/google-cloud-binary_authorization-v1beta1/test/helper.rb deleted file mode 100644 index 672b337030e7..000000000000 --- a/owl-bot-staging/google-cloud-binary_authorization-v1beta1/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"