From de593446985b1f070a6283ce6239562df1fe8271 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Wed, 4 Feb 2026 04:05:42 +0000 Subject: [PATCH 1/2] feat: Add GKE Hub teams scope and RBAC GAPIC docs: A comment for message `Feature` is changed docs: A comment for field `labels` in message `.google.cloud.gkehub.v1.Feature` is changed docs: A comment for field `spec` in message `.google.cloud.gkehub.v1.Feature` is changed docs: A comment for field `membership_specs` in message `.google.cloud.gkehub.v1.Feature` is changed docs: A comment for field `state` in message `.google.cloud.gkehub.v1.Feature` is changed docs: A comment for field `membership_states` in message `.google.cloud.gkehub.v1.Feature` is changed docs: A comment for message `FeatureResourceState` is changed docs: A comment for enum value `ENABLING` in enum `State` is changed docs: A comment for enum value `ACTIVE` in enum `State` is changed docs: A comment for enum value `DISABLING` in enum `State` is changed docs: A comment for message `CommonFeatureState` is changed docs: A comment for field `state` in message `.google.cloud.gkehub.v1.CommonFeatureState` is changed docs: A comment for field `request_id` in message `.google.cloud.gkehub.v1.CreateFeatureRequest` is changed docs: A comment for field `request_id` in message `.google.cloud.gkehub.v1.UpdateFeatureRequest` is changed docs: A comment for field `cancel_requested` in message `.google.cloud.gkehub.v1.OperationMetadata` is changed PiperOrigin-RevId: 865111649 Source-Link: https://github.com/googleapis/googleapis/commit/7a5706618f42f482acf583febcc7b977b66c25b2 Source-Link: https://github.com/googleapis/googleapis-gen/commit/12b9e72da8c40c8b4d2f03d75f5d1cc15dae5025 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWdrZV9odWItdjEvLk93bEJvdC55YW1sIiwiaCI6IjEyYjllNzJkYThjNDBjOGI0ZDJmMDNkNzVmNWQxY2MxNWRhZTUwMjUifQ== --- .../google-cloud-gke_hub-v1/.gitignore | 22 + .../.repo-metadata.json | 18 + .../google-cloud-gke_hub-v1/.rubocop.yml | 33 + .../google-cloud-gke_hub-v1/.toys.rb | 28 + .../google-cloud-gke_hub-v1/.yardopts | 12 + .../google-cloud-gke_hub-v1/AUTHENTICATION.md | 122 + .../google-cloud-gke_hub-v1/CHANGELOG.md | 2 + .../google-cloud-gke_hub-v1/Gemfile | 11 + .../google-cloud-gke_hub-v1/LICENSE.md | 201 + .../google-cloud-gke_hub-v1/README.md | 154 + .../google-cloud-gke_hub-v1/Rakefile | 169 + .../gapic_metadata.json | 238 + .../google-cloud-gke_hub-v1.gemspec | 28 + .../lib/google-cloud-gke_hub-v1.rb | 21 + .../lib/google/cloud/gke_hub/v1.rb | 45 + .../lib/google/cloud/gke_hub/v1/gke_hub.rb | 72 + .../google/cloud/gke_hub/v1/gke_hub/client.rb | 5173 +++++++++++++++++ .../cloud/gke_hub/v1/gke_hub/credentials.rb | 51 + .../cloud/gke_hub/v1/gke_hub/operations.rb | 841 +++ .../google/cloud/gke_hub/v1/gke_hub/paths.rb | 239 + .../google/cloud/gke_hub/v1/gke_hub/rest.rb | 69 + .../cloud/gke_hub/v1/gke_hub/rest/client.rb | 4822 +++++++++++++++ .../gke_hub/v1/gke_hub/rest/operations.rb | 925 +++ .../gke_hub/v1/gke_hub/rest/service_stub.rb | 2789 +++++++++ .../lib/google/cloud/gke_hub/v1/rest.rb | 37 + .../lib/google/cloud/gke_hub/v1/version.rb | 28 + .../lib/google/cloud/gkehub/v1/feature_pb.rb | 63 + .../lib/google/cloud/gkehub/v1/fleet_pb.rb | 73 + .../google/cloud/gkehub/v1/membership_pb.rb | 57 + .../lib/google/cloud/gkehub/v1/service_pb.rb | 116 + .../cloud/gkehub/v1/service_services_pb.rb | 161 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 473 ++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 + .../v1/configmanagement/configmanagement.rb | 584 ++ .../google/cloud/gkehub/v1/feature.rb | 300 + .../google/cloud/gkehub/v1/fleet.rb | 591 ++ .../google/cloud/gkehub/v1/membership.rb | 370 ++ .../multiclusteringress.rb | 39 + .../rbacrolebindingactuation.rb | 47 + .../google/cloud/gkehub/v1/service.rb | 1142 ++++ .../google/longrunning/operations.rb | 191 + .../proto_docs/google/protobuf/any.rb | 145 + .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/empty.rb | 34 + .../proto_docs/google/protobuf/field_mask.rb | 229 + .../proto_docs/google/protobuf/timestamp.rb | 127 + .../proto_docs/google/rpc/status.rb | 48 + .../google-cloud-gke_hub-v1/snippets/Gemfile | 32 + .../snippets/gke_hub/create_feature.rb | 54 + .../snippets/gke_hub/create_fleet.rb | 54 + .../snippets/gke_hub/create_membership.rb | 54 + .../gke_hub/create_membership_binding.rb | 54 + .../create_membership_rbac_role_binding.rb | 54 + .../snippets/gke_hub/create_scope.rb | 54 + .../gke_hub/create_scope_namespace.rb | 54 + .../gke_hub/create_scope_rbac_role_binding.rb | 54 + .../snippets/gke_hub/delete_feature.rb | 54 + .../snippets/gke_hub/delete_fleet.rb | 54 + .../snippets/gke_hub/delete_membership.rb | 54 + .../gke_hub/delete_membership_binding.rb | 54 + .../delete_membership_rbac_role_binding.rb | 54 + .../snippets/gke_hub/delete_scope.rb | 54 + .../gke_hub/delete_scope_namespace.rb | 54 + .../gke_hub/delete_scope_rbac_role_binding.rb | 54 + .../gke_hub/generate_connect_manifest.rb | 47 + ...erate_membership_rbac_role_binding_yaml.rb | 47 + .../snippets/gke_hub/get_feature.rb | 47 + .../snippets/gke_hub/get_fleet.rb | 47 + .../snippets/gke_hub/get_membership.rb | 47 + .../gke_hub/get_membership_binding.rb | 47 + .../get_membership_rbac_role_binding.rb | 47 + .../snippets/gke_hub/get_scope.rb | 47 + .../snippets/gke_hub/get_scope_namespace.rb | 47 + .../gke_hub/get_scope_rbac_role_binding.rb | 47 + .../gke_hub/list_bound_memberships.rb | 51 + .../snippets/gke_hub/list_features.rb | 51 + .../snippets/gke_hub/list_fleets.rb | 51 + .../gke_hub/list_membership_bindings.rb | 51 + .../list_membership_rbac_role_bindings.rb | 51 + .../snippets/gke_hub/list_memberships.rb | 51 + .../snippets/gke_hub/list_permitted_scopes.rb | 51 + .../snippets/gke_hub/list_scope_namespaces.rb | 51 + .../gke_hub/list_scope_rbac_role_bindings.rb | 51 + .../snippets/gke_hub/list_scopes.rb | 51 + .../snippets/gke_hub/update_feature.rb | 54 + .../snippets/gke_hub/update_fleet.rb | 54 + .../snippets/gke_hub/update_membership.rb | 54 + .../gke_hub/update_membership_binding.rb | 54 + .../update_membership_rbac_role_binding.rb | 54 + .../snippets/gke_hub/update_scope.rb | 54 + .../gke_hub/update_scope_namespace.rb | 54 + .../gke_hub/update_scope_rbac_role_binding.rb | 54 + ...ippet_metadata_google.cloud.gkehub.v1.json | 1775 ++++++ .../gke_hub/v1/gke_hub_operations_test.rb | 400 ++ .../cloud/gke_hub/v1/gke_hub_paths_test.rb | 145 + .../cloud/gke_hub/v1/gke_hub_rest_test.rb | 2544 ++++++++ .../google/cloud/gke_hub/v1/gke_hub_test.rb | 2978 ++++++++++ .../google-cloud-gke_hub-v1/test/helper.rb | 25 + 101 files changed, 31600 insertions(+) create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/README.md create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/google-cloud-gke_hub-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/lib/google-cloud-gke_hub-v1.rb create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1.rb create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub.rb create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub/client.rb create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub/credentials.rb create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub/operations.rb create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub/paths.rb create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub/rest.rb create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/rest.rb create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gkehub/v1/feature_pb.rb create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gkehub/v1/fleet_pb.rb create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gkehub/v1/membership_pb.rb create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gkehub/v1/service_pb.rb create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gkehub/v1/service_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/cloud/gkehub/v1/configmanagement/configmanagement.rb create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/cloud/gkehub/v1/feature.rb create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/cloud/gkehub/v1/fleet.rb create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/cloud/gkehub/v1/membership.rb create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/cloud/gkehub/v1/multiclusteringress/multiclusteringress.rb create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/cloud/gkehub/v1/rbacrolebindingactuation/rbacrolebindingactuation.rb create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/cloud/gkehub/v1/service.rb create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/create_feature.rb create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/create_fleet.rb create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/create_membership.rb create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/create_membership_binding.rb create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/create_membership_rbac_role_binding.rb create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/create_scope.rb create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/create_scope_namespace.rb create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/create_scope_rbac_role_binding.rb create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/delete_feature.rb create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/delete_fleet.rb create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/delete_membership.rb create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/delete_membership_binding.rb create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/delete_membership_rbac_role_binding.rb create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/delete_scope.rb create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/delete_scope_namespace.rb create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/delete_scope_rbac_role_binding.rb create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/generate_connect_manifest.rb create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/generate_membership_rbac_role_binding_yaml.rb create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/get_feature.rb create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/get_fleet.rb create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/get_membership.rb create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/get_membership_binding.rb create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/get_membership_rbac_role_binding.rb create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/get_scope.rb create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/get_scope_namespace.rb create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/get_scope_rbac_role_binding.rb create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/list_bound_memberships.rb create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/list_features.rb create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/list_fleets.rb create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/list_membership_bindings.rb create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/list_membership_rbac_role_bindings.rb create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/list_memberships.rb create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/list_permitted_scopes.rb create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/list_scope_namespaces.rb create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/list_scope_rbac_role_bindings.rb create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/list_scopes.rb create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/update_feature.rb create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/update_fleet.rb create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/update_membership.rb create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/update_membership_binding.rb create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/update_membership_rbac_role_binding.rb create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/update_scope.rb create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/update_scope_namespace.rb create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/update_scope_rbac_role_binding.rb create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/snippets/snippet_metadata_google.cloud.gkehub.v1.json create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/test/google/cloud/gke_hub/v1/gke_hub_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/test/google/cloud/gke_hub/v1/gke_hub_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/test/google/cloud/gke_hub/v1/gke_hub_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/test/google/cloud/gke_hub/v1/gke_hub_test.rb create mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/test/helper.rb diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/.gitignore b/owl-bot-staging/google-cloud-gke_hub-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/.gitignore @@ -0,0 +1,22 @@ +# Ignore bundler lockfiles +Gemfile.lock +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-gke_hub-v1/.repo-metadata.json new file mode 100644 index 000000000000..ef9afa064903 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_id": "gkehub.googleapis.com", + "api_shortname": "gkehub", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-gke_hub-v1/latest", + "distribution_name": "google-cloud-gke_hub-v1", + "is_cloud": true, + "language": "ruby", + "name": "gkehub", + "name_pretty": "GKE Hub V1 API", + "product_documentation": "https://cloud.google.com/anthos/clusters/docs", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "The GKE Hub API centrally manages features and services on all your Kubernetes clusters running in a variety of environments, including Google cloud, on premises in customer datacenters, or other third party clouds. Note that google-cloud-gke_hub-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-gke_hub instead. See the readme for more details.", + "ruby-cloud-env-prefix": "GKE_HUB", + "ruby-cloud-product-url": "https://cloud.google.com/anthos/clusters/docs", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/.rubocop.yml b/owl-bot-staging/google-cloud-gke_hub-v1/.rubocop.yml new file mode 100644 index 000000000000..363761232662 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-gke_hub-v1.gemspec" + - "lib/**/*_pb.rb" + - "proto_docs/**/*" + - "test/**/*" + - "acceptance/**/*" + - "samples/acceptance/**/*" + - "Rakefile" + +Layout/LineLength: + Enabled: false +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false +Naming/AccessorMethodName: + Exclude: + - "snippets/**/*.rb" +Naming/FileName: + Exclude: + - "lib/google-cloud-gke_hub-v1.rb" diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/.toys.rb b/owl-bot-staging/google-cloud-gke_hub-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +toys_version! ">= 0.15.3" + +if ENV["RUBY_COMMON_TOOLS"] + common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] + load File.join(common_tools_dir, "toys", "gapic") +else + load_git remote: "https://github.com/googleapis/ruby-common-tools.git", + path: "toys/gapic", + update: true +end diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/.yardopts b/owl-bot-staging/google-cloud-gke_hub-v1/.yardopts new file mode 100644 index 000000000000..66024980f98d --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="GKE Hub V1 API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +./proto_docs/**/*.rb +- +README.md +LICENSE.md +AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-gke_hub-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..04f4d8306d82 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-gke_hub-v1 library is to use +[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). +To review all of your authentication options, see [Credentials lookup](#credential-lookup). + +## Quickstart + +The following example shows how to set up authentication for a local development +environment with your user credentials. + +**NOTE:** This method is _not_ recommended for running in production. User credentials +should be used only during development. + +1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). +2. Set up a local ADC file with your user credentials: + +```sh +gcloud auth application-default login +``` + +3. Write code as if already authenticated. + +For more information about setting up authentication for a local development environment, see +[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). + +## Credential Lookup + +The google-cloud-gke_hub-v1 library provides several mechanisms to configure your system. +Generally, using Application Default Credentials to facilitate automatic +credentials discovery is the easist method. But if you need to explicitly specify +credentials, there are several methods available to you. + +Credentials are accepted in the following ways, in the following order or precedence: + +1. Credentials specified in method arguments +2. Credentials specified in configuration +3. Credentials pointed to or included in environment variables +4. Credentials found in local ADC file +5. Credentials returned by the metadata server for the attached service account (GCP) + +### Configuration + +You can configure a path to a JSON credentials file, either for an individual client object or +globally, for all client objects. The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +To configure a credentials file for an individual client initialization: + +```ruby +require "google/cloud/gke_hub/v1" + +client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/gke_hub/v1" + +::Google::Cloud::GkeHub::V1::GkeHub::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::GkeHub::V1::GkeHub::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-gke_hub-v1 +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/cloud/gke_hub/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::GkeHub::V1::GkeHub::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-gke_hub-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-gke_hub-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/Gemfile b/owl-bot-staging/google-cloud-gke_hub-v1/Gemfile new file mode 100644 index 000000000000..6442df18fa2f --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/Gemfile @@ -0,0 +1,11 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.31.1" +gem "minitest", "~> 5.22" +gem "minitest-focus", "~> 1.4" +gem "minitest-rg", "~> 5.3" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/LICENSE.md b/owl-bot-staging/google-cloud-gke_hub-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/README.md b/owl-bot-staging/google-cloud-gke_hub-v1/README.md new file mode 100644 index 000000000000..c701638c767a --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the GKE Hub V1 API + +API Client library for the GKE Hub V1 API + +The GKE Hub API centrally manages features and services on all your Kubernetes clusters running in a variety of environments, including Google cloud, on premises in customer datacenters, or other third party clouds. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the GKE Hub V1 API. Most users should consider using +the main client gem, +[google-cloud-gke_hub](https://rubygems.org/gems/google-cloud-gke_hub). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-gke_hub-v1 +``` + +## Before You Begin + +In order to use this library, you first need to go through the following steps: + +1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) +1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) +1. [Enable the API.](https://console.cloud.google.com/apis/library/gkehub.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/gke_hub/v1" + +client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new +request = ::Google::Cloud::GkeHub::V1::ListMembershipsRequest.new # (request fields as keyword arguments...) +response = client.list_memberships request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-gke_hub-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/anthos/clusters/docs) +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/gke_hub/v1" +require "logger" + +client = ::Google::Cloud::GkeHub::V1::GkeHub::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.0+. + +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-gke_hub`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-gke_hub-v1`. +_In most cases, you should install the main client._ + +### What's the difference between the main client and a versioned client? + +A _versioned client_ provides a basic set of data types and client classes for +a _single version_ of a specific service. (That is, for a service with multiple +versions, there might be a separate versioned client for each service version.) +Most versioned clients are written and maintained by a code generator. + +The _main client_ is designed to provide you with the _recommended_ client +interfaces for the service. There will be only one main client for any given +service, even a service with multiple versions. The main client includes +factory methods for constructing the client objects we recommend for most +users. In some cases, those will be classes provided by an underlying versioned +client; in other cases, they will be handwritten higher-level client objects +with additional capabilities, convenience methods, or best practices built in. +Generally, the main client will default to a recommended service version, +although in some cases you can override this if you need to talk to a specific +service version. + +### Why would I want to use the main client? + +We recommend that most users install the main client gem for a service. You can +identify this gem as the one _without_ a version in its name, e.g. +`google-cloud-gke_hub`. +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-gke_hub-v1`. + +### What about the google-apis- clients? + +Client library gems with names that begin with `google-apis-` are based on an +older code generation technology. They talk to a REST/JSON backend (whereas +most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may +not offer the same performance, features, and ease of use provided by more +modern clients. + +The `google-apis-` clients have wide coverage across Google services, so you +might need to use one if there is no modern client available for the service. +However, if a modern client is available, we generally recommend it over the +older `google-apis-` clients. diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/Rakefile b/owl-bot-staging/google-cloud-gke_hub-v1/Rakefile new file mode 100644 index 000000000000..f2cc8478fe6d --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "bundler/setup" +require "bundler/gem_tasks" + +require "rubocop/rake_task" +RuboCop::RakeTask.new + +require "rake/testtask" +desc "Run tests." +Rake::TestTask.new do |t| + t.libs << "test" + t.test_files = FileList["test/**/*_test.rb"] + t.warning = false +end + +desc "Runs the smoke tests." +Rake::TestTask.new :smoke_test do |t| + t.test_files = FileList["acceptance/**/*smoke_test.rb"] + t.warning = false +end + +# Acceptance tests +desc "Run the google-cloud-gke_hub-v1 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["GKE_HUB_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["GKE_HUB_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["GKE_HUB_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 GKE_HUB_TEST_PROJECT=test123 GKE_HUB_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/gke_hub/v1/gke_hub/credentials" + ::Google::Cloud::GkeHub::V1::GkeHub::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["GKE_HUB_PROJECT"] = project + ENV["GKE_HUB_TEST_PROJECT"] = project + ENV["GKE_HUB_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-gke_hub-v1 gem has no acceptance tests." + end + end + + desc "Run acceptance cleanup." + task :cleanup do + end +end + +task :samples do + Rake::Task["samples:latest"].invoke +end + +namespace :samples do + task :latest do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-gke_hub-v1 gem has no samples to test." + end + end + + task :master do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-gke_hub-v1 gem has no samples to test." + end + end +end + +require "yard" +require "yard/rake/yardoc_task" +YARD::Rake::YardocTask.new do |y| + y.options << "--fail-on-warning" +end + +desc "Run yard-doctest example tests." +task :doctest do + puts "The google-cloud-gke_hub-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-gke_hub-v1" + header "google-cloud-gke_hub-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-gke_hub-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-gke_hub-v1 test", "*" + Rake::Task[:test].invoke +end + +namespace :ci do + desc "Run the CI build, with smoke tests." + task :smoke_test do + Rake::Task[:ci].invoke + header "google-cloud-gke_hub-v1 smoke_test", "*" + Rake::Task[:smoke_test].invoke + end + desc "Run the CI build, with acceptance tests." + task :acceptance do + Rake::Task[:ci].invoke + header "google-cloud-gke_hub-v1 acceptance", "*" + Rake::Task[:acceptance].invoke + end + task :a do + # This is a handy shortcut to save typing + Rake::Task["ci:acceptance"].invoke + end +end + +task default: :test + +def header str, token = "#" + line_length = str.length + 8 + puts "" + puts token * line_length + puts "#{token * 3} #{str} #{token * 3}" + puts token * line_length + puts "" +end diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-gke_hub-v1/gapic_metadata.json new file mode 100644 index 000000000000..60141aebea27 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/gapic_metadata.json @@ -0,0 +1,238 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.gkehub.v1", + "libraryPackage": "::Google::Cloud::GkeHub::V1", + "services": { + "GkeHub": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::GkeHub::V1::GkeHub::Client", + "rpcs": { + "ListMemberships": { + "methods": [ + "list_memberships" + ] + }, + "ListBoundMemberships": { + "methods": [ + "list_bound_memberships" + ] + }, + "ListFeatures": { + "methods": [ + "list_features" + ] + }, + "GetMembership": { + "methods": [ + "get_membership" + ] + }, + "GetFeature": { + "methods": [ + "get_feature" + ] + }, + "CreateMembership": { + "methods": [ + "create_membership" + ] + }, + "CreateFeature": { + "methods": [ + "create_feature" + ] + }, + "DeleteMembership": { + "methods": [ + "delete_membership" + ] + }, + "DeleteFeature": { + "methods": [ + "delete_feature" + ] + }, + "UpdateMembership": { + "methods": [ + "update_membership" + ] + }, + "UpdateFeature": { + "methods": [ + "update_feature" + ] + }, + "GenerateConnectManifest": { + "methods": [ + "generate_connect_manifest" + ] + }, + "CreateFleet": { + "methods": [ + "create_fleet" + ] + }, + "GetFleet": { + "methods": [ + "get_fleet" + ] + }, + "UpdateFleet": { + "methods": [ + "update_fleet" + ] + }, + "DeleteFleet": { + "methods": [ + "delete_fleet" + ] + }, + "ListFleets": { + "methods": [ + "list_fleets" + ] + }, + "GetScopeNamespace": { + "methods": [ + "get_scope_namespace" + ] + }, + "CreateScopeNamespace": { + "methods": [ + "create_scope_namespace" + ] + }, + "UpdateScopeNamespace": { + "methods": [ + "update_scope_namespace" + ] + }, + "DeleteScopeNamespace": { + "methods": [ + "delete_scope_namespace" + ] + }, + "ListScopeNamespaces": { + "methods": [ + "list_scope_namespaces" + ] + }, + "GetScopeRBACRoleBinding": { + "methods": [ + "get_scope_rbac_role_binding" + ] + }, + "CreateScopeRBACRoleBinding": { + "methods": [ + "create_scope_rbac_role_binding" + ] + }, + "UpdateScopeRBACRoleBinding": { + "methods": [ + "update_scope_rbac_role_binding" + ] + }, + "DeleteScopeRBACRoleBinding": { + "methods": [ + "delete_scope_rbac_role_binding" + ] + }, + "ListScopeRBACRoleBindings": { + "methods": [ + "list_scope_rbac_role_bindings" + ] + }, + "GetScope": { + "methods": [ + "get_scope" + ] + }, + "CreateScope": { + "methods": [ + "create_scope" + ] + }, + "UpdateScope": { + "methods": [ + "update_scope" + ] + }, + "DeleteScope": { + "methods": [ + "delete_scope" + ] + }, + "ListScopes": { + "methods": [ + "list_scopes" + ] + }, + "ListPermittedScopes": { + "methods": [ + "list_permitted_scopes" + ] + }, + "GetMembershipBinding": { + "methods": [ + "get_membership_binding" + ] + }, + "CreateMembershipBinding": { + "methods": [ + "create_membership_binding" + ] + }, + "UpdateMembershipBinding": { + "methods": [ + "update_membership_binding" + ] + }, + "DeleteMembershipBinding": { + "methods": [ + "delete_membership_binding" + ] + }, + "ListMembershipBindings": { + "methods": [ + "list_membership_bindings" + ] + }, + "GetMembershipRBACRoleBinding": { + "methods": [ + "get_membership_rbac_role_binding" + ] + }, + "CreateMembershipRBACRoleBinding": { + "methods": [ + "create_membership_rbac_role_binding" + ] + }, + "UpdateMembershipRBACRoleBinding": { + "methods": [ + "update_membership_rbac_role_binding" + ] + }, + "DeleteMembershipRBACRoleBinding": { + "methods": [ + "delete_membership_rbac_role_binding" + ] + }, + "ListMembershipRBACRoleBindings": { + "methods": [ + "list_membership_rbac_role_bindings" + ] + }, + "GenerateMembershipRBACRoleBindingYAML": { + "methods": [ + "generate_membership_rbac_role_binding_yaml" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/google-cloud-gke_hub-v1.gemspec b/owl-bot-staging/google-cloud-gke_hub-v1/google-cloud-gke_hub-v1.gemspec new file mode 100644 index 000000000000..bdc6cfcf830e --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/google-cloud-gke_hub-v1.gemspec @@ -0,0 +1,28 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/gke_hub/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-gke_hub-v1" + gem.version = Google::Cloud::GkeHub::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "The GKE Hub API centrally manages features and services on all your Kubernetes clusters running in a variety of environments, including Google cloud, on premises in customer datacenters, or other third party clouds. Note that google-cloud-gke_hub-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-gke_hub instead. See the readme for more details." + gem.summary = "API Client library for the GKE Hub V1 API" + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.1" + + gem.add_dependency "gapic-common", "~> 1.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" +end diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/lib/google-cloud-gke_hub-v1.rb b/owl-bot-staging/google-cloud-gke_hub-v1/lib/google-cloud-gke_hub-v1.rb new file mode 100644 index 000000000000..137bbe89022c --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/lib/google-cloud-gke_hub-v1.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# This gem does not autoload during Bundler.require. To load this gem, +# issue explicit require statements for the packages desired, e.g.: +# require "google/cloud/gke_hub/v1" diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1.rb b/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1.rb new file mode 100644 index 000000000000..a34b927b5f54 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1.rb @@ -0,0 +1,45 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/gke_hub/v1/gke_hub" +require "google/cloud/gke_hub/v1/version" + +module Google + module Cloud + module GkeHub + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/gke_hub/v1" + # client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/gke_hub/v1" + # client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new + # + module V1 + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/gke_hub/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub.rb b/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub.rb new file mode 100644 index 000000000000..68bb0eaf832b --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub.rb @@ -0,0 +1,72 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/gke_hub/v1/version" + +require "google/cloud/gke_hub/v1/gke_hub/credentials" +require "google/cloud/gke_hub/v1/gke_hub/paths" +require "google/cloud/gke_hub/v1/gke_hub/operations" +require "google/cloud/gke_hub/v1/gke_hub/client" +require "google/cloud/gke_hub/v1/gke_hub/rest" + +module Google + module Cloud + module GkeHub + module V1 + ## + # The GKE Hub service handles the registration of many Kubernetes clusters to + # Google Cloud, and the management of multi-cluster features over those + # clusters. + # + # The GKE Hub service operates on the following resources: + # + # * {::Google::Cloud::GkeHub::V1::Membership Membership} + # * {::Google::Cloud::GkeHub::V1::Feature Feature} + # + # GKE Hub is currently available in the global region and all regions in + # https://cloud.google.com/compute/docs/regions-zones. Feature is only + # available in global region while membership is global region and all the + # regions. + # + # **Membership management may be non-trivial:** it is recommended to use one + # of the Google-provided client libraries or tools where possible when working + # with Membership resources. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/gke_hub/v1/gke_hub" + # client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/gke_hub/v1/gke_hub/rest" + # client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new + # + module GkeHub + end + end + end + end +end + +helper_path = ::File.join __dir__, "gke_hub", "helpers.rb" +require "google/cloud/gke_hub/v1/gke_hub/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub/client.rb b/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub/client.rb new file mode 100644 index 000000000000..7c1183e4d389 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub/client.rb @@ -0,0 +1,5173 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/gkehub/v1/service_pb" + +module Google + module Cloud + module GkeHub + module V1 + module GkeHub + ## + # Client for the GkeHub service. + # + # The GKE Hub service handles the registration of many Kubernetes clusters to + # Google Cloud, and the management of multi-cluster features over those + # clusters. + # + # The GKE Hub service operates on the following resources: + # + # * {::Google::Cloud::GkeHub::V1::Membership Membership} + # * {::Google::Cloud::GkeHub::V1::Feature Feature} + # + # GKE Hub is currently available in the global region and all regions in + # https://cloud.google.com/compute/docs/regions-zones. Feature is only + # available in global region while membership is global region and all the + # regions. + # + # **Membership management may be non-trivial:** it is recommended to use one + # of the Google-provided client libraries or tools where possible when working + # with Membership resources. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "gkehub.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :gke_hub_stub + + ## + # Configure the GkeHub Client class. + # + # See {::Google::Cloud::GkeHub::V1::GkeHub::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all GkeHub clients + # ::Google::Cloud::GkeHub::V1::GkeHub::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", "GkeHub", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the GkeHub 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::GkeHub::V1::GkeHub::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 + @gke_hub_stub.universe_domain + end + + ## + # Create a new GkeHub client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the GkeHub 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/gkehub/v1/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 + + @operations_client = Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @gke_hub_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::GkeHub::V1::GkeHub::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 + ) + + @gke_hub_stub.stub_logger&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::GkeHub::V1::GkeHub::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @gke_hub_stub.logger + end + + # Service calls + + ## + # Lists Memberships in a given project and location. + # + # @overload list_memberships(request, options = nil) + # Pass arguments to `list_memberships` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::ListMembershipsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::ListMembershipsRequest, ::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_memberships(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_memberships` 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 (project and location) where the Memberships will be + # listed. Specified in the format `projects/*/locations/*`. + # `projects/*/locations/-` list memberships in all the regions. + # @param page_size [::Integer] + # Optional. When requesting a 'page' of resources, `page_size` specifies + # number of resources to return. If unspecified or set to 0, all resources + # will be returned. + # @param page_token [::String] + # Optional. Token returned by previous call to `ListMemberships` which + # specifies the position in the list from where to continue listing the + # resources. + # @param filter [::String] + # Optional. Lists Memberships that match the filter expression, following the + # syntax outlined in https://google.aip.dev/160. + # + # Examples: + # + # - Name is `bar` in project `foo-proj` and location `global`: + # + # name = "projects/foo-proj/locations/global/membership/bar" + # + # - Memberships that have a label called `foo`: + # + # labels.foo:* + # + # - Memberships that have a label called `foo` whose value is `bar`: + # + # labels.foo = bar + # + # - Memberships in the CREATING state: + # + # state = CREATING + # @param order_by [::String] + # Optional. One or more fields to compare and use to sort the output. + # See https://google.aip.dev/132#ordering. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GkeHub::V1::Membership>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::GkeHub::V1::Membership>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::ListMembershipsRequest.new + # + # # Call the list_memberships method. + # result = client.list_memberships 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::GkeHub::V1::Membership. + # p item + # end + # + def list_memberships request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::ListMembershipsRequest + + # 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_memberships.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::GkeHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_memberships.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_memberships.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.call_rpc :list_memberships, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @gke_hub_stub, :list_memberships, 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 + + ## + # Lists Memberships bound to a Scope. The response includes relevant + # Memberships from all regions. + # + # @overload list_bound_memberships(request, options = nil) + # Pass arguments to `list_bound_memberships` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::ListBoundMembershipsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::ListBoundMembershipsRequest, ::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_bound_memberships(scope_name: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_bound_memberships` 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 scope_name [::String] + # Required. Name of the Scope, in the format + # `projects/*/locations/global/scopes/*`, to which the Memberships are bound. + # @param filter [::String] + # Optional. Lists Memberships that match the filter expression, following the + # syntax outlined in https://google.aip.dev/160. Currently, filtering + # can be done only based on Memberships's `name`, `labels`, `create_time`, + # `update_time`, and `unique_id`. + # @param page_size [::Integer] + # Optional. When requesting a 'page' of resources, `page_size` specifies + # number of resources to return. If unspecified or set to 0, all resources + # will be returned. Pagination is currently not supported; therefore, setting + # this field does not have any impact for now. + # @param page_token [::String] + # Optional. Token returned by previous call to `ListBoundMemberships` which + # specifies the position in the list from where to continue listing the + # resources. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GkeHub::V1::Membership>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::GkeHub::V1::Membership>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::ListBoundMembershipsRequest.new + # + # # Call the list_bound_memberships method. + # result = client.list_bound_memberships 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::GkeHub::V1::Membership. + # p item + # end + # + def list_bound_memberships request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::ListBoundMembershipsRequest + + # 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_bound_memberships.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::GkeHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.scope_name + header_params["scope_name"] = request.scope_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.list_bound_memberships.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_bound_memberships.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.call_rpc :list_bound_memberships, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @gke_hub_stub, :list_bound_memberships, 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 + + ## + # Lists Features in a given project and location. + # + # @overload list_features(request, options = nil) + # Pass arguments to `list_features` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::ListFeaturesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::ListFeaturesRequest, ::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_features(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, return_partial_success: nil) + # Pass arguments to `list_features` 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 (project and location) where the Features will be + # listed. Specified in the format `projects/*/locations/*`. + # @param page_size [::Integer] + # When requesting a 'page' of resources, `page_size` specifies number of + # resources to return. If unspecified or set to 0, all resources will + # be returned. + # @param page_token [::String] + # Token returned by previous call to `ListFeatures` which + # specifies the position in the list from where to continue listing the + # resources. + # @param filter [::String] + # Lists Features that match the filter expression, following the syntax + # outlined in https://google.aip.dev/160. + # + # Examples: + # + # - Feature with the name "servicemesh" in project "foo-proj": + # + # name = "projects/foo-proj/locations/global/features/servicemesh" + # + # - Features that have a label called `foo`: + # + # labels.foo:* + # + # - Features that have a label called `foo` whose value is `bar`: + # + # labels.foo = bar + # @param order_by [::String] + # One or more fields to compare and use to sort the output. + # See https://google.aip.dev/132#ordering. + # @param return_partial_success [::Boolean] + # Optional. If set to true, the response will return partial results when + # some regions are unreachable and the unreachable field in Feature proto + # will be populated. If set to false, the request will fail when some regions + # are unreachable. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GkeHub::V1::Feature>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::GkeHub::V1::Feature>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::ListFeaturesRequest.new + # + # # Call the list_features method. + # result = client.list_features 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::GkeHub::V1::Feature. + # p item + # end + # + def list_features request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::ListFeaturesRequest + + # 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_features.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::GkeHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_features.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_features.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.call_rpc :list_features, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @gke_hub_stub, :list_features, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the details of a Membership. + # + # @overload get_membership(request, options = nil) + # Pass arguments to `get_membership` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::GetMembershipRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::GetMembershipRequest, ::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_membership(name: nil) + # Pass arguments to `get_membership` 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 Membership resource name in the format + # `projects/*/locations/*/memberships/*`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::GkeHub::V1::Membership] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::GkeHub::V1::Membership] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::GetMembershipRequest.new + # + # # Call the get_membership method. + # result = client.get_membership request + # + # # The returned object is of type Google::Cloud::GkeHub::V1::Membership. + # p result + # + def get_membership request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::GetMembershipRequest + + # 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_membership.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::GkeHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_membership.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_membership.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.call_rpc :get_membership, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single Feature. + # + # @overload get_feature(request, options = nil) + # Pass arguments to `get_feature` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::GetFeatureRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::GetFeatureRequest, ::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_feature(name: nil, return_partial_success: nil) + # Pass arguments to `get_feature` 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 Feature resource name in the format + # `projects/*/locations/*/features/*` + # @param return_partial_success [::Boolean] + # Optional. If set to true, the response will return partial results when + # some regions are unreachable and the unreachable field in Feature proto + # will be populated. If set to false, the request will fail when some regions + # are unreachable. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::GkeHub::V1::Feature] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::GkeHub::V1::Feature] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::GetFeatureRequest.new + # + # # Call the get_feature method. + # result = client.get_feature request + # + # # The returned object is of type Google::Cloud::GkeHub::V1::Feature. + # p result + # + def get_feature request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::GetFeatureRequest + + # 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_feature.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::GkeHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_feature.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_feature.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.call_rpc :get_feature, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a new Membership. + # + # **This is currently only supported for GKE clusters on Google Cloud**. + # To register other clusters, follow the instructions at + # https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster. + # + # @overload create_membership(request, options = nil) + # Pass arguments to `create_membership` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::CreateMembershipRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::CreateMembershipRequest, ::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_membership(parent: nil, membership_id: nil, resource: nil, request_id: nil) + # Pass arguments to `create_membership` 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 (project and location) where the Memberships will be + # created. Specified in the format `projects/*/locations/*`. + # @param membership_id [::String] + # Required. Client chosen ID for the membership. `membership_id` must be a + # valid RFC 1123 compliant DNS label: + # + # 1. At most 63 characters in length + # 2. It must consist of lower case alphanumeric characters or `-` + # 3. It must start and end with an alphanumeric character + # + # Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, + # with a maximum length of 63 characters. + # @param resource [::Google::Cloud::GkeHub::V1::Membership, ::Hash] + # Required. The membership to create. + # @param request_id [::String] + # Optional. A request ID to identify requests. Specify a unique request ID + # so that if you must retry your request, the server will know to ignore + # the request if it has already been completed. The server will guarantee + # that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::CreateMembershipRequest.new + # + # # Call the create_membership method. + # result = client.create_membership request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_membership request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::CreateMembershipRequest + + # 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_membership.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::GkeHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_membership.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_membership.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.call_rpc :create_membership, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Adds a new Feature. + # + # @overload create_feature(request, options = nil) + # Pass arguments to `create_feature` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::CreateFeatureRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::CreateFeatureRequest, ::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_feature(parent: nil, feature_id: nil, resource: nil, request_id: nil) + # Pass arguments to `create_feature` 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 (project and location) where the Feature will be + # created. Specified in the format `projects/*/locations/*`. + # @param feature_id [::String] + # The ID of the feature to create. + # @param resource [::Google::Cloud::GkeHub::V1::Feature, ::Hash] + # The Feature resource to create. + # @param request_id [::String] + # A request ID to identify requests. Specify a unique request ID + # so that if you must retry your request, the server will know to ignore + # the request if it has already been completed. The server will guarantee + # that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::CreateFeatureRequest.new + # + # # Call the create_feature method. + # result = client.create_feature request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_feature request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::CreateFeatureRequest + + # 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_feature.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::GkeHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_feature.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_feature.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.call_rpc :create_feature, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Removes a Membership. + # + # **This is currently only supported for GKE clusters on Google Cloud**. + # To unregister other clusters, follow the instructions at + # https://cloud.google.com/anthos/multicluster-management/connect/unregistering-a-cluster. + # + # @overload delete_membership(request, options = nil) + # Pass arguments to `delete_membership` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::DeleteMembershipRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::DeleteMembershipRequest, ::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_membership(name: nil, request_id: nil, force: nil) + # Pass arguments to `delete_membership` 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 Membership resource name in the format + # `projects/*/locations/*/memberships/*`. + # @param request_id [::String] + # Optional. A request ID to identify requests. Specify a unique request ID + # so that if you must retry your request, the server will know to ignore + # the request if it has already been completed. The server will guarantee + # that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @param force [::Boolean] + # Optional. If set to true, any subresource from this Membership will also be + # deleted. Otherwise, the request will only work if the Membership has no + # subresource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::DeleteMembershipRequest.new + # + # # Call the delete_membership method. + # result = client.delete_membership request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_membership request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::DeleteMembershipRequest + + # 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_membership.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::GkeHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_membership.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_membership.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.call_rpc :delete_membership, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Removes a Feature. + # + # @overload delete_feature(request, options = nil) + # Pass arguments to `delete_feature` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::DeleteFeatureRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::DeleteFeatureRequest, ::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_feature(name: nil, force: nil, request_id: nil) + # Pass arguments to `delete_feature` 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 Feature resource name in the format + # `projects/*/locations/*/features/*`. + # @param force [::Boolean] + # If set to true, the delete will ignore any outstanding resources for + # this Feature (that is, `FeatureState.has_resources` is set to true). These + # resources will NOT be cleaned up or modified in any way. + # @param request_id [::String] + # Optional. A request ID to identify requests. Specify a unique request ID + # so that if you must retry your request, the server will know to ignore + # the request if it has already been completed. The server will guarantee + # that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::DeleteFeatureRequest.new + # + # # Call the delete_feature method. + # result = client.delete_feature request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_feature request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::DeleteFeatureRequest + + # 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_feature.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::GkeHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_feature.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_feature.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.call_rpc :delete_feature, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an existing Membership. + # + # @overload update_membership(request, options = nil) + # Pass arguments to `update_membership` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::UpdateMembershipRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::UpdateMembershipRequest, ::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_membership(name: nil, update_mask: nil, resource: nil, request_id: nil) + # Pass arguments to `update_membership` 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 Membership resource name in the format + # `projects/*/locations/*/memberships/*`. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask of fields to update. + # @param resource [::Google::Cloud::GkeHub::V1::Membership, ::Hash] + # Required. Only fields specified in update_mask are updated. + # If you specify a field in the update_mask but don't specify its value here + # that field will be deleted. + # If you are updating a map field, set the value of a key to null or empty + # string to delete the key from the map. It's not possible to update a key's + # value to the empty string. + # If you specify the update_mask to be a special path "*", fully replaces all + # user-modifiable fields to match `resource`. + # @param request_id [::String] + # Optional. A request ID to identify requests. Specify a unique request ID + # so that if you must retry your request, the server will know to ignore + # the request if it has already been completed. The server will guarantee + # that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::UpdateMembershipRequest.new + # + # # Call the update_membership method. + # result = client.update_membership request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_membership request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::UpdateMembershipRequest + + # 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_membership.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::GkeHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_membership.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_membership.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.call_rpc :update_membership, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an existing Feature. + # + # @overload update_feature(request, options = nil) + # Pass arguments to `update_feature` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::UpdateFeatureRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::UpdateFeatureRequest, ::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_feature(name: nil, update_mask: nil, resource: nil, request_id: nil) + # Pass arguments to `update_feature` 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 Feature resource name in the format + # `projects/*/locations/*/features/*`. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Mask of fields to update. + # @param resource [::Google::Cloud::GkeHub::V1::Feature, ::Hash] + # Only fields specified in update_mask are updated. + # If you specify a field in the update_mask but don't specify its value here + # that field will be deleted. + # If you are updating a map field, set the value of a key to null or empty + # string to delete the key from the map. It's not possible to update a key's + # value to the empty string. + # If you specify the update_mask to be a special path "*", fully replaces all + # user-modifiable fields to match `resource`. + # @param request_id [::String] + # A request ID to identify requests. Specify a unique request ID + # so that if you must retry your request, the server will know to ignore + # the request if it has already been completed. The server will guarantee + # that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::UpdateFeatureRequest.new + # + # # Call the update_feature method. + # result = client.update_feature request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_feature request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::UpdateFeatureRequest + + # 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_feature.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::GkeHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_feature.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_feature.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.call_rpc :update_feature, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Generates the manifest for deployment of the GKE connect agent. + # + # **This method is used internally by Google-provided libraries.** + # Most clients should not need to call this method directly. + # + # @overload generate_connect_manifest(request, options = nil) + # Pass arguments to `generate_connect_manifest` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::GenerateConnectManifestRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::GenerateConnectManifestRequest, ::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 generate_connect_manifest(name: nil, namespace: nil, proxy: nil, version: nil, is_upgrade: nil, registry: nil, image_pull_secret_content: nil) + # Pass arguments to `generate_connect_manifest` 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 Membership resource name the Agent will associate with, in + # the format `projects/*/locations/*/memberships/*`. + # @param namespace [::String] + # Optional. Namespace for GKE Connect agent resources. Defaults to + # `gke-connect`. + # + # The Connect Agent is authorized automatically when run in the default + # namespace. Otherwise, explicit authorization must be granted with an + # additional IAM binding. + # @param proxy [::String] + # Optional. URI of a proxy if connectivity from the agent to + # gkeconnect.googleapis.com requires the use of a proxy. Format must be in + # the form `http(s)://{proxy_address}`, depending on the HTTP/HTTPS protocol + # supported by the proxy. This will direct the connect agent's outbound + # traffic through a HTTP(S) proxy. + # @param version [::String] + # Optional. The Connect agent version to use. Defaults to the most current + # version. + # @param is_upgrade [::Boolean] + # Optional. If true, generate the resources for upgrade only. Some resources + # generated only for installation (e.g. secrets) will be excluded. + # @param registry [::String] + # Optional. The registry to fetch the connect agent image from. Defaults to + # gcr.io/gkeconnect. + # @param image_pull_secret_content [::String] + # Optional. The image pull secret content for the registry, if not public. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::GkeHub::V1::GenerateConnectManifestResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::GkeHub::V1::GenerateConnectManifestResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::GenerateConnectManifestRequest.new + # + # # Call the generate_connect_manifest method. + # result = client.generate_connect_manifest request + # + # # The returned object is of type Google::Cloud::GkeHub::V1::GenerateConnectManifestResponse. + # p result + # + def generate_connect_manifest request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::GenerateConnectManifestRequest + + # 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.generate_connect_manifest.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::GkeHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.generate_connect_manifest.timeout, + metadata: metadata, + retry_policy: @config.rpcs.generate_connect_manifest.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.call_rpc :generate_connect_manifest, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a fleet. + # + # @overload create_fleet(request, options = nil) + # Pass arguments to `create_fleet` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::CreateFleetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::CreateFleetRequest, ::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_fleet(parent: nil, fleet: nil) + # Pass arguments to `create_fleet` 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 (project and location) where the Fleet will be + # created. Specified in the format `projects/*/locations/*`. + # @param fleet [::Google::Cloud::GkeHub::V1::Fleet, ::Hash] + # Required. The fleet to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::CreateFleetRequest.new + # + # # Call the create_fleet method. + # result = client.create_fleet request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_fleet request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::CreateFleetRequest + + # 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_fleet.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::GkeHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_fleet.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_fleet.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.call_rpc :create_fleet, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns the details of a fleet. + # + # @overload get_fleet(request, options = nil) + # Pass arguments to `get_fleet` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::GetFleetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::GetFleetRequest, ::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_fleet(name: nil) + # Pass arguments to `get_fleet` 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 Fleet resource name in the format + # `projects/*/locations/*/fleets/*`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::GkeHub::V1::Fleet] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::GkeHub::V1::Fleet] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::GetFleetRequest.new + # + # # Call the get_fleet method. + # result = client.get_fleet request + # + # # The returned object is of type Google::Cloud::GkeHub::V1::Fleet. + # p result + # + def get_fleet request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::GetFleetRequest + + # 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_fleet.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::GkeHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_fleet.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_fleet.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.call_rpc :get_fleet, 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 a fleet. + # + # @overload update_fleet(request, options = nil) + # Pass arguments to `update_fleet` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::UpdateFleetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::UpdateFleetRequest, ::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_fleet(fleet: nil, update_mask: nil) + # Pass arguments to `update_fleet` 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 fleet [::Google::Cloud::GkeHub::V1::Fleet, ::Hash] + # Required. The Fleet to update. + # + # The `name` field of the Fleet object identifies which fleet will be + # updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The fields to be updated; + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::UpdateFleetRequest.new + # + # # Call the update_fleet method. + # result = client.update_fleet request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_fleet request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::UpdateFleetRequest + + # 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_fleet.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::GkeHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.fleet&.name + header_params["fleet.name"] = request.fleet.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_fleet.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_fleet.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.call_rpc :update_fleet, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Removes a Fleet. There must be no memberships remaining in the Fleet. + # + # @overload delete_fleet(request, options = nil) + # Pass arguments to `delete_fleet` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::DeleteFleetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::DeleteFleetRequest, ::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_fleet(name: nil) + # Pass arguments to `delete_fleet` 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 Fleet resource name in the format + # `projects/*/locations/*/fleets/*`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::DeleteFleetRequest.new + # + # # Call the delete_fleet method. + # result = client.delete_fleet request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_fleet request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::DeleteFleetRequest + + # 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_fleet.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::GkeHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_fleet.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_fleet.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.call_rpc :delete_fleet, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns all fleets within an organization or a project that the caller has + # access to. + # + # @overload list_fleets(request, options = nil) + # Pass arguments to `list_fleets` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::ListFleetsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::ListFleetsRequest, ::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_fleets(parent: nil, page_token: nil, page_size: nil) + # Pass arguments to `list_fleets` 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 organization or project to list for Fleets under, in the + # format `organizations/*/locations/*` or `projects/*/locations/*`. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListFleets` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListFleets` must match + # the call that provided the page token. + # @param page_size [::Integer] + # Optional. The maximum number of fleets to return. The service may return + # fewer than this value. If unspecified, at most 200 fleets will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GkeHub::V1::Fleet>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::GkeHub::V1::Fleet>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::ListFleetsRequest.new + # + # # Call the list_fleets method. + # result = client.list_fleets 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::GkeHub::V1::Fleet. + # p item + # end + # + def list_fleets request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::ListFleetsRequest + + # 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_fleets.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::GkeHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_fleets.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_fleets.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.call_rpc :list_fleets, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @gke_hub_stub, :list_fleets, 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 + + ## + # Returns the details of a fleet namespace. + # + # @overload get_scope_namespace(request, options = nil) + # Pass arguments to `get_scope_namespace` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::GetScopeNamespaceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::GetScopeNamespaceRequest, ::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_scope_namespace(name: nil) + # Pass arguments to `get_scope_namespace` 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 Namespace resource name in the format + # `projects/*/locations/*/scopes/*/namespaces/*`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::GkeHub::V1::Namespace] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::GkeHub::V1::Namespace] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::GetScopeNamespaceRequest.new + # + # # Call the get_scope_namespace method. + # result = client.get_scope_namespace request + # + # # The returned object is of type Google::Cloud::GkeHub::V1::Namespace. + # p result + # + def get_scope_namespace request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::GetScopeNamespaceRequest + + # 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_scope_namespace.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::GkeHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_scope_namespace.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_scope_namespace.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.call_rpc :get_scope_namespace, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a fleet namespace. + # + # @overload create_scope_namespace(request, options = nil) + # Pass arguments to `create_scope_namespace` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::CreateScopeNamespaceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::CreateScopeNamespaceRequest, ::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_scope_namespace(parent: nil, scope_namespace_id: nil, scope_namespace: nil) + # Pass arguments to `create_scope_namespace` 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 (project and location) where the Namespace will be + # created. Specified in the format `projects/*/locations/*/scopes/*`. + # @param scope_namespace_id [::String] + # Required. Client chosen ID for the Namespace. `namespace_id` must be a + # valid RFC 1123 compliant DNS label: + # + # 1. At most 63 characters in length + # 2. It must consist of lower case alphanumeric characters or `-` + # 3. It must start and end with an alphanumeric character + # + # Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, + # with a maximum length of 63 characters. + # @param scope_namespace [::Google::Cloud::GkeHub::V1::Namespace, ::Hash] + # Required. The fleet namespace to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::CreateScopeNamespaceRequest.new + # + # # Call the create_scope_namespace method. + # result = client.create_scope_namespace request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_scope_namespace request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::CreateScopeNamespaceRequest + + # 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_scope_namespace.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::GkeHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_scope_namespace.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_scope_namespace.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.call_rpc :create_scope_namespace, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a fleet namespace. + # + # @overload update_scope_namespace(request, options = nil) + # Pass arguments to `update_scope_namespace` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::UpdateScopeNamespaceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::UpdateScopeNamespaceRequest, ::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_scope_namespace(scope_namespace: nil, update_mask: nil) + # Pass arguments to `update_scope_namespace` 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 scope_namespace [::Google::Cloud::GkeHub::V1::Namespace, ::Hash] + # Required. A namespace with fields updated. The 'name' field in this + # namespace is used to identify the resource to update. Given 'updated' + # prefix to follow go/proto-best-practices-checkers#keyword_conflict + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The fields to be updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::UpdateScopeNamespaceRequest.new + # + # # Call the update_scope_namespace method. + # result = client.update_scope_namespace request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_scope_namespace request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::UpdateScopeNamespaceRequest + + # 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_scope_namespace.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::GkeHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.scope_namespace&.name + header_params["scope_namespace.name"] = request.scope_namespace.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_scope_namespace.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_scope_namespace.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.call_rpc :update_scope_namespace, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a fleet namespace. + # + # @overload delete_scope_namespace(request, options = nil) + # Pass arguments to `delete_scope_namespace` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::DeleteScopeNamespaceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::DeleteScopeNamespaceRequest, ::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_scope_namespace(name: nil) + # Pass arguments to `delete_scope_namespace` 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 Namespace resource name in the format + # `projects/*/locations/*/scopes/*/namespaces/*`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::DeleteScopeNamespaceRequest.new + # + # # Call the delete_scope_namespace method. + # result = client.delete_scope_namespace request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_scope_namespace request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::DeleteScopeNamespaceRequest + + # 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_scope_namespace.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::GkeHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_scope_namespace.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_scope_namespace.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.call_rpc :delete_scope_namespace, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists fleet namespaces. + # + # @overload list_scope_namespaces(request, options = nil) + # Pass arguments to `list_scope_namespaces` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::ListScopeNamespacesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::ListScopeNamespacesRequest, ::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_scope_namespaces(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_scope_namespaces` 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 (project and location) where the Features will be + # listed. Specified in the format `projects/*/locations/*/scopes/*`. + # @param page_size [::Integer] + # Optional. When requesting a 'page' of resources, `page_size` specifies + # number of resources to return. If unspecified or set to 0, all resources + # will be returned. + # @param page_token [::String] + # Optional. Token returned by previous call to `ListFeatures` which + # specifies the position in the list from where to continue listing the + # resources. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GkeHub::V1::Namespace>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::GkeHub::V1::Namespace>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::ListScopeNamespacesRequest.new + # + # # Call the list_scope_namespaces method. + # result = client.list_scope_namespaces 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::GkeHub::V1::Namespace. + # p item + # end + # + def list_scope_namespaces request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::ListScopeNamespacesRequest + + # 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_scope_namespaces.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::GkeHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_scope_namespaces.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_scope_namespaces.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.call_rpc :list_scope_namespaces, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @gke_hub_stub, :list_scope_namespaces, 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 + + ## + # Returns the details of a Scope RBACRoleBinding. + # + # @overload get_scope_rbac_role_binding(request, options = nil) + # Pass arguments to `get_scope_rbac_role_binding` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::GetScopeRBACRoleBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::GetScopeRBACRoleBindingRequest, ::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_scope_rbac_role_binding(name: nil) + # Pass arguments to `get_scope_rbac_role_binding` 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 RBACRoleBinding resource name in the format + # `projects/*/locations/*/scopes/*/rbacrolebindings/*`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::GkeHub::V1::RBACRoleBinding] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::GkeHub::V1::RBACRoleBinding] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::GetScopeRBACRoleBindingRequest.new + # + # # Call the get_scope_rbac_role_binding method. + # result = client.get_scope_rbac_role_binding request + # + # # The returned object is of type Google::Cloud::GkeHub::V1::RBACRoleBinding. + # p result + # + def get_scope_rbac_role_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::GetScopeRBACRoleBindingRequest + + # 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_scope_rbac_role_binding.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::GkeHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_scope_rbac_role_binding.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_scope_rbac_role_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.call_rpc :get_scope_rbac_role_binding, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a Scope RBACRoleBinding. + # + # @overload create_scope_rbac_role_binding(request, options = nil) + # Pass arguments to `create_scope_rbac_role_binding` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::CreateScopeRBACRoleBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::CreateScopeRBACRoleBindingRequest, ::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_scope_rbac_role_binding(parent: nil, rbacrolebinding_id: nil, rbacrolebinding: nil) + # Pass arguments to `create_scope_rbac_role_binding` 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 (project and location) where the RBACRoleBinding will + # be created. Specified in the format `projects/*/locations/*/scopes/*`. + # @param rbacrolebinding_id [::String] + # Required. Client chosen ID for the RBACRoleBinding. `rbacrolebinding_id` + # must be a valid RFC 1123 compliant DNS label: + # + # 1. At most 63 characters in length + # 2. It must consist of lower case alphanumeric characters or `-` + # 3. It must start and end with an alphanumeric character + # + # Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, + # with a maximum length of 63 characters. + # @param rbacrolebinding [::Google::Cloud::GkeHub::V1::RBACRoleBinding, ::Hash] + # Required. The rbacrolebindings to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::CreateScopeRBACRoleBindingRequest.new + # + # # Call the create_scope_rbac_role_binding method. + # result = client.create_scope_rbac_role_binding request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_scope_rbac_role_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::CreateScopeRBACRoleBindingRequest + + # 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_scope_rbac_role_binding.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::GkeHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_scope_rbac_role_binding.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_scope_rbac_role_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.call_rpc :create_scope_rbac_role_binding, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a Scope RBACRoleBinding. + # + # @overload update_scope_rbac_role_binding(request, options = nil) + # Pass arguments to `update_scope_rbac_role_binding` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::UpdateScopeRBACRoleBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::UpdateScopeRBACRoleBindingRequest, ::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_scope_rbac_role_binding(rbacrolebinding: nil, update_mask: nil) + # Pass arguments to `update_scope_rbac_role_binding` 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 rbacrolebinding [::Google::Cloud::GkeHub::V1::RBACRoleBinding, ::Hash] + # Required. A rbacrolebinding with fields updated. The 'name' field in this + # rbacrolebinding is used to identify the resource to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The fields to be updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::UpdateScopeRBACRoleBindingRequest.new + # + # # Call the update_scope_rbac_role_binding method. + # result = client.update_scope_rbac_role_binding request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_scope_rbac_role_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::UpdateScopeRBACRoleBindingRequest + + # 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_scope_rbac_role_binding.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::GkeHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.rbacrolebinding&.name + header_params["rbacrolebinding.name"] = request.rbacrolebinding.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_scope_rbac_role_binding.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_scope_rbac_role_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.call_rpc :update_scope_rbac_role_binding, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a Scope RBACRoleBinding. + # + # @overload delete_scope_rbac_role_binding(request, options = nil) + # Pass arguments to `delete_scope_rbac_role_binding` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::DeleteScopeRBACRoleBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::DeleteScopeRBACRoleBindingRequest, ::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_scope_rbac_role_binding(name: nil) + # Pass arguments to `delete_scope_rbac_role_binding` 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 RBACRoleBinding resource name in the format + # `projects/*/locations/*/scopes/*/rbacrolebindings/*`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::DeleteScopeRBACRoleBindingRequest.new + # + # # Call the delete_scope_rbac_role_binding method. + # result = client.delete_scope_rbac_role_binding request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_scope_rbac_role_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::DeleteScopeRBACRoleBindingRequest + + # 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_scope_rbac_role_binding.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::GkeHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_scope_rbac_role_binding.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_scope_rbac_role_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.call_rpc :delete_scope_rbac_role_binding, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all Scope RBACRoleBindings. + # + # @overload list_scope_rbac_role_bindings(request, options = nil) + # Pass arguments to `list_scope_rbac_role_bindings` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::ListScopeRBACRoleBindingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::ListScopeRBACRoleBindingsRequest, ::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_scope_rbac_role_bindings(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_scope_rbac_role_bindings` 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 (project and location) where the Features will be + # listed. Specified in the format `projects/*/locations/*/scopes/*`. + # @param page_size [::Integer] + # Optional. When requesting a 'page' of resources, `page_size` specifies + # number of resources to return. If unspecified or set to 0, all resources + # will be returned. + # @param page_token [::String] + # Optional. Token returned by previous call to `ListScopeRBACRoleBindings` + # which specifies the position in the list from where to continue listing the + # resources. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GkeHub::V1::RBACRoleBinding>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::GkeHub::V1::RBACRoleBinding>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::ListScopeRBACRoleBindingsRequest.new + # + # # Call the list_scope_rbac_role_bindings method. + # result = client.list_scope_rbac_role_bindings 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::GkeHub::V1::RBACRoleBinding. + # p item + # end + # + def list_scope_rbac_role_bindings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::ListScopeRBACRoleBindingsRequest + + # 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_scope_rbac_role_bindings.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::GkeHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_scope_rbac_role_bindings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_scope_rbac_role_bindings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.call_rpc :list_scope_rbac_role_bindings, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @gke_hub_stub, :list_scope_rbac_role_bindings, 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 + + ## + # Returns the details of a Scope. + # + # @overload get_scope(request, options = nil) + # Pass arguments to `get_scope` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::GetScopeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::GetScopeRequest, ::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_scope(name: nil) + # Pass arguments to `get_scope` 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 Scope resource name in the format + # `projects/*/locations/*/scopes/*`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::GkeHub::V1::Scope] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::GkeHub::V1::Scope] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::GetScopeRequest.new + # + # # Call the get_scope method. + # result = client.get_scope request + # + # # The returned object is of type Google::Cloud::GkeHub::V1::Scope. + # p result + # + def get_scope request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::GetScopeRequest + + # 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_scope.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::GkeHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_scope.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_scope.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.call_rpc :get_scope, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a Scope. + # + # @overload create_scope(request, options = nil) + # Pass arguments to `create_scope` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::CreateScopeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::CreateScopeRequest, ::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_scope(parent: nil, scope_id: nil, scope: nil) + # Pass arguments to `create_scope` 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 (project and location) where the Scope will be + # created. Specified in the format `projects/*/locations/*`. + # @param scope_id [::String] + # Required. Client chosen ID for the Scope. `scope_id` must be a + # ???? + # @param scope [::Google::Cloud::GkeHub::V1::Scope, ::Hash] + # Required. The Scope to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::CreateScopeRequest.new + # + # # Call the create_scope method. + # result = client.create_scope request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_scope request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::CreateScopeRequest + + # 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_scope.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::GkeHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_scope.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_scope.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.call_rpc :create_scope, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a scopes. + # + # @overload update_scope(request, options = nil) + # Pass arguments to `update_scope` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::UpdateScopeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::UpdateScopeRequest, ::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_scope(scope: nil, update_mask: nil) + # Pass arguments to `update_scope` 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 scope [::Google::Cloud::GkeHub::V1::Scope, ::Hash] + # Required. A Scope with fields updated. The 'name' field in this + # namespace is used to identify the resource to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The fields to be updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::UpdateScopeRequest.new + # + # # Call the update_scope method. + # result = client.update_scope request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_scope request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::UpdateScopeRequest + + # 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_scope.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::GkeHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.scope&.name + header_params["scope.name"] = request.scope.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_scope.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_scope.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.call_rpc :update_scope, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a Scope. + # + # @overload delete_scope(request, options = nil) + # Pass arguments to `delete_scope` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::DeleteScopeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::DeleteScopeRequest, ::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_scope(name: nil) + # Pass arguments to `delete_scope` 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 Scope resource name in the format + # `projects/*/locations/*/scopes/*`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::DeleteScopeRequest.new + # + # # Call the delete_scope method. + # result = client.delete_scope request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_scope request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::DeleteScopeRequest + + # 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_scope.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::GkeHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_scope.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_scope.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.call_rpc :delete_scope, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists Scopes. + # + # @overload list_scopes(request, options = nil) + # Pass arguments to `list_scopes` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::ListScopesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::ListScopesRequest, ::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_scopes(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_scopes` 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 (project and location) where the Scope will be listed. + # Specified in the format `projects/*/locations/*`. + # @param page_size [::Integer] + # Optional. When requesting a 'page' of resources, `page_size` specifies + # number of resources to return. If unspecified or set to 0, all resources + # will be returned. + # @param page_token [::String] + # Optional. Token returned by previous call to `ListScopes` which + # specifies the position in the list from where to continue listing the + # resources. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GkeHub::V1::Scope>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::GkeHub::V1::Scope>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::ListScopesRequest.new + # + # # Call the list_scopes method. + # result = client.list_scopes 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::GkeHub::V1::Scope. + # p item + # end + # + def list_scopes request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::ListScopesRequest + + # 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_scopes.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::GkeHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_scopes.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_scopes.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.call_rpc :list_scopes, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @gke_hub_stub, :list_scopes, 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 + + ## + # Lists permitted Scopes. + # + # @overload list_permitted_scopes(request, options = nil) + # Pass arguments to `list_permitted_scopes` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::ListPermittedScopesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::ListPermittedScopesRequest, ::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_permitted_scopes(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_permitted_scopes` 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 (project and location) where the Scope will be listed. + # Specified in the format `projects/*/locations/*`. + # @param page_size [::Integer] + # Optional. When requesting a 'page' of resources, `page_size` specifies + # number of resources to return. If unspecified or set to 0, all resources + # will be returned. + # @param page_token [::String] + # Optional. Token returned by previous call to `ListPermittedScopes` which + # specifies the position in the list from where to continue listing the + # resources. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GkeHub::V1::Scope>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::GkeHub::V1::Scope>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::ListPermittedScopesRequest.new + # + # # Call the list_permitted_scopes method. + # result = client.list_permitted_scopes 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::GkeHub::V1::Scope. + # p item + # end + # + def list_permitted_scopes request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::ListPermittedScopesRequest + + # 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_permitted_scopes.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::GkeHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_permitted_scopes.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_permitted_scopes.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.call_rpc :list_permitted_scopes, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @gke_hub_stub, :list_permitted_scopes, 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 + + ## + # Returns the details of a MembershipBinding. + # + # @overload get_membership_binding(request, options = nil) + # Pass arguments to `get_membership_binding` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::GetMembershipBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::GetMembershipBindingRequest, ::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_membership_binding(name: nil) + # Pass arguments to `get_membership_binding` 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 MembershipBinding resource name in the format + # `projects/*/locations/*/memberships/*/bindings/*`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::GkeHub::V1::MembershipBinding] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::GkeHub::V1::MembershipBinding] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::GetMembershipBindingRequest.new + # + # # Call the get_membership_binding method. + # result = client.get_membership_binding request + # + # # The returned object is of type Google::Cloud::GkeHub::V1::MembershipBinding. + # p result + # + def get_membership_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::GetMembershipBindingRequest + + # 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_membership_binding.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::GkeHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_membership_binding.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_membership_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.call_rpc :get_membership_binding, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a MembershipBinding. + # + # @overload create_membership_binding(request, options = nil) + # Pass arguments to `create_membership_binding` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::CreateMembershipBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::CreateMembershipBindingRequest, ::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_membership_binding(parent: nil, membership_binding: nil, membership_binding_id: nil) + # Pass arguments to `create_membership_binding` 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 (project and location) where the MembershipBinding + # will be created. Specified in the format + # `projects/*/locations/*/memberships/*`. + # @param membership_binding [::Google::Cloud::GkeHub::V1::MembershipBinding, ::Hash] + # Required. The MembershipBinding to create. + # @param membership_binding_id [::String] + # Required. The ID to use for the MembershipBinding. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::CreateMembershipBindingRequest.new + # + # # Call the create_membership_binding method. + # result = client.create_membership_binding request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_membership_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::CreateMembershipBindingRequest + + # 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_membership_binding.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::GkeHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_membership_binding.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_membership_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.call_rpc :create_membership_binding, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a MembershipBinding. + # + # @overload update_membership_binding(request, options = nil) + # Pass arguments to `update_membership_binding` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::UpdateMembershipBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::UpdateMembershipBindingRequest, ::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_membership_binding(membership_binding: nil, update_mask: nil) + # Pass arguments to `update_membership_binding` 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 membership_binding [::Google::Cloud::GkeHub::V1::MembershipBinding, ::Hash] + # Required. The MembershipBinding object with fields updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The fields to be updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::UpdateMembershipBindingRequest.new + # + # # Call the update_membership_binding method. + # result = client.update_membership_binding request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_membership_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::UpdateMembershipBindingRequest + + # 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_membership_binding.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::GkeHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.membership_binding&.name + header_params["membership_binding.name"] = request.membership_binding.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_membership_binding.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_membership_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.call_rpc :update_membership_binding, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a MembershipBinding. + # + # @overload delete_membership_binding(request, options = nil) + # Pass arguments to `delete_membership_binding` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::DeleteMembershipBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::DeleteMembershipBindingRequest, ::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_membership_binding(name: nil) + # Pass arguments to `delete_membership_binding` 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 MembershipBinding resource name in the format + # `projects/*/locations/*/memberships/*/bindings/*`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::DeleteMembershipBindingRequest.new + # + # # Call the delete_membership_binding method. + # result = client.delete_membership_binding request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_membership_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::DeleteMembershipBindingRequest + + # 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_membership_binding.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::GkeHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_membership_binding.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_membership_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.call_rpc :delete_membership_binding, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists MembershipBindings. + # + # @overload list_membership_bindings(request, options = nil) + # Pass arguments to `list_membership_bindings` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::ListMembershipBindingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::ListMembershipBindingsRequest, ::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_membership_bindings(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_membership_bindings` 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 Membership for which the MembershipBindings will be + # listed. Specified in the format `projects/*/locations/*/memberships/*`. + # @param page_size [::Integer] + # Optional. When requesting a 'page' of resources, `page_size` specifies + # number of resources to return. If unspecified or set to 0, all resources + # will be returned. + # @param page_token [::String] + # Optional. Token returned by previous call to `ListMembershipBindings` which + # specifies the position in the list from where to continue listing the + # resources. + # @param filter [::String] + # Optional. Lists MembershipBindings that match the filter expression, + # following the syntax outlined in https://google.aip.dev/160. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GkeHub::V1::MembershipBinding>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::GkeHub::V1::MembershipBinding>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::ListMembershipBindingsRequest.new + # + # # Call the list_membership_bindings method. + # result = client.list_membership_bindings 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::GkeHub::V1::MembershipBinding. + # p item + # end + # + def list_membership_bindings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::ListMembershipBindingsRequest + + # 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_membership_bindings.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::GkeHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_membership_bindings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_membership_bindings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.call_rpc :list_membership_bindings, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @gke_hub_stub, :list_membership_bindings, 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 + + ## + # Returns the details of a Membership RBACRoleBinding. + # + # @overload get_membership_rbac_role_binding(request, options = nil) + # Pass arguments to `get_membership_rbac_role_binding` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::GetMembershipRBACRoleBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::GetMembershipRBACRoleBindingRequest, ::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_membership_rbac_role_binding(name: nil) + # Pass arguments to `get_membership_rbac_role_binding` 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 RBACRoleBinding resource name in the format + # `projects/*/locations/*/memberships/*/rbacrolebindings/*`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::GkeHub::V1::RBACRoleBinding] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::GkeHub::V1::RBACRoleBinding] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::GetMembershipRBACRoleBindingRequest.new + # + # # Call the get_membership_rbac_role_binding method. + # result = client.get_membership_rbac_role_binding request + # + # # The returned object is of type Google::Cloud::GkeHub::V1::RBACRoleBinding. + # p result + # + def get_membership_rbac_role_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::GetMembershipRBACRoleBindingRequest + + # 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_membership_rbac_role_binding.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::GkeHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_membership_rbac_role_binding.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_membership_rbac_role_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.call_rpc :get_membership_rbac_role_binding, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a Membership RBACRoleBinding. + # + # @overload create_membership_rbac_role_binding(request, options = nil) + # Pass arguments to `create_membership_rbac_role_binding` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::CreateMembershipRBACRoleBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::CreateMembershipRBACRoleBindingRequest, ::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_membership_rbac_role_binding(parent: nil, rbacrolebinding_id: nil, rbacrolebinding: nil) + # Pass arguments to `create_membership_rbac_role_binding` 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 (project and location) where the RBACRoleBinding will + # be created. Specified in the format `projects/*/locations/*/memberships/*`. + # @param rbacrolebinding_id [::String] + # Required. Client chosen ID for the RBACRoleBinding. `rbacrolebinding_id` + # must be a valid RFC 1123 compliant DNS label: + # + # 1. At most 63 characters in length + # 2. It must consist of lower case alphanumeric characters or `-` + # 3. It must start and end with an alphanumeric character + # + # Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, + # with a maximum length of 63 characters. + # @param rbacrolebinding [::Google::Cloud::GkeHub::V1::RBACRoleBinding, ::Hash] + # Required. The rbacrolebindings to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::CreateMembershipRBACRoleBindingRequest.new + # + # # Call the create_membership_rbac_role_binding method. + # result = client.create_membership_rbac_role_binding request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_membership_rbac_role_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::CreateMembershipRBACRoleBindingRequest + + # 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_membership_rbac_role_binding.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::GkeHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_membership_rbac_role_binding.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_membership_rbac_role_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.call_rpc :create_membership_rbac_role_binding, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a Membership RBACRoleBinding. + # + # @overload update_membership_rbac_role_binding(request, options = nil) + # Pass arguments to `update_membership_rbac_role_binding` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::UpdateMembershipRBACRoleBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::UpdateMembershipRBACRoleBindingRequest, ::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_membership_rbac_role_binding(rbacrolebinding: nil, update_mask: nil) + # Pass arguments to `update_membership_rbac_role_binding` 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 rbacrolebinding [::Google::Cloud::GkeHub::V1::RBACRoleBinding, ::Hash] + # Required. A rbacrolebinding with fields updated. The 'name' field in this + # rbacrolebinding is used to identify the resource to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The fields to be updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::UpdateMembershipRBACRoleBindingRequest.new + # + # # Call the update_membership_rbac_role_binding method. + # result = client.update_membership_rbac_role_binding request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_membership_rbac_role_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::UpdateMembershipRBACRoleBindingRequest + + # 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_membership_rbac_role_binding.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::GkeHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.rbacrolebinding&.name + header_params["rbacrolebinding.name"] = request.rbacrolebinding.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_membership_rbac_role_binding.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_membership_rbac_role_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.call_rpc :update_membership_rbac_role_binding, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a Membership RBACRoleBinding. + # + # @overload delete_membership_rbac_role_binding(request, options = nil) + # Pass arguments to `delete_membership_rbac_role_binding` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::DeleteMembershipRBACRoleBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::DeleteMembershipRBACRoleBindingRequest, ::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_membership_rbac_role_binding(name: nil) + # Pass arguments to `delete_membership_rbac_role_binding` 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 RBACRoleBinding resource name in the format + # `projects/*/locations/*/memberships/*/rbacrolebindings/*`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::DeleteMembershipRBACRoleBindingRequest.new + # + # # Call the delete_membership_rbac_role_binding method. + # result = client.delete_membership_rbac_role_binding request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_membership_rbac_role_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::DeleteMembershipRBACRoleBindingRequest + + # 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_membership_rbac_role_binding.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::GkeHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_membership_rbac_role_binding.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_membership_rbac_role_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.call_rpc :delete_membership_rbac_role_binding, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all Membership RBACRoleBindings. + # + # @overload list_membership_rbac_role_bindings(request, options = nil) + # Pass arguments to `list_membership_rbac_role_bindings` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::ListMembershipRBACRoleBindingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::ListMembershipRBACRoleBindingsRequest, ::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_membership_rbac_role_bindings(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_membership_rbac_role_bindings` 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 (project and location) where the Features will be + # listed. Specified in the format `projects/*/locations/*/memberships/*`. + # @param page_size [::Integer] + # Optional. When requesting a 'page' of resources, `page_size` specifies + # number of resources to return. If unspecified or set to 0, all resources + # will be returned. + # @param page_token [::String] + # Optional. Token returned by previous call to + # `ListMembershipRBACRoleBindings` which specifies the position in the list + # from where to continue listing the resources. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GkeHub::V1::RBACRoleBinding>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::GkeHub::V1::RBACRoleBinding>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::ListMembershipRBACRoleBindingsRequest.new + # + # # Call the list_membership_rbac_role_bindings method. + # result = client.list_membership_rbac_role_bindings 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::GkeHub::V1::RBACRoleBinding. + # p item + # end + # + def list_membership_rbac_role_bindings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::ListMembershipRBACRoleBindingsRequest + + # 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_membership_rbac_role_bindings.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::GkeHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_membership_rbac_role_bindings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_membership_rbac_role_bindings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.call_rpc :list_membership_rbac_role_bindings, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @gke_hub_stub, :list_membership_rbac_role_bindings, 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 + + ## + # Generates a YAML of the RBAC policies for the specified + # RoleBinding and its associated impersonation resources. + # + # @overload generate_membership_rbac_role_binding_yaml(request, options = nil) + # Pass arguments to `generate_membership_rbac_role_binding_yaml` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::GenerateMembershipRBACRoleBindingYAMLRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::GenerateMembershipRBACRoleBindingYAMLRequest, ::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 generate_membership_rbac_role_binding_yaml(parent: nil, rbacrolebinding_id: nil, rbacrolebinding: nil) + # Pass arguments to `generate_membership_rbac_role_binding_yaml` 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 (project and location) where the RBACRoleBinding will + # be created. Specified in the format `projects/*/locations/*/memberships/*`. + # @param rbacrolebinding_id [::String] + # Required. Client chosen ID for the RBACRoleBinding. `rbacrolebinding_id` + # must be a valid RFC 1123 compliant DNS label: + # + # 1. At most 63 characters in length + # 2. It must consist of lower case alphanumeric characters or `-` + # 3. It must start and end with an alphanumeric character + # + # Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, + # with a maximum length of 63 characters. + # @param rbacrolebinding [::Google::Cloud::GkeHub::V1::RBACRoleBinding, ::Hash] + # Required. The rbacrolebindings to generate the YAML for. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::GkeHub::V1::GenerateMembershipRBACRoleBindingYAMLResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::GkeHub::V1::GenerateMembershipRBACRoleBindingYAMLResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::GenerateMembershipRBACRoleBindingYAMLRequest.new + # + # # Call the generate_membership_rbac_role_binding_yaml method. + # result = client.generate_membership_rbac_role_binding_yaml request + # + # # The returned object is of type Google::Cloud::GkeHub::V1::GenerateMembershipRBACRoleBindingYAMLResponse. + # p result + # + def generate_membership_rbac_role_binding_yaml request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::GenerateMembershipRBACRoleBindingYAMLRequest + + # 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.generate_membership_rbac_role_binding_yaml.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::GkeHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.generate_membership_rbac_role_binding_yaml.timeout, + metadata: metadata, + retry_policy: @config.rpcs.generate_membership_rbac_role_binding_yaml.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.call_rpc :generate_membership_rbac_role_binding_yaml, 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 GkeHub API. + # + # This class represents the configuration for GkeHub, + # 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::GkeHub::V1::GkeHub::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_memberships to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::GkeHub::V1::GkeHub::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_memberships.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_memberships.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::GkeHub::V1::GkeHub::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. + # * `: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 = "gkehub.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 GkeHub 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. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_memberships` + # @return [::Gapic::Config::Method] + # + attr_reader :list_memberships + ## + # RPC-specific configuration for `list_bound_memberships` + # @return [::Gapic::Config::Method] + # + attr_reader :list_bound_memberships + ## + # RPC-specific configuration for `list_features` + # @return [::Gapic::Config::Method] + # + attr_reader :list_features + ## + # RPC-specific configuration for `get_membership` + # @return [::Gapic::Config::Method] + # + attr_reader :get_membership + ## + # RPC-specific configuration for `get_feature` + # @return [::Gapic::Config::Method] + # + attr_reader :get_feature + ## + # RPC-specific configuration for `create_membership` + # @return [::Gapic::Config::Method] + # + attr_reader :create_membership + ## + # RPC-specific configuration for `create_feature` + # @return [::Gapic::Config::Method] + # + attr_reader :create_feature + ## + # RPC-specific configuration for `delete_membership` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_membership + ## + # RPC-specific configuration for `delete_feature` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_feature + ## + # RPC-specific configuration for `update_membership` + # @return [::Gapic::Config::Method] + # + attr_reader :update_membership + ## + # RPC-specific configuration for `update_feature` + # @return [::Gapic::Config::Method] + # + attr_reader :update_feature + ## + # RPC-specific configuration for `generate_connect_manifest` + # @return [::Gapic::Config::Method] + # + attr_reader :generate_connect_manifest + ## + # RPC-specific configuration for `create_fleet` + # @return [::Gapic::Config::Method] + # + attr_reader :create_fleet + ## + # RPC-specific configuration for `get_fleet` + # @return [::Gapic::Config::Method] + # + attr_reader :get_fleet + ## + # RPC-specific configuration for `update_fleet` + # @return [::Gapic::Config::Method] + # + attr_reader :update_fleet + ## + # RPC-specific configuration for `delete_fleet` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_fleet + ## + # RPC-specific configuration for `list_fleets` + # @return [::Gapic::Config::Method] + # + attr_reader :list_fleets + ## + # RPC-specific configuration for `get_scope_namespace` + # @return [::Gapic::Config::Method] + # + attr_reader :get_scope_namespace + ## + # RPC-specific configuration for `create_scope_namespace` + # @return [::Gapic::Config::Method] + # + attr_reader :create_scope_namespace + ## + # RPC-specific configuration for `update_scope_namespace` + # @return [::Gapic::Config::Method] + # + attr_reader :update_scope_namespace + ## + # RPC-specific configuration for `delete_scope_namespace` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_scope_namespace + ## + # RPC-specific configuration for `list_scope_namespaces` + # @return [::Gapic::Config::Method] + # + attr_reader :list_scope_namespaces + ## + # RPC-specific configuration for `get_scope_rbac_role_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :get_scope_rbac_role_binding + ## + # RPC-specific configuration for `create_scope_rbac_role_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :create_scope_rbac_role_binding + ## + # RPC-specific configuration for `update_scope_rbac_role_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :update_scope_rbac_role_binding + ## + # RPC-specific configuration for `delete_scope_rbac_role_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_scope_rbac_role_binding + ## + # RPC-specific configuration for `list_scope_rbac_role_bindings` + # @return [::Gapic::Config::Method] + # + attr_reader :list_scope_rbac_role_bindings + ## + # RPC-specific configuration for `get_scope` + # @return [::Gapic::Config::Method] + # + attr_reader :get_scope + ## + # RPC-specific configuration for `create_scope` + # @return [::Gapic::Config::Method] + # + attr_reader :create_scope + ## + # RPC-specific configuration for `update_scope` + # @return [::Gapic::Config::Method] + # + attr_reader :update_scope + ## + # RPC-specific configuration for `delete_scope` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_scope + ## + # RPC-specific configuration for `list_scopes` + # @return [::Gapic::Config::Method] + # + attr_reader :list_scopes + ## + # RPC-specific configuration for `list_permitted_scopes` + # @return [::Gapic::Config::Method] + # + attr_reader :list_permitted_scopes + ## + # RPC-specific configuration for `get_membership_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :get_membership_binding + ## + # RPC-specific configuration for `create_membership_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :create_membership_binding + ## + # RPC-specific configuration for `update_membership_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :update_membership_binding + ## + # RPC-specific configuration for `delete_membership_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_membership_binding + ## + # RPC-specific configuration for `list_membership_bindings` + # @return [::Gapic::Config::Method] + # + attr_reader :list_membership_bindings + ## + # RPC-specific configuration for `get_membership_rbac_role_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :get_membership_rbac_role_binding + ## + # RPC-specific configuration for `create_membership_rbac_role_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :create_membership_rbac_role_binding + ## + # RPC-specific configuration for `update_membership_rbac_role_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :update_membership_rbac_role_binding + ## + # RPC-specific configuration for `delete_membership_rbac_role_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_membership_rbac_role_binding + ## + # RPC-specific configuration for `list_membership_rbac_role_bindings` + # @return [::Gapic::Config::Method] + # + attr_reader :list_membership_rbac_role_bindings + ## + # RPC-specific configuration for `generate_membership_rbac_role_binding_yaml` + # @return [::Gapic::Config::Method] + # + attr_reader :generate_membership_rbac_role_binding_yaml + + # @private + def initialize parent_rpcs = nil + list_memberships_config = parent_rpcs.list_memberships if parent_rpcs.respond_to? :list_memberships + @list_memberships = ::Gapic::Config::Method.new list_memberships_config + list_bound_memberships_config = parent_rpcs.list_bound_memberships if parent_rpcs.respond_to? :list_bound_memberships + @list_bound_memberships = ::Gapic::Config::Method.new list_bound_memberships_config + list_features_config = parent_rpcs.list_features if parent_rpcs.respond_to? :list_features + @list_features = ::Gapic::Config::Method.new list_features_config + get_membership_config = parent_rpcs.get_membership if parent_rpcs.respond_to? :get_membership + @get_membership = ::Gapic::Config::Method.new get_membership_config + get_feature_config = parent_rpcs.get_feature if parent_rpcs.respond_to? :get_feature + @get_feature = ::Gapic::Config::Method.new get_feature_config + create_membership_config = parent_rpcs.create_membership if parent_rpcs.respond_to? :create_membership + @create_membership = ::Gapic::Config::Method.new create_membership_config + create_feature_config = parent_rpcs.create_feature if parent_rpcs.respond_to? :create_feature + @create_feature = ::Gapic::Config::Method.new create_feature_config + delete_membership_config = parent_rpcs.delete_membership if parent_rpcs.respond_to? :delete_membership + @delete_membership = ::Gapic::Config::Method.new delete_membership_config + delete_feature_config = parent_rpcs.delete_feature if parent_rpcs.respond_to? :delete_feature + @delete_feature = ::Gapic::Config::Method.new delete_feature_config + update_membership_config = parent_rpcs.update_membership if parent_rpcs.respond_to? :update_membership + @update_membership = ::Gapic::Config::Method.new update_membership_config + update_feature_config = parent_rpcs.update_feature if parent_rpcs.respond_to? :update_feature + @update_feature = ::Gapic::Config::Method.new update_feature_config + generate_connect_manifest_config = parent_rpcs.generate_connect_manifest if parent_rpcs.respond_to? :generate_connect_manifest + @generate_connect_manifest = ::Gapic::Config::Method.new generate_connect_manifest_config + create_fleet_config = parent_rpcs.create_fleet if parent_rpcs.respond_to? :create_fleet + @create_fleet = ::Gapic::Config::Method.new create_fleet_config + get_fleet_config = parent_rpcs.get_fleet if parent_rpcs.respond_to? :get_fleet + @get_fleet = ::Gapic::Config::Method.new get_fleet_config + update_fleet_config = parent_rpcs.update_fleet if parent_rpcs.respond_to? :update_fleet + @update_fleet = ::Gapic::Config::Method.new update_fleet_config + delete_fleet_config = parent_rpcs.delete_fleet if parent_rpcs.respond_to? :delete_fleet + @delete_fleet = ::Gapic::Config::Method.new delete_fleet_config + list_fleets_config = parent_rpcs.list_fleets if parent_rpcs.respond_to? :list_fleets + @list_fleets = ::Gapic::Config::Method.new list_fleets_config + get_scope_namespace_config = parent_rpcs.get_scope_namespace if parent_rpcs.respond_to? :get_scope_namespace + @get_scope_namespace = ::Gapic::Config::Method.new get_scope_namespace_config + create_scope_namespace_config = parent_rpcs.create_scope_namespace if parent_rpcs.respond_to? :create_scope_namespace + @create_scope_namespace = ::Gapic::Config::Method.new create_scope_namespace_config + update_scope_namespace_config = parent_rpcs.update_scope_namespace if parent_rpcs.respond_to? :update_scope_namespace + @update_scope_namespace = ::Gapic::Config::Method.new update_scope_namespace_config + delete_scope_namespace_config = parent_rpcs.delete_scope_namespace if parent_rpcs.respond_to? :delete_scope_namespace + @delete_scope_namespace = ::Gapic::Config::Method.new delete_scope_namespace_config + list_scope_namespaces_config = parent_rpcs.list_scope_namespaces if parent_rpcs.respond_to? :list_scope_namespaces + @list_scope_namespaces = ::Gapic::Config::Method.new list_scope_namespaces_config + get_scope_rbac_role_binding_config = parent_rpcs.get_scope_rbac_role_binding if parent_rpcs.respond_to? :get_scope_rbac_role_binding + @get_scope_rbac_role_binding = ::Gapic::Config::Method.new get_scope_rbac_role_binding_config + create_scope_rbac_role_binding_config = parent_rpcs.create_scope_rbac_role_binding if parent_rpcs.respond_to? :create_scope_rbac_role_binding + @create_scope_rbac_role_binding = ::Gapic::Config::Method.new create_scope_rbac_role_binding_config + update_scope_rbac_role_binding_config = parent_rpcs.update_scope_rbac_role_binding if parent_rpcs.respond_to? :update_scope_rbac_role_binding + @update_scope_rbac_role_binding = ::Gapic::Config::Method.new update_scope_rbac_role_binding_config + delete_scope_rbac_role_binding_config = parent_rpcs.delete_scope_rbac_role_binding if parent_rpcs.respond_to? :delete_scope_rbac_role_binding + @delete_scope_rbac_role_binding = ::Gapic::Config::Method.new delete_scope_rbac_role_binding_config + list_scope_rbac_role_bindings_config = parent_rpcs.list_scope_rbac_role_bindings if parent_rpcs.respond_to? :list_scope_rbac_role_bindings + @list_scope_rbac_role_bindings = ::Gapic::Config::Method.new list_scope_rbac_role_bindings_config + get_scope_config = parent_rpcs.get_scope if parent_rpcs.respond_to? :get_scope + @get_scope = ::Gapic::Config::Method.new get_scope_config + create_scope_config = parent_rpcs.create_scope if parent_rpcs.respond_to? :create_scope + @create_scope = ::Gapic::Config::Method.new create_scope_config + update_scope_config = parent_rpcs.update_scope if parent_rpcs.respond_to? :update_scope + @update_scope = ::Gapic::Config::Method.new update_scope_config + delete_scope_config = parent_rpcs.delete_scope if parent_rpcs.respond_to? :delete_scope + @delete_scope = ::Gapic::Config::Method.new delete_scope_config + list_scopes_config = parent_rpcs.list_scopes if parent_rpcs.respond_to? :list_scopes + @list_scopes = ::Gapic::Config::Method.new list_scopes_config + list_permitted_scopes_config = parent_rpcs.list_permitted_scopes if parent_rpcs.respond_to? :list_permitted_scopes + @list_permitted_scopes = ::Gapic::Config::Method.new list_permitted_scopes_config + get_membership_binding_config = parent_rpcs.get_membership_binding if parent_rpcs.respond_to? :get_membership_binding + @get_membership_binding = ::Gapic::Config::Method.new get_membership_binding_config + create_membership_binding_config = parent_rpcs.create_membership_binding if parent_rpcs.respond_to? :create_membership_binding + @create_membership_binding = ::Gapic::Config::Method.new create_membership_binding_config + update_membership_binding_config = parent_rpcs.update_membership_binding if parent_rpcs.respond_to? :update_membership_binding + @update_membership_binding = ::Gapic::Config::Method.new update_membership_binding_config + delete_membership_binding_config = parent_rpcs.delete_membership_binding if parent_rpcs.respond_to? :delete_membership_binding + @delete_membership_binding = ::Gapic::Config::Method.new delete_membership_binding_config + list_membership_bindings_config = parent_rpcs.list_membership_bindings if parent_rpcs.respond_to? :list_membership_bindings + @list_membership_bindings = ::Gapic::Config::Method.new list_membership_bindings_config + get_membership_rbac_role_binding_config = parent_rpcs.get_membership_rbac_role_binding if parent_rpcs.respond_to? :get_membership_rbac_role_binding + @get_membership_rbac_role_binding = ::Gapic::Config::Method.new get_membership_rbac_role_binding_config + create_membership_rbac_role_binding_config = parent_rpcs.create_membership_rbac_role_binding if parent_rpcs.respond_to? :create_membership_rbac_role_binding + @create_membership_rbac_role_binding = ::Gapic::Config::Method.new create_membership_rbac_role_binding_config + update_membership_rbac_role_binding_config = parent_rpcs.update_membership_rbac_role_binding if parent_rpcs.respond_to? :update_membership_rbac_role_binding + @update_membership_rbac_role_binding = ::Gapic::Config::Method.new update_membership_rbac_role_binding_config + delete_membership_rbac_role_binding_config = parent_rpcs.delete_membership_rbac_role_binding if parent_rpcs.respond_to? :delete_membership_rbac_role_binding + @delete_membership_rbac_role_binding = ::Gapic::Config::Method.new delete_membership_rbac_role_binding_config + list_membership_rbac_role_bindings_config = parent_rpcs.list_membership_rbac_role_bindings if parent_rpcs.respond_to? :list_membership_rbac_role_bindings + @list_membership_rbac_role_bindings = ::Gapic::Config::Method.new list_membership_rbac_role_bindings_config + generate_membership_rbac_role_binding_yaml_config = parent_rpcs.generate_membership_rbac_role_binding_yaml if parent_rpcs.respond_to? :generate_membership_rbac_role_binding_yaml + @generate_membership_rbac_role_binding_yaml = ::Gapic::Config::Method.new generate_membership_rbac_role_binding_yaml_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub/credentials.rb b/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub/credentials.rb new file mode 100644 index 000000000000..b6ef30824fd3 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub/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 GkeHub + module V1 + module GkeHub + # Credentials for the GkeHub API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "GKE_HUB_CREDENTIALS", + "GKE_HUB_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "GKE_HUB_CREDENTIALS_JSON", + "GKE_HUB_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-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub/operations.rb b/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub/operations.rb new file mode 100644 index 000000000000..65bcf6952705 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub/operations.rb @@ -0,0 +1,841 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/operation" +require "google/longrunning/operations_pb" + +module Google + module Cloud + module GkeHub + module V1 + module GkeHub + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "gkehub.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the GkeHub Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the GkeHub Operations 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 {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::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/longrunning/operations_services_pb" + + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + 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 + + @operations_stub = ::Gapic::ServiceStub.new( + ::Google::Longrunning::Operations::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 + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::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_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_operations` 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] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @param return_partial_success [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations 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::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # 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_operations.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::GkeHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| + wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } + response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::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_operation(name: nil) + # Pass arguments to `get_operation` 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] + # The name of the operation resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # 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_operation.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::GkeHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::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_operation(name: nil) + # Pass arguments to `delete_operation` 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] + # The name of the operation resource to be deleted. + # + # @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/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # 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_operation.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::GkeHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :delete_operation, 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 + + ## + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` 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] + # The name of the operation resource to be cancelled. + # + # @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/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.cancel_operation.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::GkeHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :cancel_operation, 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 + + ## + # Waits until the specified long-running operation is done or reaches at most + # a specified timeout, returning the latest state. If the operation is + # already done, the latest state is immediately returned. If the timeout + # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC + # timeout is used. If the server does not support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # Note that this method is on a best-effort basis. It may return the latest + # state before the specified timeout (including immediately), meaning even an + # immediate response is no guarantee that the operation is done. + # + # @overload wait_operation(request, options = nil) + # Pass arguments to `wait_operation` via a request object, either of type + # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::WaitOperationRequest, ::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 wait_operation(name: nil, timeout: nil) + # Pass arguments to `wait_operation` 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] + # The name of the operation resource to wait on. + # @param timeout [::Google::Protobuf::Duration, ::Hash] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::WaitOperationRequest.new + # + # # Call the wait_operation method. + # result = client.wait_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def wait_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest + + # 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.wait_operation.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::GkeHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.wait_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations API. + # + # This class represents the configuration for Operations, + # 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::Longrunning::Operations::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.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::Longrunning::Operations::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. + # * `: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 = "gkehub.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 Operations 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. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub/paths.rb b/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub/paths.rb new file mode 100644 index 000000000000..336c8bdbdb5f --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub/paths.rb @@ -0,0 +1,239 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 GkeHub + module V1 + module GkeHub + # Path helper methods for the GkeHub API. + module Paths + ## + # Create a fully-qualified Feature resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/features/{feature}` + # + # @param project [String] + # @param location [String] + # @param feature [String] + # + # @return [::String] + def feature_path project:, location:, feature: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/features/#{feature}" + end + + ## + # Create a fully-qualified Fleet resource string. + # + # @overload fleet_path(project:, location:, fleet:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/fleets/{fleet}` + # + # @param project [String] + # @param location [String] + # @param fleet [String] + # + # @overload fleet_path(organization:, location:, fleet:) + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}/fleets/{fleet}` + # + # @param organization [String] + # @param location [String] + # @param fleet [String] + # + # @return [::String] + def fleet_path **args + resources = { + "fleet:location:project" => (proc do |project:, location:, fleet:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/fleets/#{fleet}" + end), + "fleet:location:organization" => (proc do |organization:, location:, fleet:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}/fleets/#{fleet}" + 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 Location resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}` + # + # @param project [String] + # @param location [String] + # + # @return [::String] + def location_path project:, location: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/locations/#{location}" + end + + ## + # Create a fully-qualified Membership resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/memberships/{membership}` + # + # @param project [String] + # @param location [String] + # @param membership [String] + # + # @return [::String] + def membership_path project:, location:, membership: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/memberships/#{membership}" + end + + ## + # Create a fully-qualified MembershipBinding resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/memberships/{membership}/bindings/{membershipbinding}` + # + # @param project [String] + # @param location [String] + # @param membership [String] + # @param membershipbinding [String] + # + # @return [::String] + def membership_binding_path project:, location:, membership:, membershipbinding: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "membership cannot contain /" if membership.to_s.include? "/" + + "projects/#{project}/locations/#{location}/memberships/#{membership}/bindings/#{membershipbinding}" + end + + ## + # Create a fully-qualified Namespace resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/scopes/{scope}/namespaces/{namespace}` + # + # @param project [String] + # @param location [String] + # @param scope [String] + # @param namespace [String] + # + # @return [::String] + def namespace_path project:, location:, scope:, namespace: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "scope cannot contain /" if scope.to_s.include? "/" + + "projects/#{project}/locations/#{location}/scopes/#{scope}/namespaces/#{namespace}" + end + + ## + # Create a fully-qualified RBACRoleBinding resource string. + # + # @overload rbac_role_binding_path(project:, location:, scope:, rbacrolebinding:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/scopes/{scope}/rbacrolebindings/{rbacrolebinding}` + # + # @param project [String] + # @param location [String] + # @param scope [String] + # @param rbacrolebinding [String] + # + # @overload rbac_role_binding_path(project:, location:, membership:, rbacrolebinding:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/memberships/{membership}/rbacrolebindings/{rbacrolebinding}` + # + # @param project [String] + # @param location [String] + # @param membership [String] + # @param rbacrolebinding [String] + # + # @return [::String] + def rbac_role_binding_path **args + resources = { + "location:project:rbacrolebinding:scope" => (proc do |project:, location:, scope:, rbacrolebinding:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "scope cannot contain /" if scope.to_s.include? "/" + + "projects/#{project}/locations/#{location}/scopes/#{scope}/rbacrolebindings/#{rbacrolebinding}" + end), + "location:membership:project:rbacrolebinding" => (proc do |project:, location:, membership:, rbacrolebinding:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "membership cannot contain /" if membership.to_s.include? "/" + + "projects/#{project}/locations/#{location}/memberships/#{membership}/rbacrolebindings/#{rbacrolebinding}" + 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 Scope resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/scopes/{scope}` + # + # @param project [String] + # @param location [String] + # @param scope [String] + # + # @return [::String] + def scope_path project:, location:, scope: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/scopes/#{scope}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub/rest.rb b/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub/rest.rb new file mode 100644 index 000000000000..bf8b6db9660b --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub/rest.rb @@ -0,0 +1,69 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/gke_hub/v1/version" + +require "google/cloud/gke_hub/v1/gke_hub/credentials" +require "google/cloud/gke_hub/v1/gke_hub/paths" +require "google/cloud/gke_hub/v1/gke_hub/rest/operations" +require "google/cloud/gke_hub/v1/gke_hub/rest/client" + +module Google + module Cloud + module GkeHub + module V1 + ## + # The GKE Hub service handles the registration of many Kubernetes clusters to + # Google Cloud, and the management of multi-cluster features over those + # clusters. + # + # The GKE Hub service operates on the following resources: + # + # * {::Google::Cloud::GkeHub::V1::Membership Membership} + # * {::Google::Cloud::GkeHub::V1::Feature Feature} + # + # GKE Hub is currently available in the global region and all regions in + # https://cloud.google.com/compute/docs/regions-zones. Feature is only + # available in global region while membership is global region and all the + # regions. + # + # **Membership management may be non-trivial:** it is recommended to use one + # of the Google-provided client libraries or tools where possible when working + # with Membership resources. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/gke_hub/v1/gke_hub/rest" + # client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new + # + module GkeHub + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/gke_hub/v1/gke_hub/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub/rest/client.rb b/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub/rest/client.rb new file mode 100644 index 000000000000..29454987bd41 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub/rest/client.rb @@ -0,0 +1,4822 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/gkehub/v1/service_pb" +require "google/cloud/gke_hub/v1/gke_hub/rest/service_stub" + +module Google + module Cloud + module GkeHub + module V1 + module GkeHub + module Rest + ## + # REST client for the GkeHub service. + # + # The GKE Hub service handles the registration of many Kubernetes clusters to + # Google Cloud, and the management of multi-cluster features over those + # clusters. + # + # The GKE Hub service operates on the following resources: + # + # * {::Google::Cloud::GkeHub::V1::Membership Membership} + # * {::Google::Cloud::GkeHub::V1::Feature Feature} + # + # GKE Hub is currently available in the global region and all regions in + # https://cloud.google.com/compute/docs/regions-zones. Feature is only + # available in global region while membership is global region and all the + # regions. + # + # **Membership management may be non-trivial:** it is recommended to use one + # of the Google-provided client libraries or tools where possible when working + # with Membership resources. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "gkehub.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :gke_hub_stub + + ## + # Configure the GkeHub Client class. + # + # See {::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all GkeHub clients + # ::Google::Cloud::GkeHub::V1::GkeHub::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", "GkeHub", "V1"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.timeout = 60.0 + default_config.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the GkeHub 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::GkeHub::V1::GkeHub::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 + @gke_hub_stub.universe_domain + end + + ## + # Create a new GkeHub REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the GkeHub 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 + + @operations_client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Operations.new do |config| + config.credentials = credentials + config.quota_project = @quota_project_id + config.endpoint = @config.endpoint + config.universe_domain = @config.universe_domain + end + + @gke_hub_stub = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @gke_hub_stub.logger(stub: true)&.info do |entry| + entry.set_system_name + entry.set_service + entry.message = "Created client for #{entry.service}" + entry.set_credentials_fields credentials + entry.set "customEndpoint", @config.endpoint if @config.endpoint + entry.set "defaultTimeout", @config.timeout if @config.timeout + entry.set "quotaProject", @quota_project_id if @quota_project_id + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::GkeHub::V1::GkeHub::Rest::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @gke_hub_stub.logger + end + + # Service calls + + ## + # Lists Memberships in a given project and location. + # + # @overload list_memberships(request, options = nil) + # Pass arguments to `list_memberships` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::ListMembershipsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::ListMembershipsRequest, ::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_memberships(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_memberships` 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 (project and location) where the Memberships will be + # listed. Specified in the format `projects/*/locations/*`. + # `projects/*/locations/-` list memberships in all the regions. + # @param page_size [::Integer] + # Optional. When requesting a 'page' of resources, `page_size` specifies + # number of resources to return. If unspecified or set to 0, all resources + # will be returned. + # @param page_token [::String] + # Optional. Token returned by previous call to `ListMemberships` which + # specifies the position in the list from where to continue listing the + # resources. + # @param filter [::String] + # Optional. Lists Memberships that match the filter expression, following the + # syntax outlined in https://google.aip.dev/160. + # + # Examples: + # + # - Name is `bar` in project `foo-proj` and location `global`: + # + # name = "projects/foo-proj/locations/global/membership/bar" + # + # - Memberships that have a label called `foo`: + # + # labels.foo:* + # + # - Memberships that have a label called `foo` whose value is `bar`: + # + # labels.foo = bar + # + # - Memberships in the CREATING state: + # + # state = CREATING + # @param order_by [::String] + # Optional. One or more fields to compare and use to sort the output. + # See https://google.aip.dev/132#ordering. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeHub::V1::Membership>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeHub::V1::Membership>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::ListMembershipsRequest.new + # + # # Call the list_memberships method. + # result = client.list_memberships 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::GkeHub::V1::Membership. + # p item + # end + # + def list_memberships request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::ListMembershipsRequest + + # 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_memberships.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::GkeHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_memberships.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_memberships.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.list_memberships request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @gke_hub_stub, :list_memberships, "resources", 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 + + ## + # Lists Memberships bound to a Scope. The response includes relevant + # Memberships from all regions. + # + # @overload list_bound_memberships(request, options = nil) + # Pass arguments to `list_bound_memberships` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::ListBoundMembershipsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::ListBoundMembershipsRequest, ::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_bound_memberships(scope_name: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_bound_memberships` 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 scope_name [::String] + # Required. Name of the Scope, in the format + # `projects/*/locations/global/scopes/*`, to which the Memberships are bound. + # @param filter [::String] + # Optional. Lists Memberships that match the filter expression, following the + # syntax outlined in https://google.aip.dev/160. Currently, filtering + # can be done only based on Memberships's `name`, `labels`, `create_time`, + # `update_time`, and `unique_id`. + # @param page_size [::Integer] + # Optional. When requesting a 'page' of resources, `page_size` specifies + # number of resources to return. If unspecified or set to 0, all resources + # will be returned. Pagination is currently not supported; therefore, setting + # this field does not have any impact for now. + # @param page_token [::String] + # Optional. Token returned by previous call to `ListBoundMemberships` which + # specifies the position in the list from where to continue listing the + # resources. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeHub::V1::Membership>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeHub::V1::Membership>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::ListBoundMembershipsRequest.new + # + # # Call the list_bound_memberships method. + # result = client.list_bound_memberships 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::GkeHub::V1::Membership. + # p item + # end + # + def list_bound_memberships request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::ListBoundMembershipsRequest + + # 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_bound_memberships.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::GkeHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_bound_memberships.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_bound_memberships.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.list_bound_memberships request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @gke_hub_stub, :list_bound_memberships, "memberships", 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 + + ## + # Lists Features in a given project and location. + # + # @overload list_features(request, options = nil) + # Pass arguments to `list_features` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::ListFeaturesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::ListFeaturesRequest, ::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_features(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, return_partial_success: nil) + # Pass arguments to `list_features` 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 (project and location) where the Features will be + # listed. Specified in the format `projects/*/locations/*`. + # @param page_size [::Integer] + # When requesting a 'page' of resources, `page_size` specifies number of + # resources to return. If unspecified or set to 0, all resources will + # be returned. + # @param page_token [::String] + # Token returned by previous call to `ListFeatures` which + # specifies the position in the list from where to continue listing the + # resources. + # @param filter [::String] + # Lists Features that match the filter expression, following the syntax + # outlined in https://google.aip.dev/160. + # + # Examples: + # + # - Feature with the name "servicemesh" in project "foo-proj": + # + # name = "projects/foo-proj/locations/global/features/servicemesh" + # + # - Features that have a label called `foo`: + # + # labels.foo:* + # + # - Features that have a label called `foo` whose value is `bar`: + # + # labels.foo = bar + # @param order_by [::String] + # One or more fields to compare and use to sort the output. + # See https://google.aip.dev/132#ordering. + # @param return_partial_success [::Boolean] + # Optional. If set to true, the response will return partial results when + # some regions are unreachable and the unreachable field in Feature proto + # will be populated. If set to false, the request will fail when some regions + # are unreachable. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeHub::V1::Feature>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeHub::V1::Feature>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::ListFeaturesRequest.new + # + # # Call the list_features method. + # result = client.list_features 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::GkeHub::V1::Feature. + # p item + # end + # + def list_features request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::ListFeaturesRequest + + # 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_features.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::GkeHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_features.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_features.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.list_features request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @gke_hub_stub, :list_features, "resources", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the details of a Membership. + # + # @overload get_membership(request, options = nil) + # Pass arguments to `get_membership` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::GetMembershipRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::GetMembershipRequest, ::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_membership(name: nil) + # Pass arguments to `get_membership` 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 Membership resource name in the format + # `projects/*/locations/*/memberships/*`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::GkeHub::V1::Membership] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GkeHub::V1::Membership] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::GetMembershipRequest.new + # + # # Call the get_membership method. + # result = client.get_membership request + # + # # The returned object is of type Google::Cloud::GkeHub::V1::Membership. + # p result + # + def get_membership request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::GetMembershipRequest + + # 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_membership.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::GkeHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_membership.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_membership.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.get_membership request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets details of a single Feature. + # + # @overload get_feature(request, options = nil) + # Pass arguments to `get_feature` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::GetFeatureRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::GetFeatureRequest, ::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_feature(name: nil, return_partial_success: nil) + # Pass arguments to `get_feature` 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 Feature resource name in the format + # `projects/*/locations/*/features/*` + # @param return_partial_success [::Boolean] + # Optional. If set to true, the response will return partial results when + # some regions are unreachable and the unreachable field in Feature proto + # will be populated. If set to false, the request will fail when some regions + # are unreachable. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::GkeHub::V1::Feature] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GkeHub::V1::Feature] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::GetFeatureRequest.new + # + # # Call the get_feature method. + # result = client.get_feature request + # + # # The returned object is of type Google::Cloud::GkeHub::V1::Feature. + # p result + # + def get_feature request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::GetFeatureRequest + + # 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_feature.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::GkeHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_feature.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_feature.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.get_feature request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a new Membership. + # + # **This is currently only supported for GKE clusters on Google Cloud**. + # To register other clusters, follow the instructions at + # https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster. + # + # @overload create_membership(request, options = nil) + # Pass arguments to `create_membership` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::CreateMembershipRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::CreateMembershipRequest, ::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_membership(parent: nil, membership_id: nil, resource: nil, request_id: nil) + # Pass arguments to `create_membership` 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 (project and location) where the Memberships will be + # created. Specified in the format `projects/*/locations/*`. + # @param membership_id [::String] + # Required. Client chosen ID for the membership. `membership_id` must be a + # valid RFC 1123 compliant DNS label: + # + # 1. At most 63 characters in length + # 2. It must consist of lower case alphanumeric characters or `-` + # 3. It must start and end with an alphanumeric character + # + # Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, + # with a maximum length of 63 characters. + # @param resource [::Google::Cloud::GkeHub::V1::Membership, ::Hash] + # Required. The membership to create. + # @param request_id [::String] + # Optional. A request ID to identify requests. Specify a unique request ID + # so that if you must retry your request, the server will know to ignore + # the request if it has already been completed. The server will guarantee + # that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::CreateMembershipRequest.new + # + # # Call the create_membership method. + # result = client.create_membership request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_membership request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::CreateMembershipRequest + + # 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_membership.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::GkeHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_membership.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_membership.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.create_membership request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Adds a new Feature. + # + # @overload create_feature(request, options = nil) + # Pass arguments to `create_feature` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::CreateFeatureRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::CreateFeatureRequest, ::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_feature(parent: nil, feature_id: nil, resource: nil, request_id: nil) + # Pass arguments to `create_feature` 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 (project and location) where the Feature will be + # created. Specified in the format `projects/*/locations/*`. + # @param feature_id [::String] + # The ID of the feature to create. + # @param resource [::Google::Cloud::GkeHub::V1::Feature, ::Hash] + # The Feature resource to create. + # @param request_id [::String] + # A request ID to identify requests. Specify a unique request ID + # so that if you must retry your request, the server will know to ignore + # the request if it has already been completed. The server will guarantee + # that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::CreateFeatureRequest.new + # + # # Call the create_feature method. + # result = client.create_feature request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_feature request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::CreateFeatureRequest + + # 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_feature.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::GkeHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_feature.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_feature.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.create_feature request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Removes a Membership. + # + # **This is currently only supported for GKE clusters on Google Cloud**. + # To unregister other clusters, follow the instructions at + # https://cloud.google.com/anthos/multicluster-management/connect/unregistering-a-cluster. + # + # @overload delete_membership(request, options = nil) + # Pass arguments to `delete_membership` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::DeleteMembershipRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::DeleteMembershipRequest, ::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_membership(name: nil, request_id: nil, force: nil) + # Pass arguments to `delete_membership` 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 Membership resource name in the format + # `projects/*/locations/*/memberships/*`. + # @param request_id [::String] + # Optional. A request ID to identify requests. Specify a unique request ID + # so that if you must retry your request, the server will know to ignore + # the request if it has already been completed. The server will guarantee + # that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @param force [::Boolean] + # Optional. If set to true, any subresource from this Membership will also be + # deleted. Otherwise, the request will only work if the Membership has no + # subresource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::DeleteMembershipRequest.new + # + # # Call the delete_membership method. + # result = client.delete_membership request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_membership request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::DeleteMembershipRequest + + # 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_membership.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::GkeHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_membership.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_membership.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.delete_membership request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Removes a Feature. + # + # @overload delete_feature(request, options = nil) + # Pass arguments to `delete_feature` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::DeleteFeatureRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::DeleteFeatureRequest, ::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_feature(name: nil, force: nil, request_id: nil) + # Pass arguments to `delete_feature` 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 Feature resource name in the format + # `projects/*/locations/*/features/*`. + # @param force [::Boolean] + # If set to true, the delete will ignore any outstanding resources for + # this Feature (that is, `FeatureState.has_resources` is set to true). These + # resources will NOT be cleaned up or modified in any way. + # @param request_id [::String] + # Optional. A request ID to identify requests. Specify a unique request ID + # so that if you must retry your request, the server will know to ignore + # the request if it has already been completed. The server will guarantee + # that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::DeleteFeatureRequest.new + # + # # Call the delete_feature method. + # result = client.delete_feature request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_feature request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::DeleteFeatureRequest + + # 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_feature.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::GkeHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_feature.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_feature.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.delete_feature request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an existing Membership. + # + # @overload update_membership(request, options = nil) + # Pass arguments to `update_membership` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::UpdateMembershipRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::UpdateMembershipRequest, ::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_membership(name: nil, update_mask: nil, resource: nil, request_id: nil) + # Pass arguments to `update_membership` 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 Membership resource name in the format + # `projects/*/locations/*/memberships/*`. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask of fields to update. + # @param resource [::Google::Cloud::GkeHub::V1::Membership, ::Hash] + # Required. Only fields specified in update_mask are updated. + # If you specify a field in the update_mask but don't specify its value here + # that field will be deleted. + # If you are updating a map field, set the value of a key to null or empty + # string to delete the key from the map. It's not possible to update a key's + # value to the empty string. + # If you specify the update_mask to be a special path "*", fully replaces all + # user-modifiable fields to match `resource`. + # @param request_id [::String] + # Optional. A request ID to identify requests. Specify a unique request ID + # so that if you must retry your request, the server will know to ignore + # the request if it has already been completed. The server will guarantee + # that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::UpdateMembershipRequest.new + # + # # Call the update_membership method. + # result = client.update_membership request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_membership request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::UpdateMembershipRequest + + # 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_membership.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::GkeHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_membership.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_membership.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.update_membership request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an existing Feature. + # + # @overload update_feature(request, options = nil) + # Pass arguments to `update_feature` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::UpdateFeatureRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::UpdateFeatureRequest, ::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_feature(name: nil, update_mask: nil, resource: nil, request_id: nil) + # Pass arguments to `update_feature` 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 Feature resource name in the format + # `projects/*/locations/*/features/*`. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Mask of fields to update. + # @param resource [::Google::Cloud::GkeHub::V1::Feature, ::Hash] + # Only fields specified in update_mask are updated. + # If you specify a field in the update_mask but don't specify its value here + # that field will be deleted. + # If you are updating a map field, set the value of a key to null or empty + # string to delete the key from the map. It's not possible to update a key's + # value to the empty string. + # If you specify the update_mask to be a special path "*", fully replaces all + # user-modifiable fields to match `resource`. + # @param request_id [::String] + # A request ID to identify requests. Specify a unique request ID + # so that if you must retry your request, the server will know to ignore + # the request if it has already been completed. The server will guarantee + # that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::UpdateFeatureRequest.new + # + # # Call the update_feature method. + # result = client.update_feature request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_feature request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::UpdateFeatureRequest + + # 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_feature.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::GkeHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_feature.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_feature.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.update_feature request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Generates the manifest for deployment of the GKE connect agent. + # + # **This method is used internally by Google-provided libraries.** + # Most clients should not need to call this method directly. + # + # @overload generate_connect_manifest(request, options = nil) + # Pass arguments to `generate_connect_manifest` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::GenerateConnectManifestRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::GenerateConnectManifestRequest, ::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 generate_connect_manifest(name: nil, namespace: nil, proxy: nil, version: nil, is_upgrade: nil, registry: nil, image_pull_secret_content: nil) + # Pass arguments to `generate_connect_manifest` 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 Membership resource name the Agent will associate with, in + # the format `projects/*/locations/*/memberships/*`. + # @param namespace [::String] + # Optional. Namespace for GKE Connect agent resources. Defaults to + # `gke-connect`. + # + # The Connect Agent is authorized automatically when run in the default + # namespace. Otherwise, explicit authorization must be granted with an + # additional IAM binding. + # @param proxy [::String] + # Optional. URI of a proxy if connectivity from the agent to + # gkeconnect.googleapis.com requires the use of a proxy. Format must be in + # the form `http(s)://{proxy_address}`, depending on the HTTP/HTTPS protocol + # supported by the proxy. This will direct the connect agent's outbound + # traffic through a HTTP(S) proxy. + # @param version [::String] + # Optional. The Connect agent version to use. Defaults to the most current + # version. + # @param is_upgrade [::Boolean] + # Optional. If true, generate the resources for upgrade only. Some resources + # generated only for installation (e.g. secrets) will be excluded. + # @param registry [::String] + # Optional. The registry to fetch the connect agent image from. Defaults to + # gcr.io/gkeconnect. + # @param image_pull_secret_content [::String] + # Optional. The image pull secret content for the registry, if not public. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::GkeHub::V1::GenerateConnectManifestResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GkeHub::V1::GenerateConnectManifestResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::GenerateConnectManifestRequest.new + # + # # Call the generate_connect_manifest method. + # result = client.generate_connect_manifest request + # + # # The returned object is of type Google::Cloud::GkeHub::V1::GenerateConnectManifestResponse. + # p result + # + def generate_connect_manifest request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::GenerateConnectManifestRequest + + # 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.generate_connect_manifest.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::GkeHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.generate_connect_manifest.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.generate_connect_manifest.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.generate_connect_manifest request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a fleet. + # + # @overload create_fleet(request, options = nil) + # Pass arguments to `create_fleet` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::CreateFleetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::CreateFleetRequest, ::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_fleet(parent: nil, fleet: nil) + # Pass arguments to `create_fleet` 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 (project and location) where the Fleet will be + # created. Specified in the format `projects/*/locations/*`. + # @param fleet [::Google::Cloud::GkeHub::V1::Fleet, ::Hash] + # Required. The fleet to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::CreateFleetRequest.new + # + # # Call the create_fleet method. + # result = client.create_fleet request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_fleet request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::CreateFleetRequest + + # 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_fleet.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::GkeHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_fleet.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_fleet.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.create_fleet request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns the details of a fleet. + # + # @overload get_fleet(request, options = nil) + # Pass arguments to `get_fleet` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::GetFleetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::GetFleetRequest, ::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_fleet(name: nil) + # Pass arguments to `get_fleet` 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 Fleet resource name in the format + # `projects/*/locations/*/fleets/*`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::GkeHub::V1::Fleet] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GkeHub::V1::Fleet] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::GetFleetRequest.new + # + # # Call the get_fleet method. + # result = client.get_fleet request + # + # # The returned object is of type Google::Cloud::GkeHub::V1::Fleet. + # p result + # + def get_fleet request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::GetFleetRequest + + # 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_fleet.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::GkeHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_fleet.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_fleet.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.get_fleet 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 a fleet. + # + # @overload update_fleet(request, options = nil) + # Pass arguments to `update_fleet` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::UpdateFleetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::UpdateFleetRequest, ::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_fleet(fleet: nil, update_mask: nil) + # Pass arguments to `update_fleet` 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 fleet [::Google::Cloud::GkeHub::V1::Fleet, ::Hash] + # Required. The Fleet to update. + # + # The `name` field of the Fleet object identifies which fleet will be + # updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The fields to be updated; + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::UpdateFleetRequest.new + # + # # Call the update_fleet method. + # result = client.update_fleet request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_fleet request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::UpdateFleetRequest + + # 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_fleet.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::GkeHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_fleet.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_fleet.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.update_fleet request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Removes a Fleet. There must be no memberships remaining in the Fleet. + # + # @overload delete_fleet(request, options = nil) + # Pass arguments to `delete_fleet` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::DeleteFleetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::DeleteFleetRequest, ::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_fleet(name: nil) + # Pass arguments to `delete_fleet` 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 Fleet resource name in the format + # `projects/*/locations/*/fleets/*`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::DeleteFleetRequest.new + # + # # Call the delete_fleet method. + # result = client.delete_fleet request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_fleet request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::DeleteFleetRequest + + # 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_fleet.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::GkeHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_fleet.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_fleet.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.delete_fleet request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns all fleets within an organization or a project that the caller has + # access to. + # + # @overload list_fleets(request, options = nil) + # Pass arguments to `list_fleets` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::ListFleetsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::ListFleetsRequest, ::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_fleets(parent: nil, page_token: nil, page_size: nil) + # Pass arguments to `list_fleets` 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 organization or project to list for Fleets under, in the + # format `organizations/*/locations/*` or `projects/*/locations/*`. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListFleets` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListFleets` must match + # the call that provided the page token. + # @param page_size [::Integer] + # Optional. The maximum number of fleets to return. The service may return + # fewer than this value. If unspecified, at most 200 fleets will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeHub::V1::Fleet>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeHub::V1::Fleet>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::ListFleetsRequest.new + # + # # Call the list_fleets method. + # result = client.list_fleets 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::GkeHub::V1::Fleet. + # p item + # end + # + def list_fleets request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::ListFleetsRequest + + # 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_fleets.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::GkeHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_fleets.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_fleets.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.list_fleets request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @gke_hub_stub, :list_fleets, "fleets", 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 + + ## + # Returns the details of a fleet namespace. + # + # @overload get_scope_namespace(request, options = nil) + # Pass arguments to `get_scope_namespace` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::GetScopeNamespaceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::GetScopeNamespaceRequest, ::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_scope_namespace(name: nil) + # Pass arguments to `get_scope_namespace` 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 Namespace resource name in the format + # `projects/*/locations/*/scopes/*/namespaces/*`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::GkeHub::V1::Namespace] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GkeHub::V1::Namespace] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::GetScopeNamespaceRequest.new + # + # # Call the get_scope_namespace method. + # result = client.get_scope_namespace request + # + # # The returned object is of type Google::Cloud::GkeHub::V1::Namespace. + # p result + # + def get_scope_namespace request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::GetScopeNamespaceRequest + + # 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_scope_namespace.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::GkeHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_scope_namespace.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_scope_namespace.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.get_scope_namespace request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a fleet namespace. + # + # @overload create_scope_namespace(request, options = nil) + # Pass arguments to `create_scope_namespace` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::CreateScopeNamespaceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::CreateScopeNamespaceRequest, ::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_scope_namespace(parent: nil, scope_namespace_id: nil, scope_namespace: nil) + # Pass arguments to `create_scope_namespace` 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 (project and location) where the Namespace will be + # created. Specified in the format `projects/*/locations/*/scopes/*`. + # @param scope_namespace_id [::String] + # Required. Client chosen ID for the Namespace. `namespace_id` must be a + # valid RFC 1123 compliant DNS label: + # + # 1. At most 63 characters in length + # 2. It must consist of lower case alphanumeric characters or `-` + # 3. It must start and end with an alphanumeric character + # + # Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, + # with a maximum length of 63 characters. + # @param scope_namespace [::Google::Cloud::GkeHub::V1::Namespace, ::Hash] + # Required. The fleet namespace to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::CreateScopeNamespaceRequest.new + # + # # Call the create_scope_namespace method. + # result = client.create_scope_namespace request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_scope_namespace request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::CreateScopeNamespaceRequest + + # 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_scope_namespace.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::GkeHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_scope_namespace.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_scope_namespace.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.create_scope_namespace request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a fleet namespace. + # + # @overload update_scope_namespace(request, options = nil) + # Pass arguments to `update_scope_namespace` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::UpdateScopeNamespaceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::UpdateScopeNamespaceRequest, ::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_scope_namespace(scope_namespace: nil, update_mask: nil) + # Pass arguments to `update_scope_namespace` 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 scope_namespace [::Google::Cloud::GkeHub::V1::Namespace, ::Hash] + # Required. A namespace with fields updated. The 'name' field in this + # namespace is used to identify the resource to update. Given 'updated' + # prefix to follow go/proto-best-practices-checkers#keyword_conflict + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The fields to be updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::UpdateScopeNamespaceRequest.new + # + # # Call the update_scope_namespace method. + # result = client.update_scope_namespace request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_scope_namespace request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::UpdateScopeNamespaceRequest + + # 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_scope_namespace.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::GkeHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_scope_namespace.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_scope_namespace.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.update_scope_namespace request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 a fleet namespace. + # + # @overload delete_scope_namespace(request, options = nil) + # Pass arguments to `delete_scope_namespace` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::DeleteScopeNamespaceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::DeleteScopeNamespaceRequest, ::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_scope_namespace(name: nil) + # Pass arguments to `delete_scope_namespace` 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 Namespace resource name in the format + # `projects/*/locations/*/scopes/*/namespaces/*`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::DeleteScopeNamespaceRequest.new + # + # # Call the delete_scope_namespace method. + # result = client.delete_scope_namespace request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_scope_namespace request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::DeleteScopeNamespaceRequest + + # 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_scope_namespace.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::GkeHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_scope_namespace.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_scope_namespace.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.delete_scope_namespace request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists fleet namespaces. + # + # @overload list_scope_namespaces(request, options = nil) + # Pass arguments to `list_scope_namespaces` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::ListScopeNamespacesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::ListScopeNamespacesRequest, ::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_scope_namespaces(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_scope_namespaces` 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 (project and location) where the Features will be + # listed. Specified in the format `projects/*/locations/*/scopes/*`. + # @param page_size [::Integer] + # Optional. When requesting a 'page' of resources, `page_size` specifies + # number of resources to return. If unspecified or set to 0, all resources + # will be returned. + # @param page_token [::String] + # Optional. Token returned by previous call to `ListFeatures` which + # specifies the position in the list from where to continue listing the + # resources. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeHub::V1::Namespace>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeHub::V1::Namespace>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::ListScopeNamespacesRequest.new + # + # # Call the list_scope_namespaces method. + # result = client.list_scope_namespaces 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::GkeHub::V1::Namespace. + # p item + # end + # + def list_scope_namespaces request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::ListScopeNamespacesRequest + + # 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_scope_namespaces.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::GkeHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_scope_namespaces.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_scope_namespaces.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.list_scope_namespaces request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @gke_hub_stub, :list_scope_namespaces, "scope_namespaces", 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 + + ## + # Returns the details of a Scope RBACRoleBinding. + # + # @overload get_scope_rbac_role_binding(request, options = nil) + # Pass arguments to `get_scope_rbac_role_binding` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::GetScopeRBACRoleBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::GetScopeRBACRoleBindingRequest, ::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_scope_rbac_role_binding(name: nil) + # Pass arguments to `get_scope_rbac_role_binding` 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 RBACRoleBinding resource name in the format + # `projects/*/locations/*/scopes/*/rbacrolebindings/*`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::GkeHub::V1::RBACRoleBinding] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GkeHub::V1::RBACRoleBinding] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::GetScopeRBACRoleBindingRequest.new + # + # # Call the get_scope_rbac_role_binding method. + # result = client.get_scope_rbac_role_binding request + # + # # The returned object is of type Google::Cloud::GkeHub::V1::RBACRoleBinding. + # p result + # + def get_scope_rbac_role_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::GetScopeRBACRoleBindingRequest + + # 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_scope_rbac_role_binding.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::GkeHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_scope_rbac_role_binding.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_scope_rbac_role_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.get_scope_rbac_role_binding request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a Scope RBACRoleBinding. + # + # @overload create_scope_rbac_role_binding(request, options = nil) + # Pass arguments to `create_scope_rbac_role_binding` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::CreateScopeRBACRoleBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::CreateScopeRBACRoleBindingRequest, ::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_scope_rbac_role_binding(parent: nil, rbacrolebinding_id: nil, rbacrolebinding: nil) + # Pass arguments to `create_scope_rbac_role_binding` 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 (project and location) where the RBACRoleBinding will + # be created. Specified in the format `projects/*/locations/*/scopes/*`. + # @param rbacrolebinding_id [::String] + # Required. Client chosen ID for the RBACRoleBinding. `rbacrolebinding_id` + # must be a valid RFC 1123 compliant DNS label: + # + # 1. At most 63 characters in length + # 2. It must consist of lower case alphanumeric characters or `-` + # 3. It must start and end with an alphanumeric character + # + # Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, + # with a maximum length of 63 characters. + # @param rbacrolebinding [::Google::Cloud::GkeHub::V1::RBACRoleBinding, ::Hash] + # Required. The rbacrolebindings to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::CreateScopeRBACRoleBindingRequest.new + # + # # Call the create_scope_rbac_role_binding method. + # result = client.create_scope_rbac_role_binding request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_scope_rbac_role_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::CreateScopeRBACRoleBindingRequest + + # 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_scope_rbac_role_binding.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::GkeHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_scope_rbac_role_binding.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_scope_rbac_role_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.create_scope_rbac_role_binding request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a Scope RBACRoleBinding. + # + # @overload update_scope_rbac_role_binding(request, options = nil) + # Pass arguments to `update_scope_rbac_role_binding` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::UpdateScopeRBACRoleBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::UpdateScopeRBACRoleBindingRequest, ::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_scope_rbac_role_binding(rbacrolebinding: nil, update_mask: nil) + # Pass arguments to `update_scope_rbac_role_binding` 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 rbacrolebinding [::Google::Cloud::GkeHub::V1::RBACRoleBinding, ::Hash] + # Required. A rbacrolebinding with fields updated. The 'name' field in this + # rbacrolebinding is used to identify the resource to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The fields to be updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::UpdateScopeRBACRoleBindingRequest.new + # + # # Call the update_scope_rbac_role_binding method. + # result = client.update_scope_rbac_role_binding request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_scope_rbac_role_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::UpdateScopeRBACRoleBindingRequest + + # 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_scope_rbac_role_binding.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::GkeHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_scope_rbac_role_binding.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_scope_rbac_role_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.update_scope_rbac_role_binding request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 a Scope RBACRoleBinding. + # + # @overload delete_scope_rbac_role_binding(request, options = nil) + # Pass arguments to `delete_scope_rbac_role_binding` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::DeleteScopeRBACRoleBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::DeleteScopeRBACRoleBindingRequest, ::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_scope_rbac_role_binding(name: nil) + # Pass arguments to `delete_scope_rbac_role_binding` 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 RBACRoleBinding resource name in the format + # `projects/*/locations/*/scopes/*/rbacrolebindings/*`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::DeleteScopeRBACRoleBindingRequest.new + # + # # Call the delete_scope_rbac_role_binding method. + # result = client.delete_scope_rbac_role_binding request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_scope_rbac_role_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::DeleteScopeRBACRoleBindingRequest + + # 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_scope_rbac_role_binding.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::GkeHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_scope_rbac_role_binding.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_scope_rbac_role_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.delete_scope_rbac_role_binding request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all Scope RBACRoleBindings. + # + # @overload list_scope_rbac_role_bindings(request, options = nil) + # Pass arguments to `list_scope_rbac_role_bindings` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::ListScopeRBACRoleBindingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::ListScopeRBACRoleBindingsRequest, ::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_scope_rbac_role_bindings(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_scope_rbac_role_bindings` 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 (project and location) where the Features will be + # listed. Specified in the format `projects/*/locations/*/scopes/*`. + # @param page_size [::Integer] + # Optional. When requesting a 'page' of resources, `page_size` specifies + # number of resources to return. If unspecified or set to 0, all resources + # will be returned. + # @param page_token [::String] + # Optional. Token returned by previous call to `ListScopeRBACRoleBindings` + # which specifies the position in the list from where to continue listing the + # resources. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeHub::V1::RBACRoleBinding>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeHub::V1::RBACRoleBinding>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::ListScopeRBACRoleBindingsRequest.new + # + # # Call the list_scope_rbac_role_bindings method. + # result = client.list_scope_rbac_role_bindings 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::GkeHub::V1::RBACRoleBinding. + # p item + # end + # + def list_scope_rbac_role_bindings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::ListScopeRBACRoleBindingsRequest + + # 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_scope_rbac_role_bindings.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::GkeHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_scope_rbac_role_bindings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_scope_rbac_role_bindings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.list_scope_rbac_role_bindings request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @gke_hub_stub, :list_scope_rbac_role_bindings, "rbacrolebindings", 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 + + ## + # Returns the details of a Scope. + # + # @overload get_scope(request, options = nil) + # Pass arguments to `get_scope` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::GetScopeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::GetScopeRequest, ::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_scope(name: nil) + # Pass arguments to `get_scope` 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 Scope resource name in the format + # `projects/*/locations/*/scopes/*`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::GkeHub::V1::Scope] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GkeHub::V1::Scope] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::GetScopeRequest.new + # + # # Call the get_scope method. + # result = client.get_scope request + # + # # The returned object is of type Google::Cloud::GkeHub::V1::Scope. + # p result + # + def get_scope request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::GetScopeRequest + + # 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_scope.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::GkeHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_scope.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_scope.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.get_scope request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a Scope. + # + # @overload create_scope(request, options = nil) + # Pass arguments to `create_scope` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::CreateScopeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::CreateScopeRequest, ::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_scope(parent: nil, scope_id: nil, scope: nil) + # Pass arguments to `create_scope` 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 (project and location) where the Scope will be + # created. Specified in the format `projects/*/locations/*`. + # @param scope_id [::String] + # Required. Client chosen ID for the Scope. `scope_id` must be a + # ???? + # @param scope [::Google::Cloud::GkeHub::V1::Scope, ::Hash] + # Required. The Scope to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::CreateScopeRequest.new + # + # # Call the create_scope method. + # result = client.create_scope request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_scope request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::CreateScopeRequest + + # 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_scope.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::GkeHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_scope.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_scope.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.create_scope request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a scopes. + # + # @overload update_scope(request, options = nil) + # Pass arguments to `update_scope` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::UpdateScopeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::UpdateScopeRequest, ::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_scope(scope: nil, update_mask: nil) + # Pass arguments to `update_scope` 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 scope [::Google::Cloud::GkeHub::V1::Scope, ::Hash] + # Required. A Scope with fields updated. The 'name' field in this + # namespace is used to identify the resource to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The fields to be updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::UpdateScopeRequest.new + # + # # Call the update_scope method. + # result = client.update_scope request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_scope request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::UpdateScopeRequest + + # 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_scope.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::GkeHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_scope.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_scope.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.update_scope request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 a Scope. + # + # @overload delete_scope(request, options = nil) + # Pass arguments to `delete_scope` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::DeleteScopeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::DeleteScopeRequest, ::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_scope(name: nil) + # Pass arguments to `delete_scope` 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 Scope resource name in the format + # `projects/*/locations/*/scopes/*`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::DeleteScopeRequest.new + # + # # Call the delete_scope method. + # result = client.delete_scope request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_scope request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::DeleteScopeRequest + + # 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_scope.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::GkeHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_scope.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_scope.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.delete_scope request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists Scopes. + # + # @overload list_scopes(request, options = nil) + # Pass arguments to `list_scopes` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::ListScopesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::ListScopesRequest, ::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_scopes(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_scopes` 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 (project and location) where the Scope will be listed. + # Specified in the format `projects/*/locations/*`. + # @param page_size [::Integer] + # Optional. When requesting a 'page' of resources, `page_size` specifies + # number of resources to return. If unspecified or set to 0, all resources + # will be returned. + # @param page_token [::String] + # Optional. Token returned by previous call to `ListScopes` which + # specifies the position in the list from where to continue listing the + # resources. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeHub::V1::Scope>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeHub::V1::Scope>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::ListScopesRequest.new + # + # # Call the list_scopes method. + # result = client.list_scopes 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::GkeHub::V1::Scope. + # p item + # end + # + def list_scopes request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::ListScopesRequest + + # 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_scopes.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::GkeHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_scopes.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_scopes.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.list_scopes request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @gke_hub_stub, :list_scopes, "scopes", 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 + + ## + # Lists permitted Scopes. + # + # @overload list_permitted_scopes(request, options = nil) + # Pass arguments to `list_permitted_scopes` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::ListPermittedScopesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::ListPermittedScopesRequest, ::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_permitted_scopes(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_permitted_scopes` 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 (project and location) where the Scope will be listed. + # Specified in the format `projects/*/locations/*`. + # @param page_size [::Integer] + # Optional. When requesting a 'page' of resources, `page_size` specifies + # number of resources to return. If unspecified or set to 0, all resources + # will be returned. + # @param page_token [::String] + # Optional. Token returned by previous call to `ListPermittedScopes` which + # specifies the position in the list from where to continue listing the + # resources. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeHub::V1::Scope>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeHub::V1::Scope>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::ListPermittedScopesRequest.new + # + # # Call the list_permitted_scopes method. + # result = client.list_permitted_scopes 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::GkeHub::V1::Scope. + # p item + # end + # + def list_permitted_scopes request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::ListPermittedScopesRequest + + # 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_permitted_scopes.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::GkeHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_permitted_scopes.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_permitted_scopes.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.list_permitted_scopes request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @gke_hub_stub, :list_permitted_scopes, "scopes", 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 + + ## + # Returns the details of a MembershipBinding. + # + # @overload get_membership_binding(request, options = nil) + # Pass arguments to `get_membership_binding` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::GetMembershipBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::GetMembershipBindingRequest, ::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_membership_binding(name: nil) + # Pass arguments to `get_membership_binding` 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 MembershipBinding resource name in the format + # `projects/*/locations/*/memberships/*/bindings/*`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::GkeHub::V1::MembershipBinding] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GkeHub::V1::MembershipBinding] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::GetMembershipBindingRequest.new + # + # # Call the get_membership_binding method. + # result = client.get_membership_binding request + # + # # The returned object is of type Google::Cloud::GkeHub::V1::MembershipBinding. + # p result + # + def get_membership_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::GetMembershipBindingRequest + + # 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_membership_binding.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::GkeHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_membership_binding.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_membership_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.get_membership_binding request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a MembershipBinding. + # + # @overload create_membership_binding(request, options = nil) + # Pass arguments to `create_membership_binding` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::CreateMembershipBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::CreateMembershipBindingRequest, ::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_membership_binding(parent: nil, membership_binding: nil, membership_binding_id: nil) + # Pass arguments to `create_membership_binding` 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 (project and location) where the MembershipBinding + # will be created. Specified in the format + # `projects/*/locations/*/memberships/*`. + # @param membership_binding [::Google::Cloud::GkeHub::V1::MembershipBinding, ::Hash] + # Required. The MembershipBinding to create. + # @param membership_binding_id [::String] + # Required. The ID to use for the MembershipBinding. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::CreateMembershipBindingRequest.new + # + # # Call the create_membership_binding method. + # result = client.create_membership_binding request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_membership_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::CreateMembershipBindingRequest + + # 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_membership_binding.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::GkeHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_membership_binding.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_membership_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.create_membership_binding request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a MembershipBinding. + # + # @overload update_membership_binding(request, options = nil) + # Pass arguments to `update_membership_binding` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::UpdateMembershipBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::UpdateMembershipBindingRequest, ::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_membership_binding(membership_binding: nil, update_mask: nil) + # Pass arguments to `update_membership_binding` 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 membership_binding [::Google::Cloud::GkeHub::V1::MembershipBinding, ::Hash] + # Required. The MembershipBinding object with fields updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The fields to be updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::UpdateMembershipBindingRequest.new + # + # # Call the update_membership_binding method. + # result = client.update_membership_binding request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_membership_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::UpdateMembershipBindingRequest + + # 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_membership_binding.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::GkeHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_membership_binding.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_membership_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.update_membership_binding request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 a MembershipBinding. + # + # @overload delete_membership_binding(request, options = nil) + # Pass arguments to `delete_membership_binding` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::DeleteMembershipBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::DeleteMembershipBindingRequest, ::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_membership_binding(name: nil) + # Pass arguments to `delete_membership_binding` 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 MembershipBinding resource name in the format + # `projects/*/locations/*/memberships/*/bindings/*`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::DeleteMembershipBindingRequest.new + # + # # Call the delete_membership_binding method. + # result = client.delete_membership_binding request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_membership_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::DeleteMembershipBindingRequest + + # 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_membership_binding.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::GkeHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_membership_binding.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_membership_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.delete_membership_binding request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists MembershipBindings. + # + # @overload list_membership_bindings(request, options = nil) + # Pass arguments to `list_membership_bindings` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::ListMembershipBindingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::ListMembershipBindingsRequest, ::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_membership_bindings(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_membership_bindings` 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 Membership for which the MembershipBindings will be + # listed. Specified in the format `projects/*/locations/*/memberships/*`. + # @param page_size [::Integer] + # Optional. When requesting a 'page' of resources, `page_size` specifies + # number of resources to return. If unspecified or set to 0, all resources + # will be returned. + # @param page_token [::String] + # Optional. Token returned by previous call to `ListMembershipBindings` which + # specifies the position in the list from where to continue listing the + # resources. + # @param filter [::String] + # Optional. Lists MembershipBindings that match the filter expression, + # following the syntax outlined in https://google.aip.dev/160. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeHub::V1::MembershipBinding>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeHub::V1::MembershipBinding>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::ListMembershipBindingsRequest.new + # + # # Call the list_membership_bindings method. + # result = client.list_membership_bindings 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::GkeHub::V1::MembershipBinding. + # p item + # end + # + def list_membership_bindings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::ListMembershipBindingsRequest + + # 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_membership_bindings.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::GkeHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_membership_bindings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_membership_bindings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.list_membership_bindings request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @gke_hub_stub, :list_membership_bindings, "membership_bindings", 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 + + ## + # Returns the details of a Membership RBACRoleBinding. + # + # @overload get_membership_rbac_role_binding(request, options = nil) + # Pass arguments to `get_membership_rbac_role_binding` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::GetMembershipRBACRoleBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::GetMembershipRBACRoleBindingRequest, ::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_membership_rbac_role_binding(name: nil) + # Pass arguments to `get_membership_rbac_role_binding` 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 RBACRoleBinding resource name in the format + # `projects/*/locations/*/memberships/*/rbacrolebindings/*`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::GkeHub::V1::RBACRoleBinding] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GkeHub::V1::RBACRoleBinding] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::GetMembershipRBACRoleBindingRequest.new + # + # # Call the get_membership_rbac_role_binding method. + # result = client.get_membership_rbac_role_binding request + # + # # The returned object is of type Google::Cloud::GkeHub::V1::RBACRoleBinding. + # p result + # + def get_membership_rbac_role_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::GetMembershipRBACRoleBindingRequest + + # 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_membership_rbac_role_binding.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::GkeHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_membership_rbac_role_binding.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_membership_rbac_role_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.get_membership_rbac_role_binding request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a Membership RBACRoleBinding. + # + # @overload create_membership_rbac_role_binding(request, options = nil) + # Pass arguments to `create_membership_rbac_role_binding` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::CreateMembershipRBACRoleBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::CreateMembershipRBACRoleBindingRequest, ::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_membership_rbac_role_binding(parent: nil, rbacrolebinding_id: nil, rbacrolebinding: nil) + # Pass arguments to `create_membership_rbac_role_binding` 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 (project and location) where the RBACRoleBinding will + # be created. Specified in the format `projects/*/locations/*/memberships/*`. + # @param rbacrolebinding_id [::String] + # Required. Client chosen ID for the RBACRoleBinding. `rbacrolebinding_id` + # must be a valid RFC 1123 compliant DNS label: + # + # 1. At most 63 characters in length + # 2. It must consist of lower case alphanumeric characters or `-` + # 3. It must start and end with an alphanumeric character + # + # Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, + # with a maximum length of 63 characters. + # @param rbacrolebinding [::Google::Cloud::GkeHub::V1::RBACRoleBinding, ::Hash] + # Required. The rbacrolebindings to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::CreateMembershipRBACRoleBindingRequest.new + # + # # Call the create_membership_rbac_role_binding method. + # result = client.create_membership_rbac_role_binding request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_membership_rbac_role_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::CreateMembershipRBACRoleBindingRequest + + # 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_membership_rbac_role_binding.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::GkeHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_membership_rbac_role_binding.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_membership_rbac_role_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.create_membership_rbac_role_binding request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a Membership RBACRoleBinding. + # + # @overload update_membership_rbac_role_binding(request, options = nil) + # Pass arguments to `update_membership_rbac_role_binding` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::UpdateMembershipRBACRoleBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::UpdateMembershipRBACRoleBindingRequest, ::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_membership_rbac_role_binding(rbacrolebinding: nil, update_mask: nil) + # Pass arguments to `update_membership_rbac_role_binding` 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 rbacrolebinding [::Google::Cloud::GkeHub::V1::RBACRoleBinding, ::Hash] + # Required. A rbacrolebinding with fields updated. The 'name' field in this + # rbacrolebinding is used to identify the resource to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The fields to be updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::UpdateMembershipRBACRoleBindingRequest.new + # + # # Call the update_membership_rbac_role_binding method. + # result = client.update_membership_rbac_role_binding request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_membership_rbac_role_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::UpdateMembershipRBACRoleBindingRequest + + # 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_membership_rbac_role_binding.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::GkeHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_membership_rbac_role_binding.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_membership_rbac_role_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.update_membership_rbac_role_binding request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 a Membership RBACRoleBinding. + # + # @overload delete_membership_rbac_role_binding(request, options = nil) + # Pass arguments to `delete_membership_rbac_role_binding` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::DeleteMembershipRBACRoleBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::DeleteMembershipRBACRoleBindingRequest, ::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_membership_rbac_role_binding(name: nil) + # Pass arguments to `delete_membership_rbac_role_binding` 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 RBACRoleBinding resource name in the format + # `projects/*/locations/*/memberships/*/rbacrolebindings/*`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::DeleteMembershipRBACRoleBindingRequest.new + # + # # Call the delete_membership_rbac_role_binding method. + # result = client.delete_membership_rbac_role_binding request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_membership_rbac_role_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::DeleteMembershipRBACRoleBindingRequest + + # 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_membership_rbac_role_binding.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::GkeHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_membership_rbac_role_binding.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_membership_rbac_role_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.delete_membership_rbac_role_binding request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all Membership RBACRoleBindings. + # + # @overload list_membership_rbac_role_bindings(request, options = nil) + # Pass arguments to `list_membership_rbac_role_bindings` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::ListMembershipRBACRoleBindingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::ListMembershipRBACRoleBindingsRequest, ::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_membership_rbac_role_bindings(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_membership_rbac_role_bindings` 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 (project and location) where the Features will be + # listed. Specified in the format `projects/*/locations/*/memberships/*`. + # @param page_size [::Integer] + # Optional. When requesting a 'page' of resources, `page_size` specifies + # number of resources to return. If unspecified or set to 0, all resources + # will be returned. + # @param page_token [::String] + # Optional. Token returned by previous call to + # `ListMembershipRBACRoleBindings` which specifies the position in the list + # from where to continue listing the resources. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeHub::V1::RBACRoleBinding>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeHub::V1::RBACRoleBinding>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::ListMembershipRBACRoleBindingsRequest.new + # + # # Call the list_membership_rbac_role_bindings method. + # result = client.list_membership_rbac_role_bindings 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::GkeHub::V1::RBACRoleBinding. + # p item + # end + # + def list_membership_rbac_role_bindings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::ListMembershipRBACRoleBindingsRequest + + # 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_membership_rbac_role_bindings.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::GkeHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_membership_rbac_role_bindings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_membership_rbac_role_bindings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.list_membership_rbac_role_bindings request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @gke_hub_stub, :list_membership_rbac_role_bindings, "rbacrolebindings", 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 + + ## + # Generates a YAML of the RBAC policies for the specified + # RoleBinding and its associated impersonation resources. + # + # @overload generate_membership_rbac_role_binding_yaml(request, options = nil) + # Pass arguments to `generate_membership_rbac_role_binding_yaml` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::GenerateMembershipRBACRoleBindingYAMLRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::GenerateMembershipRBACRoleBindingYAMLRequest, ::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 generate_membership_rbac_role_binding_yaml(parent: nil, rbacrolebinding_id: nil, rbacrolebinding: nil) + # Pass arguments to `generate_membership_rbac_role_binding_yaml` 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 (project and location) where the RBACRoleBinding will + # be created. Specified in the format `projects/*/locations/*/memberships/*`. + # @param rbacrolebinding_id [::String] + # Required. Client chosen ID for the RBACRoleBinding. `rbacrolebinding_id` + # must be a valid RFC 1123 compliant DNS label: + # + # 1. At most 63 characters in length + # 2. It must consist of lower case alphanumeric characters or `-` + # 3. It must start and end with an alphanumeric character + # + # Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, + # with a maximum length of 63 characters. + # @param rbacrolebinding [::Google::Cloud::GkeHub::V1::RBACRoleBinding, ::Hash] + # Required. The rbacrolebindings to generate the YAML for. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::GkeHub::V1::GenerateMembershipRBACRoleBindingYAMLResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GkeHub::V1::GenerateMembershipRBACRoleBindingYAMLResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::GenerateMembershipRBACRoleBindingYAMLRequest.new + # + # # Call the generate_membership_rbac_role_binding_yaml method. + # result = client.generate_membership_rbac_role_binding_yaml request + # + # # The returned object is of type Google::Cloud::GkeHub::V1::GenerateMembershipRBACRoleBindingYAMLResponse. + # p result + # + def generate_membership_rbac_role_binding_yaml request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::GenerateMembershipRBACRoleBindingYAMLRequest + + # 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.generate_membership_rbac_role_binding_yaml.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::GkeHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.generate_membership_rbac_role_binding_yaml.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.generate_membership_rbac_role_binding_yaml.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.generate_membership_rbac_role_binding_yaml 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 GkeHub REST API. + # + # This class represents the configuration for GkeHub 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::GkeHub::V1::GkeHub::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_memberships to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_memberships.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_memberships.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. + # * `: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 = "gkehub.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the GkeHub 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. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_memberships` + # @return [::Gapic::Config::Method] + # + attr_reader :list_memberships + ## + # RPC-specific configuration for `list_bound_memberships` + # @return [::Gapic::Config::Method] + # + attr_reader :list_bound_memberships + ## + # RPC-specific configuration for `list_features` + # @return [::Gapic::Config::Method] + # + attr_reader :list_features + ## + # RPC-specific configuration for `get_membership` + # @return [::Gapic::Config::Method] + # + attr_reader :get_membership + ## + # RPC-specific configuration for `get_feature` + # @return [::Gapic::Config::Method] + # + attr_reader :get_feature + ## + # RPC-specific configuration for `create_membership` + # @return [::Gapic::Config::Method] + # + attr_reader :create_membership + ## + # RPC-specific configuration for `create_feature` + # @return [::Gapic::Config::Method] + # + attr_reader :create_feature + ## + # RPC-specific configuration for `delete_membership` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_membership + ## + # RPC-specific configuration for `delete_feature` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_feature + ## + # RPC-specific configuration for `update_membership` + # @return [::Gapic::Config::Method] + # + attr_reader :update_membership + ## + # RPC-specific configuration for `update_feature` + # @return [::Gapic::Config::Method] + # + attr_reader :update_feature + ## + # RPC-specific configuration for `generate_connect_manifest` + # @return [::Gapic::Config::Method] + # + attr_reader :generate_connect_manifest + ## + # RPC-specific configuration for `create_fleet` + # @return [::Gapic::Config::Method] + # + attr_reader :create_fleet + ## + # RPC-specific configuration for `get_fleet` + # @return [::Gapic::Config::Method] + # + attr_reader :get_fleet + ## + # RPC-specific configuration for `update_fleet` + # @return [::Gapic::Config::Method] + # + attr_reader :update_fleet + ## + # RPC-specific configuration for `delete_fleet` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_fleet + ## + # RPC-specific configuration for `list_fleets` + # @return [::Gapic::Config::Method] + # + attr_reader :list_fleets + ## + # RPC-specific configuration for `get_scope_namespace` + # @return [::Gapic::Config::Method] + # + attr_reader :get_scope_namespace + ## + # RPC-specific configuration for `create_scope_namespace` + # @return [::Gapic::Config::Method] + # + attr_reader :create_scope_namespace + ## + # RPC-specific configuration for `update_scope_namespace` + # @return [::Gapic::Config::Method] + # + attr_reader :update_scope_namespace + ## + # RPC-specific configuration for `delete_scope_namespace` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_scope_namespace + ## + # RPC-specific configuration for `list_scope_namespaces` + # @return [::Gapic::Config::Method] + # + attr_reader :list_scope_namespaces + ## + # RPC-specific configuration for `get_scope_rbac_role_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :get_scope_rbac_role_binding + ## + # RPC-specific configuration for `create_scope_rbac_role_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :create_scope_rbac_role_binding + ## + # RPC-specific configuration for `update_scope_rbac_role_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :update_scope_rbac_role_binding + ## + # RPC-specific configuration for `delete_scope_rbac_role_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_scope_rbac_role_binding + ## + # RPC-specific configuration for `list_scope_rbac_role_bindings` + # @return [::Gapic::Config::Method] + # + attr_reader :list_scope_rbac_role_bindings + ## + # RPC-specific configuration for `get_scope` + # @return [::Gapic::Config::Method] + # + attr_reader :get_scope + ## + # RPC-specific configuration for `create_scope` + # @return [::Gapic::Config::Method] + # + attr_reader :create_scope + ## + # RPC-specific configuration for `update_scope` + # @return [::Gapic::Config::Method] + # + attr_reader :update_scope + ## + # RPC-specific configuration for `delete_scope` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_scope + ## + # RPC-specific configuration for `list_scopes` + # @return [::Gapic::Config::Method] + # + attr_reader :list_scopes + ## + # RPC-specific configuration for `list_permitted_scopes` + # @return [::Gapic::Config::Method] + # + attr_reader :list_permitted_scopes + ## + # RPC-specific configuration for `get_membership_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :get_membership_binding + ## + # RPC-specific configuration for `create_membership_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :create_membership_binding + ## + # RPC-specific configuration for `update_membership_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :update_membership_binding + ## + # RPC-specific configuration for `delete_membership_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_membership_binding + ## + # RPC-specific configuration for `list_membership_bindings` + # @return [::Gapic::Config::Method] + # + attr_reader :list_membership_bindings + ## + # RPC-specific configuration for `get_membership_rbac_role_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :get_membership_rbac_role_binding + ## + # RPC-specific configuration for `create_membership_rbac_role_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :create_membership_rbac_role_binding + ## + # RPC-specific configuration for `update_membership_rbac_role_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :update_membership_rbac_role_binding + ## + # RPC-specific configuration for `delete_membership_rbac_role_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_membership_rbac_role_binding + ## + # RPC-specific configuration for `list_membership_rbac_role_bindings` + # @return [::Gapic::Config::Method] + # + attr_reader :list_membership_rbac_role_bindings + ## + # RPC-specific configuration for `generate_membership_rbac_role_binding_yaml` + # @return [::Gapic::Config::Method] + # + attr_reader :generate_membership_rbac_role_binding_yaml + + # @private + def initialize parent_rpcs = nil + list_memberships_config = parent_rpcs.list_memberships if parent_rpcs.respond_to? :list_memberships + @list_memberships = ::Gapic::Config::Method.new list_memberships_config + list_bound_memberships_config = parent_rpcs.list_bound_memberships if parent_rpcs.respond_to? :list_bound_memberships + @list_bound_memberships = ::Gapic::Config::Method.new list_bound_memberships_config + list_features_config = parent_rpcs.list_features if parent_rpcs.respond_to? :list_features + @list_features = ::Gapic::Config::Method.new list_features_config + get_membership_config = parent_rpcs.get_membership if parent_rpcs.respond_to? :get_membership + @get_membership = ::Gapic::Config::Method.new get_membership_config + get_feature_config = parent_rpcs.get_feature if parent_rpcs.respond_to? :get_feature + @get_feature = ::Gapic::Config::Method.new get_feature_config + create_membership_config = parent_rpcs.create_membership if parent_rpcs.respond_to? :create_membership + @create_membership = ::Gapic::Config::Method.new create_membership_config + create_feature_config = parent_rpcs.create_feature if parent_rpcs.respond_to? :create_feature + @create_feature = ::Gapic::Config::Method.new create_feature_config + delete_membership_config = parent_rpcs.delete_membership if parent_rpcs.respond_to? :delete_membership + @delete_membership = ::Gapic::Config::Method.new delete_membership_config + delete_feature_config = parent_rpcs.delete_feature if parent_rpcs.respond_to? :delete_feature + @delete_feature = ::Gapic::Config::Method.new delete_feature_config + update_membership_config = parent_rpcs.update_membership if parent_rpcs.respond_to? :update_membership + @update_membership = ::Gapic::Config::Method.new update_membership_config + update_feature_config = parent_rpcs.update_feature if parent_rpcs.respond_to? :update_feature + @update_feature = ::Gapic::Config::Method.new update_feature_config + generate_connect_manifest_config = parent_rpcs.generate_connect_manifest if parent_rpcs.respond_to? :generate_connect_manifest + @generate_connect_manifest = ::Gapic::Config::Method.new generate_connect_manifest_config + create_fleet_config = parent_rpcs.create_fleet if parent_rpcs.respond_to? :create_fleet + @create_fleet = ::Gapic::Config::Method.new create_fleet_config + get_fleet_config = parent_rpcs.get_fleet if parent_rpcs.respond_to? :get_fleet + @get_fleet = ::Gapic::Config::Method.new get_fleet_config + update_fleet_config = parent_rpcs.update_fleet if parent_rpcs.respond_to? :update_fleet + @update_fleet = ::Gapic::Config::Method.new update_fleet_config + delete_fleet_config = parent_rpcs.delete_fleet if parent_rpcs.respond_to? :delete_fleet + @delete_fleet = ::Gapic::Config::Method.new delete_fleet_config + list_fleets_config = parent_rpcs.list_fleets if parent_rpcs.respond_to? :list_fleets + @list_fleets = ::Gapic::Config::Method.new list_fleets_config + get_scope_namespace_config = parent_rpcs.get_scope_namespace if parent_rpcs.respond_to? :get_scope_namespace + @get_scope_namespace = ::Gapic::Config::Method.new get_scope_namespace_config + create_scope_namespace_config = parent_rpcs.create_scope_namespace if parent_rpcs.respond_to? :create_scope_namespace + @create_scope_namespace = ::Gapic::Config::Method.new create_scope_namespace_config + update_scope_namespace_config = parent_rpcs.update_scope_namespace if parent_rpcs.respond_to? :update_scope_namespace + @update_scope_namespace = ::Gapic::Config::Method.new update_scope_namespace_config + delete_scope_namespace_config = parent_rpcs.delete_scope_namespace if parent_rpcs.respond_to? :delete_scope_namespace + @delete_scope_namespace = ::Gapic::Config::Method.new delete_scope_namespace_config + list_scope_namespaces_config = parent_rpcs.list_scope_namespaces if parent_rpcs.respond_to? :list_scope_namespaces + @list_scope_namespaces = ::Gapic::Config::Method.new list_scope_namespaces_config + get_scope_rbac_role_binding_config = parent_rpcs.get_scope_rbac_role_binding if parent_rpcs.respond_to? :get_scope_rbac_role_binding + @get_scope_rbac_role_binding = ::Gapic::Config::Method.new get_scope_rbac_role_binding_config + create_scope_rbac_role_binding_config = parent_rpcs.create_scope_rbac_role_binding if parent_rpcs.respond_to? :create_scope_rbac_role_binding + @create_scope_rbac_role_binding = ::Gapic::Config::Method.new create_scope_rbac_role_binding_config + update_scope_rbac_role_binding_config = parent_rpcs.update_scope_rbac_role_binding if parent_rpcs.respond_to? :update_scope_rbac_role_binding + @update_scope_rbac_role_binding = ::Gapic::Config::Method.new update_scope_rbac_role_binding_config + delete_scope_rbac_role_binding_config = parent_rpcs.delete_scope_rbac_role_binding if parent_rpcs.respond_to? :delete_scope_rbac_role_binding + @delete_scope_rbac_role_binding = ::Gapic::Config::Method.new delete_scope_rbac_role_binding_config + list_scope_rbac_role_bindings_config = parent_rpcs.list_scope_rbac_role_bindings if parent_rpcs.respond_to? :list_scope_rbac_role_bindings + @list_scope_rbac_role_bindings = ::Gapic::Config::Method.new list_scope_rbac_role_bindings_config + get_scope_config = parent_rpcs.get_scope if parent_rpcs.respond_to? :get_scope + @get_scope = ::Gapic::Config::Method.new get_scope_config + create_scope_config = parent_rpcs.create_scope if parent_rpcs.respond_to? :create_scope + @create_scope = ::Gapic::Config::Method.new create_scope_config + update_scope_config = parent_rpcs.update_scope if parent_rpcs.respond_to? :update_scope + @update_scope = ::Gapic::Config::Method.new update_scope_config + delete_scope_config = parent_rpcs.delete_scope if parent_rpcs.respond_to? :delete_scope + @delete_scope = ::Gapic::Config::Method.new delete_scope_config + list_scopes_config = parent_rpcs.list_scopes if parent_rpcs.respond_to? :list_scopes + @list_scopes = ::Gapic::Config::Method.new list_scopes_config + list_permitted_scopes_config = parent_rpcs.list_permitted_scopes if parent_rpcs.respond_to? :list_permitted_scopes + @list_permitted_scopes = ::Gapic::Config::Method.new list_permitted_scopes_config + get_membership_binding_config = parent_rpcs.get_membership_binding if parent_rpcs.respond_to? :get_membership_binding + @get_membership_binding = ::Gapic::Config::Method.new get_membership_binding_config + create_membership_binding_config = parent_rpcs.create_membership_binding if parent_rpcs.respond_to? :create_membership_binding + @create_membership_binding = ::Gapic::Config::Method.new create_membership_binding_config + update_membership_binding_config = parent_rpcs.update_membership_binding if parent_rpcs.respond_to? :update_membership_binding + @update_membership_binding = ::Gapic::Config::Method.new update_membership_binding_config + delete_membership_binding_config = parent_rpcs.delete_membership_binding if parent_rpcs.respond_to? :delete_membership_binding + @delete_membership_binding = ::Gapic::Config::Method.new delete_membership_binding_config + list_membership_bindings_config = parent_rpcs.list_membership_bindings if parent_rpcs.respond_to? :list_membership_bindings + @list_membership_bindings = ::Gapic::Config::Method.new list_membership_bindings_config + get_membership_rbac_role_binding_config = parent_rpcs.get_membership_rbac_role_binding if parent_rpcs.respond_to? :get_membership_rbac_role_binding + @get_membership_rbac_role_binding = ::Gapic::Config::Method.new get_membership_rbac_role_binding_config + create_membership_rbac_role_binding_config = parent_rpcs.create_membership_rbac_role_binding if parent_rpcs.respond_to? :create_membership_rbac_role_binding + @create_membership_rbac_role_binding = ::Gapic::Config::Method.new create_membership_rbac_role_binding_config + update_membership_rbac_role_binding_config = parent_rpcs.update_membership_rbac_role_binding if parent_rpcs.respond_to? :update_membership_rbac_role_binding + @update_membership_rbac_role_binding = ::Gapic::Config::Method.new update_membership_rbac_role_binding_config + delete_membership_rbac_role_binding_config = parent_rpcs.delete_membership_rbac_role_binding if parent_rpcs.respond_to? :delete_membership_rbac_role_binding + @delete_membership_rbac_role_binding = ::Gapic::Config::Method.new delete_membership_rbac_role_binding_config + list_membership_rbac_role_bindings_config = parent_rpcs.list_membership_rbac_role_bindings if parent_rpcs.respond_to? :list_membership_rbac_role_bindings + @list_membership_rbac_role_bindings = ::Gapic::Config::Method.new list_membership_rbac_role_bindings_config + generate_membership_rbac_role_binding_yaml_config = parent_rpcs.generate_membership_rbac_role_binding_yaml if parent_rpcs.respond_to? :generate_membership_rbac_role_binding_yaml + @generate_membership_rbac_role_binding_yaml = ::Gapic::Config::Method.new generate_membership_rbac_role_binding_yaml_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub/rest/operations.rb b/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub/rest/operations.rb new file mode 100644 index 000000000000..88effee52dde --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub/rest/operations.rb @@ -0,0 +1,925 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/operation" + +module Google + module Cloud + module GkeHub + module V1 + module GkeHub + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "gkehub.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the GkeHub Operations API. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def self.configure + @configure ||= Operations::Configuration.new + yield @configure if block_given? + @configure + end + + ## + # Configure the GkeHub Operations 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 {Operations.configure}. + # + # @yield [config] Configure the Operations client. + # @yieldparam config [Operations::Configuration] + # + # @return [Operations::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @operations_stub.universe_domain + end + + ## + # Create a new Operations client object. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Operations::Configuration] + # + def initialize + # Create the configuration object + @config = Configuration.new Operations.configure + + # Yield the configuration if needed + yield @config if block_given? + + # Create credentials + credentials = @config.credentials + credentials ||= Credentials.default scope: @config.scope + 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 + + @operations_stub = OperationsServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials + ) + + # Used by an LRO wrapper for some methods of this service + @operations_client = self + end + + # Service calls + + ## + # Lists operations that match the specified filter in the request. If the + # server doesn't support this method, it returns `UNIMPLEMENTED`. + # + # @overload list_operations(request, options = nil) + # Pass arguments to `list_operations` via a request object, either of type + # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::ListOperationsRequest, ::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_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) + # Pass arguments to `list_operations` 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] + # The name of the operation's parent resource. + # @param filter [::String] + # The standard list filter. + # @param page_size [::Integer] + # The standard list page size. + # @param page_token [::String] + # The standard list page token. + # @param return_partial_success [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::ListOperationsRequest.new + # + # # Call the list_operations method. + # result = client.list_operations 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::Longrunning::Operation. + # p item + # end + # + def list_operations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest + + # 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_operations.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::GkeHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_operations.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_operations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.list_operations request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the latest state of a long-running operation. Clients can use this + # method to poll the operation result at intervals as recommended by the API + # service. + # + # @overload get_operation(request, options = nil) + # Pass arguments to `get_operation` via a request object, either of type + # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::GetOperationRequest, ::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_operation(name: nil) + # Pass arguments to `get_operation` 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] + # The name of the operation resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::GetOperationRequest.new + # + # # Call the get_operation method. + # result = client.get_operation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def get_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest + + # 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_operation.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::GkeHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.get_operation request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 a long-running operation. This method indicates that the client is + # no longer interested in the operation result. It does not cancel the + # operation. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. + # + # @overload delete_operation(request, options = nil) + # Pass arguments to `delete_operation` via a request object, either of type + # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::DeleteOperationRequest, ::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_operation(name: nil) + # Pass arguments to `delete_operation` 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] + # The name of the operation resource to be deleted. + # @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/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::DeleteOperationRequest.new + # + # # Call the delete_operation method. + # result = client.delete_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest + + # 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_operation.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::GkeHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.delete_operation 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 + + ## + # Starts asynchronous cancellation on a long-running operation. The server + # makes a best effort to cancel the operation, but success is not + # guaranteed. If the server doesn't support this method, it returns + # `google.rpc.Code.UNIMPLEMENTED`. Clients can use + # Operations.GetOperation or + # other methods to check whether the cancellation succeeded or whether the + # operation completed despite cancellation. On successful cancellation, + # the operation is not deleted; instead, it becomes an operation with + # an {::Google::Longrunning::Operation#error Operation.error} value with a + # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to + # `Code.CANCELLED`. + # + # @overload cancel_operation(request, options = nil) + # Pass arguments to `cancel_operation` via a request object, either of type + # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. + # + # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload cancel_operation(name: nil) + # Pass arguments to `cancel_operation` 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] + # The name of the operation resource to be cancelled. + # @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/longrunning" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Longrunning::Operations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Longrunning::CancelOperationRequest.new + # + # # Call the cancel_operation method. + # result = client.cancel_operation request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def cancel_operation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.cancel_operation.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::GkeHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.cancel_operation 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 Operations REST API. + # + # This class represents the configuration for Operations 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::Longrunning::Operations::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.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. + # * `: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 = "gkehub.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the Operations 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. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + + yield self if block_given? + end + end + end + end + + ## + # @private + # REST service stub for the Longrunning Operations API. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + class OperationsServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # 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 + end + + ## + # Baseline implementation for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # 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::Longrunning::ListOperationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::ListOperationsResponse] + # A result object deserialized from the server's reply + def list_operations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_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_operations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::ListOperationsResponse.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_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def get_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_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_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # 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_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_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_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # 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 cancel_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "cancel_operation", + 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 list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # 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_operations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # 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_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # 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_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_cancel_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub/rest/service_stub.rb b/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub/rest/service_stub.rb new file mode 100644 index 000000000000..b86f38e328bc --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub/rest/service_stub.rb @@ -0,0 +1,2789 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/gkehub/v1/service_pb" + +module Google + module Cloud + module GkeHub + module V1 + module GkeHub + module Rest + ## + # REST service stub for the GkeHub service. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + # + class ServiceStub + # @private + def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials, + numeric_enums: true, + service_name: self.class, + raise_faraday_errors: false, + logger: logger + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @client_stub.universe_domain + end + + ## + # The effective endpoint + # + # @return [String] + # + def endpoint + @client_stub.endpoint + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger stub: false + stub ? @client_stub.stub_logger : @client_stub.logger + end + + ## + # Baseline implementation for the list_memberships REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::ListMembershipsRequest] + # 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::GkeHub::V1::ListMembershipsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GkeHub::V1::ListMembershipsResponse] + # A result object deserialized from the server's reply + def list_memberships request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_memberships_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_memberships", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::GkeHub::V1::ListMembershipsResponse.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_bound_memberships REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::ListBoundMembershipsRequest] + # 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::GkeHub::V1::ListBoundMembershipsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GkeHub::V1::ListBoundMembershipsResponse] + # A result object deserialized from the server's reply + def list_bound_memberships request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_bound_memberships_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_bound_memberships", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::GkeHub::V1::ListBoundMembershipsResponse.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_features REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::ListFeaturesRequest] + # 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::GkeHub::V1::ListFeaturesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GkeHub::V1::ListFeaturesResponse] + # A result object deserialized from the server's reply + def list_features request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_features_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_features", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::GkeHub::V1::ListFeaturesResponse.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_membership REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::GetMembershipRequest] + # 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::GkeHub::V1::Membership] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GkeHub::V1::Membership] + # A result object deserialized from the server's reply + def get_membership request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_membership_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_membership", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::GkeHub::V1::Membership.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_feature REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::GetFeatureRequest] + # 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::GkeHub::V1::Feature] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GkeHub::V1::Feature] + # A result object deserialized from the server's reply + def get_feature request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_feature_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_feature", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::GkeHub::V1::Feature.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_membership REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::CreateMembershipRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_membership request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_membership_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_membership", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_feature REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::CreateFeatureRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_feature request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_feature_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_feature", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_membership REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::DeleteMembershipRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_membership request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_membership_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_membership", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_feature REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::DeleteFeatureRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_feature request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_feature_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_feature", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_membership REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::UpdateMembershipRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_membership request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_membership_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_membership", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_feature REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::UpdateFeatureRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_feature request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_feature_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_feature", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the generate_connect_manifest REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::GenerateConnectManifestRequest] + # 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::GkeHub::V1::GenerateConnectManifestResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GkeHub::V1::GenerateConnectManifestResponse] + # A result object deserialized from the server's reply + def generate_connect_manifest request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_generate_connect_manifest_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: "generate_connect_manifest", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::GkeHub::V1::GenerateConnectManifestResponse.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_fleet REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::CreateFleetRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_fleet request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_fleet_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_fleet", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_fleet REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::GetFleetRequest] + # 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::GkeHub::V1::Fleet] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GkeHub::V1::Fleet] + # A result object deserialized from the server's reply + def get_fleet request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_fleet_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_fleet", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::GkeHub::V1::Fleet.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_fleet REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::UpdateFleetRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_fleet request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_fleet_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_fleet", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_fleet REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::DeleteFleetRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_fleet request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_fleet_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_fleet", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_fleets REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::ListFleetsRequest] + # 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::GkeHub::V1::ListFleetsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GkeHub::V1::ListFleetsResponse] + # A result object deserialized from the server's reply + def list_fleets request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_fleets_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_fleets", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::GkeHub::V1::ListFleetsResponse.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_scope_namespace REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::GetScopeNamespaceRequest] + # 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::GkeHub::V1::Namespace] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GkeHub::V1::Namespace] + # A result object deserialized from the server's reply + def get_scope_namespace request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_scope_namespace_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_scope_namespace", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::GkeHub::V1::Namespace.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_scope_namespace REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::CreateScopeNamespaceRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_scope_namespace request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_scope_namespace_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_scope_namespace", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_scope_namespace REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::UpdateScopeNamespaceRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_scope_namespace request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_scope_namespace_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_scope_namespace", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_scope_namespace REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::DeleteScopeNamespaceRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_scope_namespace request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_scope_namespace_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_scope_namespace", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_scope_namespaces REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::ListScopeNamespacesRequest] + # 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::GkeHub::V1::ListScopeNamespacesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GkeHub::V1::ListScopeNamespacesResponse] + # A result object deserialized from the server's reply + def list_scope_namespaces request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_scope_namespaces_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_scope_namespaces", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::GkeHub::V1::ListScopeNamespacesResponse.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_scope_rbac_role_binding REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::GetScopeRBACRoleBindingRequest] + # 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::GkeHub::V1::RBACRoleBinding] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GkeHub::V1::RBACRoleBinding] + # A result object deserialized from the server's reply + def get_scope_rbac_role_binding request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_scope_rbac_role_binding_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_scope_rbac_role_binding", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::GkeHub::V1::RBACRoleBinding.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_scope_rbac_role_binding REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::CreateScopeRBACRoleBindingRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_scope_rbac_role_binding request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_scope_rbac_role_binding_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_scope_rbac_role_binding", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_scope_rbac_role_binding REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::UpdateScopeRBACRoleBindingRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_scope_rbac_role_binding request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_scope_rbac_role_binding_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_scope_rbac_role_binding", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_scope_rbac_role_binding REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::DeleteScopeRBACRoleBindingRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_scope_rbac_role_binding request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_scope_rbac_role_binding_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_scope_rbac_role_binding", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_scope_rbac_role_bindings REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::ListScopeRBACRoleBindingsRequest] + # 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::GkeHub::V1::ListScopeRBACRoleBindingsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GkeHub::V1::ListScopeRBACRoleBindingsResponse] + # A result object deserialized from the server's reply + def list_scope_rbac_role_bindings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_scope_rbac_role_bindings_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_scope_rbac_role_bindings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::GkeHub::V1::ListScopeRBACRoleBindingsResponse.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_scope REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::GetScopeRequest] + # 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::GkeHub::V1::Scope] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GkeHub::V1::Scope] + # A result object deserialized from the server's reply + def get_scope request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_scope_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_scope", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::GkeHub::V1::Scope.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_scope REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::CreateScopeRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_scope request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_scope_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_scope", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_scope REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::UpdateScopeRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_scope request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_scope_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_scope", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_scope REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::DeleteScopeRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_scope request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_scope_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_scope", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_scopes REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::ListScopesRequest] + # 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::GkeHub::V1::ListScopesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GkeHub::V1::ListScopesResponse] + # A result object deserialized from the server's reply + def list_scopes request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_scopes_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_scopes", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::GkeHub::V1::ListScopesResponse.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_permitted_scopes REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::ListPermittedScopesRequest] + # 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::GkeHub::V1::ListPermittedScopesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GkeHub::V1::ListPermittedScopesResponse] + # A result object deserialized from the server's reply + def list_permitted_scopes request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_permitted_scopes_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_permitted_scopes", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::GkeHub::V1::ListPermittedScopesResponse.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_membership_binding REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::GetMembershipBindingRequest] + # 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::GkeHub::V1::MembershipBinding] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GkeHub::V1::MembershipBinding] + # A result object deserialized from the server's reply + def get_membership_binding request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_membership_binding_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_membership_binding", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::GkeHub::V1::MembershipBinding.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_membership_binding REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::CreateMembershipBindingRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_membership_binding request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_membership_binding_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_membership_binding", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_membership_binding REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::UpdateMembershipBindingRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_membership_binding request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_membership_binding_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_membership_binding", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_membership_binding REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::DeleteMembershipBindingRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_membership_binding request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_membership_binding_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_membership_binding", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_membership_bindings REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::ListMembershipBindingsRequest] + # 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::GkeHub::V1::ListMembershipBindingsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GkeHub::V1::ListMembershipBindingsResponse] + # A result object deserialized from the server's reply + def list_membership_bindings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_membership_bindings_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_membership_bindings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::GkeHub::V1::ListMembershipBindingsResponse.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_membership_rbac_role_binding REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::GetMembershipRBACRoleBindingRequest] + # 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::GkeHub::V1::RBACRoleBinding] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GkeHub::V1::RBACRoleBinding] + # A result object deserialized from the server's reply + def get_membership_rbac_role_binding request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_membership_rbac_role_binding_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_membership_rbac_role_binding", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::GkeHub::V1::RBACRoleBinding.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_membership_rbac_role_binding REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::CreateMembershipRBACRoleBindingRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_membership_rbac_role_binding request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_membership_rbac_role_binding_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_membership_rbac_role_binding", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_membership_rbac_role_binding REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::UpdateMembershipRBACRoleBindingRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_membership_rbac_role_binding request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_membership_rbac_role_binding_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_membership_rbac_role_binding", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_membership_rbac_role_binding REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::DeleteMembershipRBACRoleBindingRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_membership_rbac_role_binding request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_membership_rbac_role_binding_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_membership_rbac_role_binding", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_membership_rbac_role_bindings REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::ListMembershipRBACRoleBindingsRequest] + # 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::GkeHub::V1::ListMembershipRBACRoleBindingsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GkeHub::V1::ListMembershipRBACRoleBindingsResponse] + # A result object deserialized from the server's reply + def list_membership_rbac_role_bindings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_membership_rbac_role_bindings_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_membership_rbac_role_bindings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::GkeHub::V1::ListMembershipRBACRoleBindingsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the generate_membership_rbac_role_binding_yaml REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::GenerateMembershipRBACRoleBindingYAMLRequest] + # 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::GkeHub::V1::GenerateMembershipRBACRoleBindingYAMLResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GkeHub::V1::GenerateMembershipRBACRoleBindingYAMLResponse] + # A result object deserialized from the server's reply + def generate_membership_rbac_role_binding_yaml request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_generate_membership_rbac_role_binding_yaml_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: "generate_membership_rbac_role_binding_yaml", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::GkeHub::V1::GenerateMembershipRBACRoleBindingYAMLResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_memberships REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::ListMembershipsRequest] + # 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_memberships_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/memberships", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_bound_memberships REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::ListBoundMembershipsRequest] + # 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_bound_memberships_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{scope_name}:listMemberships", + matches: [ + ["scope_name", %r{^projects/[^/]+/locations/[^/]+/scopes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_features REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::ListFeaturesRequest] + # 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_features_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/features", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_membership REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::GetMembershipRequest] + # 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_membership_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/memberships/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_feature REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::GetFeatureRequest] + # 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_feature_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/features/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_membership REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::CreateMembershipRequest] + # 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_membership_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/memberships", + body: "resource", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_feature REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::CreateFeatureRequest] + # 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_feature_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/features", + body: "resource", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_membership REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::DeleteMembershipRequest] + # 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_membership_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/memberships/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_feature REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::DeleteFeatureRequest] + # 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_feature_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/features/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_membership REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::UpdateMembershipRequest] + # 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_membership_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{name}", + body: "resource", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/memberships/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_feature REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::UpdateFeatureRequest] + # 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_feature_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{name}", + body: "resource", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/features/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the generate_connect_manifest REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::GenerateConnectManifestRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_generate_connect_manifest_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}:generateConnectManifest", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/memberships/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_fleet REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::CreateFleetRequest] + # 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_fleet_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/fleets", + body: "fleet", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_fleet REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::GetFleetRequest] + # 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_fleet_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/fleets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_fleet REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::UpdateFleetRequest] + # 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_fleet_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{fleet.name}", + body: "fleet", + matches: [ + ["fleet.name", %r{^projects/[^/]+/locations/[^/]+/fleets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_fleet REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::DeleteFleetRequest] + # 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_fleet_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/fleets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_fleets REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::ListFleetsRequest] + # 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_fleets_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/fleets", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/fleets", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_scope_namespace REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::GetScopeNamespaceRequest] + # 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_scope_namespace_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/scopes/[^/]+/namespaces/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_scope_namespace REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::CreateScopeNamespaceRequest] + # 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_scope_namespace_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/namespaces", + body: "scope_namespace", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/scopes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_scope_namespace REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::UpdateScopeNamespaceRequest] + # 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_scope_namespace_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{scope_namespace.name}", + body: "scope_namespace", + matches: [ + ["scope_namespace.name", %r{^projects/[^/]+/locations/[^/]+/scopes/[^/]+/namespaces/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_scope_namespace REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::DeleteScopeNamespaceRequest] + # 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_scope_namespace_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/scopes/[^/]+/namespaces/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_scope_namespaces REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::ListScopeNamespacesRequest] + # 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_scope_namespaces_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/namespaces", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/scopes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_scope_rbac_role_binding REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::GetScopeRBACRoleBindingRequest] + # 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_scope_rbac_role_binding_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/scopes/[^/]+/rbacrolebindings/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_scope_rbac_role_binding REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::CreateScopeRBACRoleBindingRequest] + # 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_scope_rbac_role_binding_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/rbacrolebindings", + body: "rbacrolebinding", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/scopes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_scope_rbac_role_binding REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::UpdateScopeRBACRoleBindingRequest] + # 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_scope_rbac_role_binding_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{rbacrolebinding.name}", + body: "rbacrolebinding", + matches: [ + ["rbacrolebinding.name", %r{^projects/[^/]+/locations/[^/]+/scopes/[^/]+/rbacrolebindings/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_scope_rbac_role_binding REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::DeleteScopeRBACRoleBindingRequest] + # 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_scope_rbac_role_binding_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/scopes/[^/]+/rbacrolebindings/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_scope_rbac_role_bindings REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::ListScopeRBACRoleBindingsRequest] + # 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_scope_rbac_role_bindings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/rbacrolebindings", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/scopes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_scope REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::GetScopeRequest] + # 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_scope_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/scopes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_scope REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::CreateScopeRequest] + # 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_scope_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/scopes", + body: "scope", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_scope REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::UpdateScopeRequest] + # 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_scope_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{scope.name}", + body: "scope", + matches: [ + ["scope.name", %r{^projects/[^/]+/locations/[^/]+/scopes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_scope REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::DeleteScopeRequest] + # 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_scope_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/scopes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_scopes REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::ListScopesRequest] + # 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_scopes_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/scopes", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_permitted_scopes REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::ListPermittedScopesRequest] + # 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_permitted_scopes_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/scopes:listPermitted", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_membership_binding REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::GetMembershipBindingRequest] + # 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_membership_binding_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/memberships/[^/]+/bindings/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_membership_binding REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::CreateMembershipBindingRequest] + # 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_membership_binding_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/bindings", + body: "membership_binding", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/memberships/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_membership_binding REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::UpdateMembershipBindingRequest] + # 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_membership_binding_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{membership_binding.name}", + body: "membership_binding", + matches: [ + ["membership_binding.name", %r{^projects/[^/]+/locations/[^/]+/memberships/[^/]+/bindings/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_membership_binding REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::DeleteMembershipBindingRequest] + # 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_membership_binding_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/memberships/[^/]+/bindings/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_membership_bindings REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::ListMembershipBindingsRequest] + # 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_membership_bindings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/bindings", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/memberships/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_membership_rbac_role_binding REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::GetMembershipRBACRoleBindingRequest] + # 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_membership_rbac_role_binding_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/memberships/[^/]+/rbacrolebindings/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_membership_rbac_role_binding REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::CreateMembershipRBACRoleBindingRequest] + # 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_membership_rbac_role_binding_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/rbacrolebindings", + body: "rbacrolebinding", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/memberships/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_membership_rbac_role_binding REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::UpdateMembershipRBACRoleBindingRequest] + # 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_membership_rbac_role_binding_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{rbacrolebinding.name}", + body: "rbacrolebinding", + matches: [ + ["rbacrolebinding.name", %r{^projects/[^/]+/locations/[^/]+/memberships/[^/]+/rbacrolebindings/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_membership_rbac_role_binding REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::DeleteMembershipRBACRoleBindingRequest] + # 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_membership_rbac_role_binding_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/memberships/[^/]+/rbacrolebindings/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_membership_rbac_role_bindings REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::ListMembershipRBACRoleBindingsRequest] + # 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_membership_rbac_role_bindings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/rbacrolebindings", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/memberships/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the generate_membership_rbac_role_binding_yaml REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::GenerateMembershipRBACRoleBindingYAMLRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_generate_membership_rbac_role_binding_yaml_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/rbacrolebindings:generateMembershipRBACRoleBindingYAML", + body: "rbacrolebinding", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/memberships/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/rest.rb b/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/rest.rb new file mode 100644 index 000000000000..dc0e8e79c2b7 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/rest.rb @@ -0,0 +1,37 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/gke_hub/v1/gke_hub/rest" +require "google/cloud/gke_hub/v1/version" + +module Google + module Cloud + module GkeHub + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/gke_hub/v1/rest" + # client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new + # + module V1 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/version.rb b/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/version.rb new file mode 100644 index 000000000000..a193866d415f --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/version.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module GkeHub + module V1 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gkehub/v1/feature_pb.rb b/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gkehub/v1/feature_pb.rb new file mode 100644 index 000000000000..b7bc160f35dd --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gkehub/v1/feature_pb.rb @@ -0,0 +1,63 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/gkehub/v1/feature.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/gkehub/v1/configmanagement/configmanagement_pb' +require 'google/cloud/gkehub/v1/multiclusteringress/multiclusteringress_pb' +require 'google/cloud/gkehub/v1/rbacrolebindingactuation/rbacrolebindingactuation_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n$google/cloud/gkehub/v1/feature.proto\x12\x16google.cloud.gkehub.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a>google/cloud/gkehub/v1/configmanagement/configmanagement.proto\x1a\x44google/cloud/gkehub/v1/multiclusteringress/multiclusteringress.proto\x1aNgoogle/cloud/gkehub/v1/rbacrolebindingactuation/rbacrolebindingactuation.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xbd\n\n\x07\x46\x65\x61ture\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12;\n\x06labels\x18\x02 \x03(\x0b\x32+.google.cloud.gkehub.v1.Feature.LabelsEntry\x12I\n\x0eresource_state\x18\x03 \x01(\x0b\x32,.google.cloud.gkehub.v1.FeatureResourceStateB\x03\xe0\x41\x03\x12<\n\x04spec\x18\x04 \x01(\x0b\x32).google.cloud.gkehub.v1.CommonFeatureSpecB\x03\xe0\x41\x01\x12S\n\x10membership_specs\x18\x05 \x03(\x0b\x32\x34.google.cloud.gkehub.v1.Feature.MembershipSpecsEntryB\x03\xe0\x41\x01\x12>\n\x05state\x18\x06 \x01(\x0b\x32*.google.cloud.gkehub.v1.CommonFeatureStateB\x03\xe0\x41\x03\x12U\n\x11membership_states\x18\x07 \x03(\x0b\x32\x35.google.cloud.gkehub.v1.Feature.MembershipStatesEntryB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x64\x65lete_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12I\n\x0bscope_specs\x18\x0c \x03(\x0b\x32/.google.cloud.gkehub.v1.Feature.ScopeSpecsEntryB\x03\xe0\x41\x01\x12K\n\x0cscope_states\x18\r \x03(\x0b\x32\x30.google.cloud.gkehub.v1.Feature.ScopeStatesEntryB\x03\xe0\x41\x03\x12\x18\n\x0bunreachable\x18\x0f \x03(\tB\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x65\n\x14MembershipSpecsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12<\n\x05value\x18\x02 \x01(\x0b\x32-.google.cloud.gkehub.v1.MembershipFeatureSpec:\x02\x38\x01\x1ag\n\x15MembershipStatesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12=\n\x05value\x18\x02 \x01(\x0b\x32..google.cloud.gkehub.v1.MembershipFeatureState:\x02\x38\x01\x1a[\n\x0fScopeSpecsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x37\n\x05value\x18\x02 \x01(\x0b\x32(.google.cloud.gkehub.v1.ScopeFeatureSpec:\x02\x38\x01\x1a]\n\x10ScopeStatesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x38\n\x05value\x18\x02 \x01(\x0b\x32).google.cloud.gkehub.v1.ScopeFeatureState:\x02\x38\x01:^\xea\x41[\n\x1dgkehub.googleapis.com/Feature\x12:projects/{project}/locations/{location}/features/{feature}\"\xc6\x01\n\x14\x46\x65\x61tureResourceState\x12\x41\n\x05state\x18\x01 \x01(\x0e\x32\x32.google.cloud.gkehub.v1.FeatureResourceState.State\"k\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x45NABLING\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\r\n\tDISABLING\x10\x03\x12\x0c\n\x08UPDATING\x10\x04\x12\x14\n\x10SERVICE_UPDATING\x10\x05\"\xcb\x01\n\x0c\x46\x65\x61tureState\x12\x37\n\x04\x63ode\x18\x01 \x01(\x0e\x32).google.cloud.gkehub.v1.FeatureState.Code\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12/\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"<\n\x04\x43ode\x12\x14\n\x10\x43ODE_UNSPECIFIED\x10\x00\x12\x06\n\x02OK\x10\x01\x12\x0b\n\x07WARNING\x10\x02\x12\t\n\x05\x45RROR\x10\x03\"{\n\x11\x43ommonFeatureSpec\x12V\n\x13multiclusteringress\x18\x66 \x01(\x0b\x32\x37.google.cloud.gkehub.multiclusteringress.v1.FeatureSpecH\x00\x42\x0e\n\x0c\x66\x65\x61ture_spec\"\xc2\x01\n\x12\x43ommonFeatureState\x12\x61\n\x18rbacrolebindingactuation\x18x \x01(\x0b\x32=.google.cloud.gkehub.rbacrolebindingactuation.v1.FeatureStateH\x00\x12\x38\n\x05state\x18\x01 \x01(\x0b\x32$.google.cloud.gkehub.v1.FeatureStateB\x03\xe0\x41\x03\x42\x0f\n\rfeature_state\"\x12\n\x10ScopeFeatureSpec\"M\n\x11ScopeFeatureState\x12\x38\n\x05state\x18\x01 \x01(\x0b\x32$.google.cloud.gkehub.v1.FeatureStateB\x03\xe0\x41\x03\"|\n\x15MembershipFeatureSpec\x12S\n\x10\x63onfigmanagement\x18j \x01(\x0b\x32\x37.google.cloud.gkehub.configmanagement.v1.MembershipSpecH\x00\x42\x0e\n\x0c\x66\x65\x61ture_spec\"\xb4\x01\n\x16MembershipFeatureState\x12T\n\x10\x63onfigmanagement\x18j \x01(\x0b\x32\x38.google.cloud.gkehub.configmanagement.v1.MembershipStateH\x00\x12\x33\n\x05state\x18\x01 \x01(\x0b\x32$.google.cloud.gkehub.v1.FeatureStateB\x0f\n\rfeature_stateB\xae\x01\n\x1a\x63om.google.cloud.gkehub.v1B\x0c\x46\x65\x61tureProtoP\x01Z2cloud.google.com/go/gkehub/apiv1/gkehubpb;gkehubpb\xaa\x02\x16Google.Cloud.GkeHub.V1\xca\x02\x16Google\\Cloud\\GkeHub\\V1\xea\x02\x19Google::Cloud::GkeHub::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ["google.cloud.gkehub.multiclusteringress.v1.FeatureSpec", "google/cloud/gkehub/v1/multiclusteringress/multiclusteringress.proto"], + ["google.cloud.gkehub.rbacrolebindingactuation.v1.FeatureState", "google/cloud/gkehub/v1/rbacrolebindingactuation/rbacrolebindingactuation.proto"], + ["google.cloud.gkehub.configmanagement.v1.MembershipSpec", "google/cloud/gkehub/v1/configmanagement/configmanagement.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module GkeHub + module V1 + Feature = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.Feature").msgclass + FeatureResourceState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.FeatureResourceState").msgclass + FeatureResourceState::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.FeatureResourceState.State").enummodule + FeatureState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.FeatureState").msgclass + FeatureState::Code = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.FeatureState.Code").enummodule + CommonFeatureSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.CommonFeatureSpec").msgclass + CommonFeatureState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.CommonFeatureState").msgclass + ScopeFeatureSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.ScopeFeatureSpec").msgclass + ScopeFeatureState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.ScopeFeatureState").msgclass + MembershipFeatureSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.MembershipFeatureSpec").msgclass + MembershipFeatureState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.MembershipFeatureState").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gkehub/v1/fleet_pb.rb b/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gkehub/v1/fleet_pb.rb new file mode 100644 index 000000000000..e76a78ad93f6 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gkehub/v1/fleet_pb.rb @@ -0,0 +1,73 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/gkehub/v1/fleet.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n\"google/cloud/gkehub/v1/fleet.proto\x12\x16google.cloud.gkehub.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x8a\x05\n\x05\x46leet\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x64\x65lete_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x10\n\x03uid\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12?\n\x05state\x18\t \x01(\x0b\x32+.google.cloud.gkehub.v1.FleetLifecycleStateB\x03\xe0\x41\x03\x12Q\n\x16\x64\x65\x66\x61ult_cluster_config\x18\n \x01(\x0b\x32,.google.cloud.gkehub.v1.DefaultClusterConfigB\x03\xe0\x41\x01\x12>\n\x06labels\x18\x0b \x03(\x0b\x32).google.cloud.gkehub.v1.Fleet.LabelsEntryB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x9b\x01\xea\x41\x97\x01\n\x1bgkehub.googleapis.com/Fleet\x12\x36projects/{project}/locations/{location}/fleets/{fleet}\x12@organizations/{organization}/locations/{location}/fleets/{fleet}\"\x9c\x02\n\x14\x44\x65\x66\x61ultClusterConfig\x12N\n\x17security_posture_config\x18\x01 \x01(\x0b\x32-.google.cloud.gkehub.v1.SecurityPostureConfig\x12[\n\x1b\x62inary_authorization_config\x18\x02 \x01(\x0b\x32\x31.google.cloud.gkehub.v1.BinaryAuthorizationConfigB\x03\xe0\x41\x01\x12W\n\x19\x63ompliance_posture_config\x18\x03 \x01(\x0b\x32/.google.cloud.gkehub.v1.CompliancePostureConfigB\x03\xe0\x41\x01\"\x8a\x03\n\x15SecurityPostureConfig\x12@\n\x04mode\x18\x01 \x01(\x0e\x32\x32.google.cloud.gkehub.v1.SecurityPostureConfig.Mode\x12[\n\x12vulnerability_mode\x18\x02 \x01(\x0e\x32?.google.cloud.gkehub.v1.SecurityPostureConfig.VulnerabilityMode\"E\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\t\n\x05\x42\x41SIC\x10\x02\x12\x0e\n\nENTERPRISE\x10\x03\"\x8a\x01\n\x11VulnerabilityMode\x12\"\n\x1eVULNERABILITY_MODE_UNSPECIFIED\x10\x00\x12\x1a\n\x16VULNERABILITY_DISABLED\x10\x01\x12\x17\n\x13VULNERABILITY_BASIC\x10\x02\x12\x1c\n\x18VULNERABILITY_ENTERPRISE\x10\x03\"\xcf\x02\n\x19\x42inaryAuthorizationConfig\x12^\n\x0f\x65valuation_mode\x18\x01 \x01(\x0e\x32@.google.cloud.gkehub.v1.BinaryAuthorizationConfig.EvaluationModeB\x03\xe0\x41\x01\x12]\n\x0fpolicy_bindings\x18\x02 \x03(\x0b\x32?.google.cloud.gkehub.v1.BinaryAuthorizationConfig.PolicyBindingB\x03\xe0\x41\x01\x1a\x1d\n\rPolicyBinding\x12\x0c\n\x04name\x18\x01 \x01(\t\"T\n\x0e\x45valuationMode\x12\x1f\n\x1b\x45VALUATION_MODE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\x13\n\x0fPOLICY_BINDINGS\x10\x02\"\xa0\x02\n\x17\x43ompliancePostureConfig\x12\x42\n\x04mode\x18\x01 \x01(\x0e\x32\x34.google.cloud.gkehub.v1.CompliancePostureConfig.Mode\x12`\n\x14\x63ompliance_standards\x18\x02 \x03(\x0b\x32\x42.google.cloud.gkehub.v1.CompliancePostureConfig.ComplianceStandard\x1a&\n\x12\x43omplianceStandard\x12\x10\n\x08standard\x18\x01 \x01(\t\"7\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x44ISABLED\x10\x01\x12\x0b\n\x07\x45NABLED\x10\x02\"\xad\x01\n\x13\x46leetLifecycleState\x12\x43\n\x04\x63ode\x18\x01 \x01(\x0e\x32\x30.google.cloud.gkehub.v1.FleetLifecycleState.CodeB\x03\xe0\x41\x03\"Q\n\x04\x43ode\x12\x14\n\x10\x43ODE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\t\n\x05READY\x10\x02\x12\x0c\n\x08\x44\x45LETING\x10\x03\x12\x0c\n\x08UPDATING\x10\x04\"\xbd\x05\n\tNamespace\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x64\x65lete_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x43\n\x05state\x18\x06 \x01(\x0b\x32/.google.cloud.gkehub.v1.NamespaceLifecycleStateB\x03\xe0\x41\x03\x12\x32\n\x05scope\x18\x08 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1bgkehub.googleapis.com/Scope\x12U\n\x10namespace_labels\x18\t \x03(\x0b\x32\x36.google.cloud.gkehub.v1.Namespace.NamespaceLabelsEntryB\x03\xe0\x41\x01\x12\x42\n\x06labels\x18\n \x03(\x0b\x32-.google.cloud.gkehub.v1.Namespace.LabelsEntryB\x03\xe0\x41\x01\x1a\x36\n\x14NamespaceLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:s\xea\x41p\n\x1fgkehub.googleapis.com/Namespace\x12Mprojects/{project}/locations/{location}/scopes/{scope}/namespaces/{namespace}\"\xb5\x01\n\x17NamespaceLifecycleState\x12G\n\x04\x63ode\x18\x01 \x01(\x0e\x32\x34.google.cloud.gkehub.v1.NamespaceLifecycleState.CodeB\x03\xe0\x41\x03\"Q\n\x04\x43ode\x12\x14\n\x10\x43ODE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\t\n\x05READY\x10\x02\x12\x0c\n\x08\x44\x45LETING\x10\x03\x12\x0c\n\x08UPDATING\x10\x04\"\xc1\x07\n\x0fRBACRoleBinding\x12\x0e\n\x04user\x18\x07 \x01(\tH\x00\x12\x0f\n\x05group\x18\x08 \x01(\tH\x00\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x64\x65lete_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12I\n\x05state\x18\x06 \x01(\x0b\x32\x35.google.cloud.gkehub.v1.RBACRoleBindingLifecycleStateB\x03\xe0\x41\x03\x12?\n\x04role\x18\t \x01(\x0b\x32,.google.cloud.gkehub.v1.RBACRoleBinding.RoleB\x03\xe0\x41\x02\x12H\n\x06labels\x18\n \x03(\x0b\x32\x33.google.cloud.gkehub.v1.RBACRoleBinding.LabelsEntryB\x03\xe0\x41\x01\x1a\xca\x01\n\x04Role\x12U\n\x0fpredefined_role\x18\x01 \x01(\x0e\x32<.google.cloud.gkehub.v1.RBACRoleBinding.Role.PredefinedRoles\x12\x18\n\x0b\x63ustom_role\x18\x02 \x01(\tB\x03\xe0\x41\x01\"Q\n\x0fPredefinedRoles\x12\x0b\n\x07UNKNOWN\x10\x00\x12\t\n\x05\x41\x44MIN\x10\x01\x12\x08\n\x04\x45\x44IT\x10\x02\x12\x08\n\x04VIEW\x10\x03\x12\x12\n\x0e\x41NTHOS_SUPPORT\x10\x04\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\xeb\x01\xea\x41\xe7\x01\n%gkehub.googleapis.com/RBACRoleBinding\x12Yprojects/{project}/locations/{location}/scopes/{scope}/rbacrolebindings/{rbacrolebinding}\x12\x63projects/{project}/locations/{location}/memberships/{membership}/rbacrolebindings/{rbacrolebinding}B\x0b\n\tprincipal\"\xc1\x01\n\x1dRBACRoleBindingLifecycleState\x12M\n\x04\x63ode\x18\x01 \x01(\x0e\x32:.google.cloud.gkehub.v1.RBACRoleBindingLifecycleState.CodeB\x03\xe0\x41\x03\"Q\n\x04\x43ode\x12\x14\n\x10\x43ODE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\t\n\x05READY\x10\x02\x12\x0c\n\x08\x44\x45LETING\x10\x03\x12\x0c\n\x08UPDATING\x10\x04\"\xde\x04\n\x05Scope\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x64\x65lete_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12?\n\x05state\x18\x06 \x01(\x0b\x32+.google.cloud.gkehub.v1.ScopeLifecycleStateB\x03\xe0\x41\x03\x12Q\n\x10namespace_labels\x18\x08 \x03(\x0b\x32\x32.google.cloud.gkehub.v1.Scope.NamespaceLabelsEntryB\x03\xe0\x41\x01\x12>\n\x06labels\x18\t \x03(\x0b\x32).google.cloud.gkehub.v1.Scope.LabelsEntryB\x03\xe0\x41\x01\x1a\x36\n\x14NamespaceLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:X\xea\x41U\n\x1bgkehub.googleapis.com/Scope\x12\x36projects/{project}/locations/{location}/scopes/{scope}\"\xad\x01\n\x13ScopeLifecycleState\x12\x43\n\x04\x63ode\x18\x01 \x01(\x0e\x32\x30.google.cloud.gkehub.v1.ScopeLifecycleState.CodeB\x03\xe0\x41\x03\"Q\n\x04\x43ode\x12\x14\n\x10\x43ODE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\t\n\x05READY\x10\x02\x12\x0c\n\x08\x44\x45LETING\x10\x03\x12\x0c\n\x08UPDATING\x10\x04\"\xe9\x04\n\x11MembershipBinding\x12\x31\n\x05scope\x18\x03 \x01(\tB \xfa\x41\x1d\n\x1bgkehub.googleapis.com/ScopeH\x00\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x64\x65lete_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12K\n\x05state\x18\x08 \x01(\x0b\x32\x37.google.cloud.gkehub.v1.MembershipBindingLifecycleStateB\x03\xe0\x41\x03\x12J\n\x06labels\x18\t \x03(\x0b\x32\x35.google.cloud.gkehub.v1.MembershipBinding.LabelsEntryB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x8c\x01\xea\x41\x88\x01\n\'gkehub.googleapis.com/MembershipBinding\x12]projects/{project}/locations/{location}/memberships/{membership}/bindings/{membershipbinding}B\x08\n\x06target\"\xc5\x01\n\x1fMembershipBindingLifecycleState\x12O\n\x04\x63ode\x18\x01 \x01(\x0e\x32<.google.cloud.gkehub.v1.MembershipBindingLifecycleState.CodeB\x03\xe0\x41\x03\"Q\n\x04\x43ode\x12\x14\n\x10\x43ODE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\t\n\x05READY\x10\x02\x12\x0c\n\x08\x44\x45LETING\x10\x03\x12\x0c\n\x08UPDATING\x10\x04\x42\xac\x01\n\x1a\x63om.google.cloud.gkehub.v1B\nFleetProtoP\x01Z2cloud.google.com/go/gkehub/apiv1/gkehubpb;gkehubpb\xaa\x02\x16Google.Cloud.GkeHub.V1\xca\x02\x16Google\\Cloud\\GkeHub\\V1\xea\x02\x19Google::Cloud::GkeHub::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module GkeHub + module V1 + Fleet = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.Fleet").msgclass + DefaultClusterConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.DefaultClusterConfig").msgclass + SecurityPostureConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.SecurityPostureConfig").msgclass + SecurityPostureConfig::Mode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.SecurityPostureConfig.Mode").enummodule + SecurityPostureConfig::VulnerabilityMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.SecurityPostureConfig.VulnerabilityMode").enummodule + BinaryAuthorizationConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.BinaryAuthorizationConfig").msgclass + BinaryAuthorizationConfig::PolicyBinding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.BinaryAuthorizationConfig.PolicyBinding").msgclass + BinaryAuthorizationConfig::EvaluationMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.BinaryAuthorizationConfig.EvaluationMode").enummodule + CompliancePostureConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.CompliancePostureConfig").msgclass + CompliancePostureConfig::ComplianceStandard = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.CompliancePostureConfig.ComplianceStandard").msgclass + CompliancePostureConfig::Mode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.CompliancePostureConfig.Mode").enummodule + FleetLifecycleState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.FleetLifecycleState").msgclass + FleetLifecycleState::Code = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.FleetLifecycleState.Code").enummodule + Namespace = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.Namespace").msgclass + NamespaceLifecycleState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.NamespaceLifecycleState").msgclass + NamespaceLifecycleState::Code = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.NamespaceLifecycleState.Code").enummodule + RBACRoleBinding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.RBACRoleBinding").msgclass + RBACRoleBinding::Role = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.RBACRoleBinding.Role").msgclass + RBACRoleBinding::Role::PredefinedRoles = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.RBACRoleBinding.Role.PredefinedRoles").enummodule + RBACRoleBindingLifecycleState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.RBACRoleBindingLifecycleState").msgclass + RBACRoleBindingLifecycleState::Code = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.RBACRoleBindingLifecycleState.Code").enummodule + Scope = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.Scope").msgclass + ScopeLifecycleState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.ScopeLifecycleState").msgclass + ScopeLifecycleState::Code = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.ScopeLifecycleState.Code").enummodule + MembershipBinding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.MembershipBinding").msgclass + MembershipBindingLifecycleState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.MembershipBindingLifecycleState").msgclass + MembershipBindingLifecycleState::Code = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.MembershipBindingLifecycleState.Code").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gkehub/v1/membership_pb.rb b/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gkehub/v1/membership_pb.rb new file mode 100644 index 000000000000..e59f1b668226 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gkehub/v1/membership_pb.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/gkehub/v1/membership.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n\'google/cloud/gkehub/v1/membership.proto\x12\x16google.cloud.gkehub.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb8\x06\n\nMembership\x12\x43\n\x08\x65ndpoint\x18\x04 \x01(\x0b\x32*.google.cloud.gkehub.v1.MembershipEndpointB\x03\xe0\x41\x01H\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x43\n\x06labels\x18\x02 \x03(\x0b\x32..google.cloud.gkehub.v1.Membership.LabelsEntryB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12;\n\x05state\x18\x05 \x01(\x0b\x32\'.google.cloud.gkehub.v1.MembershipStateB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x64\x65lete_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x65xternal_id\x18\t \x01(\tB\x03\xe0\x41\x01\x12=\n\x14last_connection_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x16\n\tunique_id\x18\x0b \x01(\tB\x03\xe0\x41\x03\x12\x39\n\tauthority\x18\x0c \x01(\x0b\x32!.google.cloud.gkehub.v1.AuthorityB\x03\xe0\x41\x01\x12H\n\x11monitoring_config\x18\x0e \x01(\x0b\x32(.google.cloud.gkehub.v1.MonitoringConfigB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:g\xea\x41\x64\n gkehub.googleapis.com/Membership\x12@projects/{project}/locations/{location}/memberships/{membership}B\x06\n\x04type\"\x8b\x02\n\x12MembershipEndpoint\x12<\n\x0bgke_cluster\x18\x01 \x01(\x0b\x32\".google.cloud.gkehub.v1.GkeClusterB\x03\xe0\x41\x01\x12L\n\x13kubernetes_metadata\x18\x02 \x01(\x0b\x32*.google.cloud.gkehub.v1.KubernetesMetadataB\x03\xe0\x41\x03\x12L\n\x13kubernetes_resource\x18\x03 \x01(\x0b\x32*.google.cloud.gkehub.v1.KubernetesResourceB\x03\xe0\x41\x01\x12\x1b\n\x0egoogle_managed\x18\x08 \x01(\x08\x42\x03\xe0\x41\x03\"\x98\x02\n\x12KubernetesResource\x12#\n\x16membership_cr_manifest\x18\x01 \x01(\tB\x03\xe0\x41\x04\x12K\n\x14membership_resources\x18\x02 \x03(\x0b\x32(.google.cloud.gkehub.v1.ResourceManifestB\x03\xe0\x41\x03\x12H\n\x11\x63onnect_resources\x18\x03 \x03(\x0b\x32(.google.cloud.gkehub.v1.ResourceManifestB\x03\xe0\x41\x03\x12\x46\n\x10resource_options\x18\x04 \x01(\x0b\x32\'.google.cloud.gkehub.v1.ResourceOptionsB\x03\xe0\x41\x01\"\x81\x01\n\x0fResourceOptions\x12\x1c\n\x0f\x63onnect_version\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0bv1beta1_crd\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x18\n\x0bk8s_version\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0fk8s_git_version\x18\x04 \x01(\tB\x03\xe0\x41\x01\"<\n\x10ResourceManifest\x12\x10\n\x08manifest\x18\x01 \x01(\t\x12\x16\n\x0e\x63luster_scoped\x18\x02 \x01(\x08\"F\n\nGkeCluster\x12\x1a\n\rresource_link\x18\x01 \x01(\tB\x03\xe0\x41\x05\x12\x1c\n\x0f\x63luster_missing\x18\x02 \x01(\x08\x42\x03\xe0\x41\x03\"\xdf\x01\n\x12KubernetesMetadata\x12*\n\x1dkubernetes_api_server_version\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x1d\n\x10node_provider_id\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\nnode_count\x18\x03 \x01(\x05\x42\x03\xe0\x41\x03\x12\x17\n\nvcpu_count\x18\x04 \x01(\x05\x42\x03\xe0\x41\x03\x12\x16\n\tmemory_mb\x18\x05 \x01(\x05\x42\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x64 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\"\x96\x01\n\x10MonitoringConfig\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x05\x12\x15\n\x08location\x18\x02 \x01(\tB\x03\xe0\x41\x05\x12\x14\n\x07\x63luster\x18\x03 \x01(\tB\x03\xe0\x41\x05\x12!\n\x19kubernetes_metrics_prefix\x18\x04 \x01(\t\x12\x19\n\x0c\x63luster_hash\x18\x05 \x01(\tB\x03\xe0\x41\x05\"\xbb\x01\n\x0fMembershipState\x12?\n\x04\x63ode\x18\x01 \x01(\x0e\x32,.google.cloud.gkehub.v1.MembershipState.CodeB\x03\xe0\x41\x03\"g\n\x04\x43ode\x12\x14\n\x10\x43ODE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\t\n\x05READY\x10\x02\x12\x0c\n\x08\x44\x45LETING\x10\x03\x12\x0c\n\x08UPDATING\x10\x04\x12\x14\n\x10SERVICE_UPDATING\x10\x05\"}\n\tAuthority\x12\x13\n\x06issuer\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12#\n\x16workload_identity_pool\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x1e\n\x11identity_provider\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x16\n\toidc_jwks\x18\x04 \x01(\x0c\x42\x03\xe0\x41\x01\x42\xb1\x01\n\x1a\x63om.google.cloud.gkehub.v1B\x0fMembershipProtoP\x01Z2cloud.google.com/go/gkehub/apiv1/gkehubpb;gkehubpb\xaa\x02\x16Google.Cloud.GkeHub.V1\xca\x02\x16Google\\Cloud\\GkeHub\\V1\xea\x02\x19Google::Cloud::GkeHub::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module GkeHub + module V1 + Membership = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.Membership").msgclass + MembershipEndpoint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.MembershipEndpoint").msgclass + KubernetesResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.KubernetesResource").msgclass + ResourceOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.ResourceOptions").msgclass + ResourceManifest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.ResourceManifest").msgclass + GkeCluster = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.GkeCluster").msgclass + KubernetesMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.KubernetesMetadata").msgclass + MonitoringConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.MonitoringConfig").msgclass + MembershipState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.MembershipState").msgclass + MembershipState::Code = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.MembershipState.Code").enummodule + Authority = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.Authority").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gkehub/v1/service_pb.rb b/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gkehub/v1/service_pb.rb new file mode 100644 index 000000000000..612cbecb8655 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gkehub/v1/service_pb.rb @@ -0,0 +1,116 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/gkehub/v1/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/gkehub/v1/feature_pb' +require 'google/cloud/gkehub/v1/fleet_pb' +require 'google/cloud/gkehub/v1/membership_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n$google/cloud/gkehub/v1/service.proto\x12\x16google.cloud.gkehub.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a$google/cloud/gkehub/v1/feature.proto\x1a\"google/cloud/gkehub/v1/fleet.proto\x1a\'google/cloud/gkehub/v1/membership.proto\x1a#google/longrunning/operations.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"Q\n\x18GetScopeNamespaceRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fgkehub.googleapis.com/Namespace\"\xb8\x01\n\x1b\x43reateScopeNamespaceRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1fgkehub.googleapis.com/Namespace\x12\x1f\n\x12scope_namespace_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12?\n\x0fscope_namespace\x18\x03 \x01(\x0b\x32!.google.cloud.gkehub.v1.NamespaceB\x03\xe0\x41\x02\"\x94\x01\n\x1bUpdateScopeNamespaceRequest\x12?\n\x0fscope_namespace\x18\x01 \x01(\x0b\x32!.google.cloud.gkehub.v1.NamespaceB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"T\n\x1b\x44\x65leteScopeNamespaceRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fgkehub.googleapis.com/Namespace\"\x86\x01\n\x1aListScopeNamespacesRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1fgkehub.googleapis.com/Namespace\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"s\n\x1bListScopeNamespacesResponse\x12;\n\x10scope_namespaces\x18\x01 \x03(\x0b\x32!.google.cloud.gkehub.v1.Namespace\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"]\n\x1eGetScopeRBACRoleBindingRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%gkehub.googleapis.com/RBACRoleBinding\"\xca\x01\n!CreateScopeRBACRoleBindingRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\x12%gkehub.googleapis.com/RBACRoleBinding\x12\x1f\n\x12rbacrolebinding_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x45\n\x0frbacrolebinding\x18\x03 \x01(\x0b\x32\'.google.cloud.gkehub.v1.RBACRoleBindingB\x03\xe0\x41\x02\"\xa0\x01\n!UpdateScopeRBACRoleBindingRequest\x12\x45\n\x0frbacrolebinding\x18\x01 \x01(\x0b\x32\'.google.cloud.gkehub.v1.RBACRoleBindingB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"`\n!DeleteScopeRBACRoleBindingRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%gkehub.googleapis.com/RBACRoleBinding\"\x92\x01\n ListScopeRBACRoleBindingsRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\x12%gkehub.googleapis.com/RBACRoleBinding\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x7f\n!ListScopeRBACRoleBindingsResponse\x12\x41\n\x10rbacrolebindings\x18\x01 \x03(\x0b\x32\'.google.cloud.gkehub.v1.RBACRoleBinding\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"D\n\x0fGetScopeRequest\x12\x31\n\x04name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1bgkehub.googleapis.com/Scope\"\x93\x01\n\x12\x43reateScopeRequest\x12\x33\n\x06parent\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\x12\x1bgkehub.googleapis.com/Scope\x12\x15\n\x08scope_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x31\n\x05scope\x18\x03 \x01(\x0b\x32\x1d.google.cloud.gkehub.v1.ScopeB\x03\xe0\x41\x02\"}\n\x12UpdateScopeRequest\x12\x31\n\x05scope\x18\x01 \x01(\x0b\x32\x1d.google.cloud.gkehub.v1.ScopeB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"G\n\x12\x44\x65leteScopeRequest\x12\x31\n\x04name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1bgkehub.googleapis.com/Scope\"y\n\x11ListScopesRequest\x12\x33\n\x06parent\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\x12\x1bgkehub.googleapis.com/Scope\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\\\n\x12ListScopesResponse\x12-\n\x06scopes\x18\x01 \x03(\x0b\x32\x1d.google.cloud.gkehub.v1.Scope\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x82\x01\n\x1aListPermittedScopesRequest\x12\x33\n\x06parent\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\x12\x1bgkehub.googleapis.com/Scope\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"e\n\x1bListPermittedScopesResponse\x12-\n\x06scopes\x18\x01 \x03(\x0b\x32\x1d.google.cloud.gkehub.v1.Scope\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\\\n\x1bGetMembershipBindingRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'gkehub.googleapis.com/MembershipBinding\"\xd1\x01\n\x1e\x43reateMembershipBindingRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'gkehub.googleapis.com/MembershipBinding\x12J\n\x12membership_binding\x18\x02 \x01(\x0b\x32).google.cloud.gkehub.v1.MembershipBindingB\x03\xe0\x41\x02\x12\"\n\x15membership_binding_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\xa2\x01\n\x1eUpdateMembershipBindingRequest\x12J\n\x12membership_binding\x18\x01 \x01(\x0b\x32).google.cloud.gkehub.v1.MembershipBindingB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"_\n\x1e\x44\x65leteMembershipBindingRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'gkehub.googleapis.com/MembershipBinding\"\xa6\x01\n\x1dListMembershipBindingsRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'gkehub.googleapis.com/MembershipBinding\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\x96\x01\n\x1eListMembershipBindingsResponse\x12\x46\n\x13membership_bindings\x18\x01 \x03(\x0b\x32).google.cloud.gkehub.v1.MembershipBinding\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xaf\x01\n\x16ListMembershipsRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\x12 gkehub.googleapis.com/Membership\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"b\n#GetMembershipRBACRoleBindingRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%gkehub.googleapis.com/RBACRoleBinding\"\xcf\x01\n&CreateMembershipRBACRoleBindingRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\x12%gkehub.googleapis.com/RBACRoleBinding\x12\x1f\n\x12rbacrolebinding_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x45\n\x0frbacrolebinding\x18\x03 \x01(\x0b\x32\'.google.cloud.gkehub.v1.RBACRoleBindingB\x03\xe0\x41\x02\"\xa5\x01\n&UpdateMembershipRBACRoleBindingRequest\x12\x45\n\x0frbacrolebinding\x18\x01 \x01(\x0b\x32\'.google.cloud.gkehub.v1.RBACRoleBindingB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"e\n&DeleteMembershipRBACRoleBindingRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%gkehub.googleapis.com/RBACRoleBinding\"\x97\x01\n%ListMembershipRBACRoleBindingsRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\x12%gkehub.googleapis.com/RBACRoleBinding\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x99\x01\n&ListMembershipRBACRoleBindingsResponse\x12\x41\n\x10rbacrolebindings\x18\x01 \x03(\x0b\x32\'.google.cloud.gkehub.v1.RBACRoleBinding\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xd0\x01\n,GenerateMembershipRBACRoleBindingYAMLRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n gkehub.googleapis.com/Membership\x12\x1f\n\x12rbacrolebinding_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x45\n\x0frbacrolebinding\x18\x03 \x01(\x0b\x32\'.google.cloud.gkehub.v1.RBACRoleBindingB\x03\xe0\x41\x02\"K\n-GenerateMembershipRBACRoleBindingYAMLResponse\x12\x1a\n\x12role_bindings_yaml\x18\x01 \x01(\t\"~\n\x17ListMembershipsResponse\x12\x35\n\tresources\x18\x01 \x03(\x0b\x32\".google.cloud.gkehub.v1.Membership\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"N\n\x14GetMembershipRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n gkehub.googleapis.com/Membership\"\x9c\x01\n\x1bListBoundMembershipsRequest\x12\x37\n\nscope_name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1bgkehub.googleapis.com/Scope\x12\x13\n\x06\x66ilter\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\x85\x01\n\x1cListBoundMembershipsResponse\x12\x37\n\x0bmemberships\x18\x01 \x03(\x0b\x32\".google.cloud.gkehub.v1.Membership\x12\x13\n\x0bunreachable\x18\x02 \x03(\t\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\t\"\xc3\x01\n\x17\x43reateMembershipRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\x12 gkehub.googleapis.com/Membership\x12\x1a\n\rmembership_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x39\n\x08resource\x18\x03 \x01(\x0b\x32\".google.cloud.gkehub.v1.MembershipB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"~\n\x17\x44\x65leteMembershipRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n gkehub.googleapis.com/Membership\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05\x66orce\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"\xdb\x01\n\x17UpdateMembershipRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n gkehub.googleapis.com/Membership\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x39\n\x08resource\x18\x03 \x01(\x0b\x32\".google.cloud.gkehub.v1.MembershipB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xf2\x01\n\x1eGenerateConnectManifestRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n gkehub.googleapis.com/Membership\x12\x16\n\tnamespace\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05proxy\x18\x03 \x01(\x0c\x42\x03\xe0\x41\x01\x12\x14\n\x07version\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x17\n\nis_upgrade\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\x12\x15\n\x08registry\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12&\n\x19image_pull_secret_content\x18\x07 \x01(\x0c\x42\x03\xe0\x41\x01\"a\n\x1fGenerateConnectManifestResponse\x12>\n\x08manifest\x18\x01 \x03(\x0b\x32,.google.cloud.gkehub.v1.ConnectAgentResource\"X\n\x14\x43onnectAgentResource\x12.\n\x04type\x18\x01 \x01(\x0b\x32 .google.cloud.gkehub.v1.TypeMeta\x12\x10\n\x08manifest\x18\x02 \x01(\t\"-\n\x08TypeMeta\x12\x0c\n\x04kind\x18\x01 \x01(\t\x12\x13\n\x0b\x61pi_version\x18\x02 \x01(\t\"\xb7\x01\n\x13ListFeaturesRequest\x12\x32\n\x06parent\x18\x01 \x01(\tB\"\xfa\x41\x1f\x12\x1dgkehub.googleapis.com/Feature\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\x12\x10\n\x08order_by\x18\x05 \x01(\t\x12#\n\x16return_partial_success\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\"c\n\x14ListFeaturesResponse\x12\x32\n\tresources\x18\x01 \x03(\x0b\x32\x1f.google.cloud.gkehub.v1.Feature\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"j\n\x11GetFeatureRequest\x12\x30\n\x04name\x18\x01 \x01(\tB\"\xfa\x41\x1f\n\x1dgkehub.googleapis.com/Feature\x12#\n\x16return_partial_success\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"\xa5\x01\n\x14\x43reateFeatureRequest\x12\x32\n\x06parent\x18\x01 \x01(\tB\"\xfa\x41\x1f\x12\x1dgkehub.googleapis.com/Feature\x12\x12\n\nfeature_id\x18\x02 \x01(\t\x12\x31\n\x08resource\x18\x03 \x01(\x0b\x32\x1f.google.cloud.gkehub.v1.Feature\x12\x12\n\nrequest_id\x18\x04 \x01(\t\"p\n\x14\x44\x65leteFeatureRequest\x12\x30\n\x04name\x18\x01 \x01(\tB\"\xfa\x41\x1f\n\x1dgkehub.googleapis.com/Feature\x12\r\n\x05\x66orce\x18\x02 \x01(\x08\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xc0\x01\n\x14UpdateFeatureRequest\x12\x30\n\x04name\x18\x01 \x01(\tB\"\xfa\x41\x1f\n\x1dgkehub.googleapis.com/Feature\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x31\n\x08resource\x18\x03 \x01(\x0b\x32\x1f.google.cloud.gkehub.v1.Feature\x12\x12\n\nrequest_id\x18\x04 \x01(\t\"\x82\x01\n\x12\x43reateFleetRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x31\n\x05\x66leet\x18\x02 \x01(\x0b\x32\x1d.google.cloud.gkehub.v1.FleetB\x03\xe0\x41\x02\"D\n\x0fGetFleetRequest\x12\x31\n\x04name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1bgkehub.googleapis.com/Fleet\"}\n\x12UpdateFleetRequest\x12\x31\n\x05\x66leet\x18\x01 \x01(\x0b\x32\x1d.google.cloud.gkehub.v1.FleetB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"G\n\x12\x44\x65leteFleetRequest\x12\x31\n\x04name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1bgkehub.googleapis.com/Fleet\"\x7f\n\x11ListFleetsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x17\n\npage_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\"\\\n\x12ListFleetsResponse\x12-\n\x06\x66leets\x18\x01 \x03(\x0b\x32\x1d.google.cloud.gkehub.v1.Fleet\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xf9\x01\n\x11OperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1a\n\rstatus_detail\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x1d\n\x10\x63\x61ncel_requested\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\x32\x96M\n\x06GkeHub\x12\xb4\x01\n\x0fListMemberships\x12..google.cloud.gkehub.v1.ListMembershipsRequest\x1a/.google.cloud.gkehub.v1.ListMembershipsResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v1/{parent=projects/*/locations/*}/memberships\x12\xd8\x01\n\x14ListBoundMemberships\x12\x33.google.cloud.gkehub.v1.ListBoundMembershipsRequest\x1a\x34.google.cloud.gkehub.v1.ListBoundMembershipsResponse\"U\xda\x41\nscope_name\x82\xd3\xe4\x93\x02\x42\x12@/v1/{scope_name=projects/*/locations/*/scopes/*}:listMemberships\x12\xa8\x01\n\x0cListFeatures\x12+.google.cloud.gkehub.v1.ListFeaturesRequest\x1a,.google.cloud.gkehub.v1.ListFeaturesResponse\"=\xda\x41\x06parent\x82\xd3\xe4\x93\x02.\x12,/v1/{parent=projects/*/locations/*}/features\x12\xa1\x01\n\rGetMembership\x12,.google.cloud.gkehub.v1.GetMembershipRequest\x1a\".google.cloud.gkehub.v1.Membership\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1/{name=projects/*/locations/*/memberships/*}\x12\x95\x01\n\nGetFeature\x12).google.cloud.gkehub.v1.GetFeatureRequest\x1a\x1f.google.cloud.gkehub.v1.Feature\";\xda\x41\x04name\x82\xd3\xe4\x93\x02.\x12,/v1/{name=projects/*/locations/*/features/*}\x12\xe8\x01\n\x10\x43reateMembership\x12/.google.cloud.gkehub.v1.CreateMembershipRequest\x1a\x1d.google.longrunning.Operation\"\x83\x01\xca\x41\x1f\n\nMembership\x12\x11OperationMetadata\xda\x41\x1dparent,resource,membership_id\x82\xd3\xe4\x93\x02;\"//v1/{parent=projects/*/locations/*}/memberships:\x08resource\x12\xd8\x01\n\rCreateFeature\x12,.google.cloud.gkehub.v1.CreateFeatureRequest\x1a\x1d.google.longrunning.Operation\"z\xca\x41\x1c\n\x07\x46\x65\x61ture\x12\x11OperationMetadata\xda\x41\x1aparent,resource,feature_id\x82\xd3\xe4\x93\x02\x38\",/v1/{parent=projects/*/locations/*}/features:\x08resource\x12\xcf\x01\n\x10\x44\x65leteMembership\x12/.google.cloud.gkehub.v1.DeleteMembershipRequest\x1a\x1d.google.longrunning.Operation\"k\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//v1/{name=projects/*/locations/*/memberships/*}\x12\xc6\x01\n\rDeleteFeature\x12,.google.cloud.gkehub.v1.DeleteFeatureRequest\x1a\x1d.google.longrunning.Operation\"h\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02.*,/v1/{name=projects/*/locations/*/features/*}\x12\xe3\x01\n\x10UpdateMembership\x12/.google.cloud.gkehub.v1.UpdateMembershipRequest\x1a\x1d.google.longrunning.Operation\"\x7f\xca\x41\x1f\n\nMembership\x12\x11OperationMetadata\xda\x41\x19name,resource,update_mask\x82\xd3\xe4\x93\x02;2//v1/{name=projects/*/locations/*/memberships/*}:\x08resource\x12\xd7\x01\n\rUpdateFeature\x12,.google.cloud.gkehub.v1.UpdateFeatureRequest\x1a\x1d.google.longrunning.Operation\"y\xca\x41\x1c\n\x07\x46\x65\x61ture\x12\x11OperationMetadata\xda\x41\x19name,resource,update_mask\x82\xd3\xe4\x93\x02\x38\x32,/v1/{name=projects/*/locations/*/features/*}:\x08resource\x12\xdb\x01\n\x17GenerateConnectManifest\x12\x36.google.cloud.gkehub.v1.GenerateConnectManifestRequest\x1a\x37.google.cloud.gkehub.v1.GenerateConnectManifestResponse\"O\x82\xd3\xe4\x93\x02I\x12G/v1/{name=projects/*/locations/*/memberships/*}:generateConnectManifest\x12\xbf\x01\n\x0b\x43reateFleet\x12*.google.cloud.gkehub.v1.CreateFleetRequest\x1a\x1d.google.longrunning.Operation\"e\xca\x41\x1a\n\x05\x46leet\x12\x11OperationMetadata\xda\x41\x0cparent,fleet\x82\xd3\xe4\x93\x02\x33\"*/v1/{parent=projects/*/locations/*}/fleets:\x05\x66leet\x12\x8d\x01\n\x08GetFleet\x12\'.google.cloud.gkehub.v1.GetFleetRequest\x1a\x1d.google.cloud.gkehub.v1.Fleet\"9\xda\x41\x04name\x82\xd3\xe4\x93\x02,\x12*/v1/{name=projects/*/locations/*/fleets/*}\x12\xca\x01\n\x0bUpdateFleet\x12*.google.cloud.gkehub.v1.UpdateFleetRequest\x1a\x1d.google.longrunning.Operation\"p\xca\x41\x1a\n\x05\x46leet\x12\x11OperationMetadata\xda\x41\x11\x66leet,update_mask\x82\xd3\xe4\x93\x02\x39\x32\x30/v1/{fleet.name=projects/*/locations/*/fleets/*}:\x05\x66leet\x12\xc0\x01\n\x0b\x44\x65leteFleet\x12*.google.cloud.gkehub.v1.DeleteFleetRequest\x1a\x1d.google.longrunning.Operation\"f\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02,**/v1/{name=projects/*/locations/*/fleets/*}\x12\xd3\x01\n\nListFleets\x12).google.cloud.gkehub.v1.ListFleetsRequest\x1a*.google.cloud.gkehub.v1.ListFleetsResponse\"n\xda\x41\x06parent\x82\xd3\xe4\x93\x02_\x12*/v1/{parent=projects/*/locations/*}/fleetsZ1\x12//v1/{parent=organizations/*/locations/*}/fleets\x12\xb0\x01\n\x11GetScopeNamespace\x12\x30.google.cloud.gkehub.v1.GetScopeNamespaceRequest\x1a!.google.cloud.gkehub.v1.Namespace\"F\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39\x12\x37/v1/{name=projects/*/locations/*/scopes/*/namespaces/*}\x12\x8a\x02\n\x14\x43reateScopeNamespace\x12\x33.google.cloud.gkehub.v1.CreateScopeNamespaceRequest\x1a\x1d.google.longrunning.Operation\"\x9d\x01\xca\x41\x1e\n\tNamespace\x12\x11OperationMetadata\xda\x41)parent,scope_namespace,scope_namespace_id\x82\xd3\xe4\x93\x02J\"7/v1/{parent=projects/*/locations/*/scopes/*}/namespaces:\x0fscope_namespace\x12\x8c\x02\n\x14UpdateScopeNamespace\x12\x33.google.cloud.gkehub.v1.UpdateScopeNamespaceRequest\x1a\x1d.google.longrunning.Operation\"\x9f\x01\xca\x41\x1e\n\tNamespace\x12\x11OperationMetadata\xda\x41\x1bscope_namespace,update_mask\x82\xd3\xe4\x93\x02Z2G/v1/{scope_namespace.name=projects/*/locations/*/scopes/*/namespaces/*}:\x0fscope_namespace\x12\xdf\x01\n\x14\x44\x65leteScopeNamespace\x12\x33.google.cloud.gkehub.v1.DeleteScopeNamespaceRequest\x1a\x1d.google.longrunning.Operation\"s\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39*7/v1/{name=projects/*/locations/*/scopes/*/namespaces/*}\x12\xc8\x01\n\x13ListScopeNamespaces\x12\x32.google.cloud.gkehub.v1.ListScopeNamespacesRequest\x1a\x33.google.cloud.gkehub.v1.ListScopeNamespacesResponse\"H\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x39\x12\x37/v1/{parent=projects/*/locations/*/scopes/*}/namespaces\x12\xc8\x01\n\x17GetScopeRBACRoleBinding\x12\x36.google.cloud.gkehub.v1.GetScopeRBACRoleBindingRequest\x1a\'.google.cloud.gkehub.v1.RBACRoleBinding\"L\xda\x41\x04name\x82\xd3\xe4\x93\x02?\x12=/v1/{name=projects/*/locations/*/scopes/*/rbacrolebindings/*}\x12\xa2\x02\n\x1a\x43reateScopeRBACRoleBinding\x12\x39.google.cloud.gkehub.v1.CreateScopeRBACRoleBindingRequest\x1a\x1d.google.longrunning.Operation\"\xa9\x01\xca\x41$\n\x0fRBACRoleBinding\x12\x11OperationMetadata\xda\x41)parent,rbacrolebinding,rbacrolebinding_id\x82\xd3\xe4\x93\x02P\"=/v1/{parent=projects/*/locations/*/scopes/*}/rbacrolebindings:\x0frbacrolebinding\x12\xa4\x02\n\x1aUpdateScopeRBACRoleBinding\x12\x39.google.cloud.gkehub.v1.UpdateScopeRBACRoleBindingRequest\x1a\x1d.google.longrunning.Operation\"\xab\x01\xca\x41$\n\x0fRBACRoleBinding\x12\x11OperationMetadata\xda\x41\x1brbacrolebinding,update_mask\x82\xd3\xe4\x93\x02`2M/v1/{rbacrolebinding.name=projects/*/locations/*/scopes/*/rbacrolebindings/*}:\x0frbacrolebinding\x12\xf1\x01\n\x1a\x44\x65leteScopeRBACRoleBinding\x12\x39.google.cloud.gkehub.v1.DeleteScopeRBACRoleBindingRequest\x1a\x1d.google.longrunning.Operation\"y\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02?*=/v1/{name=projects/*/locations/*/scopes/*/rbacrolebindings/*}\x12\xe0\x01\n\x19ListScopeRBACRoleBindings\x12\x38.google.cloud.gkehub.v1.ListScopeRBACRoleBindingsRequest\x1a\x39.google.cloud.gkehub.v1.ListScopeRBACRoleBindingsResponse\"N\xda\x41\x06parent\x82\xd3\xe4\x93\x02?\x12=/v1/{parent=projects/*/locations/*/scopes/*}/rbacrolebindings\x12\x8d\x01\n\x08GetScope\x12\'.google.cloud.gkehub.v1.GetScopeRequest\x1a\x1d.google.cloud.gkehub.v1.Scope\"9\xda\x41\x04name\x82\xd3\xe4\x93\x02,\x12*/v1/{name=projects/*/locations/*/scopes/*}\x12\xc8\x01\n\x0b\x43reateScope\x12*.google.cloud.gkehub.v1.CreateScopeRequest\x1a\x1d.google.longrunning.Operation\"n\xca\x41\x1a\n\x05Scope\x12\x11OperationMetadata\xda\x41\x15parent,scope,scope_id\x82\xd3\xe4\x93\x02\x33\"*/v1/{parent=projects/*/locations/*}/scopes:\x05scope\x12\xca\x01\n\x0bUpdateScope\x12*.google.cloud.gkehub.v1.UpdateScopeRequest\x1a\x1d.google.longrunning.Operation\"p\xca\x41\x1a\n\x05Scope\x12\x11OperationMetadata\xda\x41\x11scope,update_mask\x82\xd3\xe4\x93\x02\x39\x32\x30/v1/{scope.name=projects/*/locations/*/scopes/*}:\x05scope\x12\xc0\x01\n\x0b\x44\x65leteScope\x12*.google.cloud.gkehub.v1.DeleteScopeRequest\x1a\x1d.google.longrunning.Operation\"f\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02,**/v1/{name=projects/*/locations/*/scopes/*}\x12\xa0\x01\n\nListScopes\x12).google.cloud.gkehub.v1.ListScopesRequest\x1a*.google.cloud.gkehub.v1.ListScopesResponse\";\xda\x41\x06parent\x82\xd3\xe4\x93\x02,\x12*/v1/{parent=projects/*/locations/*}/scopes\x12\xc9\x01\n\x13ListPermittedScopes\x12\x32.google.cloud.gkehub.v1.ListPermittedScopesRequest\x1a\x33.google.cloud.gkehub.v1.ListPermittedScopesResponse\"I\xda\x41\x06parent\x82\xd3\xe4\x93\x02:\x12\x38/v1/{parent=projects/*/locations/*}/scopes:listPermitted\x12\xc1\x01\n\x14GetMembershipBinding\x12\x33.google.cloud.gkehub.v1.GetMembershipBindingRequest\x1a).google.cloud.gkehub.v1.MembershipBinding\"I\xda\x41\x04name\x82\xd3\xe4\x93\x02<\x12:/v1/{name=projects/*/locations/*/memberships/*/bindings/*}\x12\xa4\x02\n\x17\x43reateMembershipBinding\x12\x36.google.cloud.gkehub.v1.CreateMembershipBindingRequest\x1a\x1d.google.longrunning.Operation\"\xb1\x01\xca\x41&\n\x11MembershipBinding\x12\x11OperationMetadata\xda\x41/parent,membership_binding,membership_binding_id\x82\xd3\xe4\x93\x02P\":/v1/{parent=projects/*/locations/*/memberships/*}/bindings:\x12membership_binding\x12\xa6\x02\n\x17UpdateMembershipBinding\x12\x36.google.cloud.gkehub.v1.UpdateMembershipBindingRequest\x1a\x1d.google.longrunning.Operation\"\xb3\x01\xca\x41&\n\x11MembershipBinding\x12\x11OperationMetadata\xda\x41\x1emembership_binding,update_mask\x82\xd3\xe4\x93\x02\x63\x32M/v1/{membership_binding.name=projects/*/locations/*/memberships/*/bindings/*}:\x12membership_binding\x12\xe8\x01\n\x17\x44\x65leteMembershipBinding\x12\x36.google.cloud.gkehub.v1.DeleteMembershipBindingRequest\x1a\x1d.google.longrunning.Operation\"v\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02<*:/v1/{name=projects/*/locations/*/memberships/*/bindings/*}\x12\xd4\x01\n\x16ListMembershipBindings\x12\x35.google.cloud.gkehub.v1.ListMembershipBindingsRequest\x1a\x36.google.cloud.gkehub.v1.ListMembershipBindingsResponse\"K\xda\x41\x06parent\x82\xd3\xe4\x93\x02<\x12:/v1/{parent=projects/*/locations/*/memberships/*}/bindings\x12\xd7\x01\n\x1cGetMembershipRBACRoleBinding\x12;.google.cloud.gkehub.v1.GetMembershipRBACRoleBindingRequest\x1a\'.google.cloud.gkehub.v1.RBACRoleBinding\"Q\xda\x41\x04name\x82\xd3\xe4\x93\x02\x44\x12\x42/v1/{name=projects/*/locations/*/memberships/*/rbacrolebindings/*}\x12\xb1\x02\n\x1f\x43reateMembershipRBACRoleBinding\x12>.google.cloud.gkehub.v1.CreateMembershipRBACRoleBindingRequest\x1a\x1d.google.longrunning.Operation\"\xae\x01\xca\x41$\n\x0fRBACRoleBinding\x12\x11OperationMetadata\xda\x41)parent,rbacrolebinding,rbacrolebinding_id\x82\xd3\xe4\x93\x02U\"B/v1/{parent=projects/*/locations/*/memberships/*}/rbacrolebindings:\x0frbacrolebinding\x12\xb3\x02\n\x1fUpdateMembershipRBACRoleBinding\x12>.google.cloud.gkehub.v1.UpdateMembershipRBACRoleBindingRequest\x1a\x1d.google.longrunning.Operation\"\xb0\x01\xca\x41$\n\x0fRBACRoleBinding\x12\x11OperationMetadata\xda\x41\x1brbacrolebinding,update_mask\x82\xd3\xe4\x93\x02\x65\x32R/v1/{rbacrolebinding.name=projects/*/locations/*/memberships/*/rbacrolebindings/*}:\x0frbacrolebinding\x12\x80\x02\n\x1f\x44\x65leteMembershipRBACRoleBinding\x12>.google.cloud.gkehub.v1.DeleteMembershipRBACRoleBindingRequest\x1a\x1d.google.longrunning.Operation\"~\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x44*B/v1/{name=projects/*/locations/*/memberships/*/rbacrolebindings/*}\x12\xf4\x01\n\x1eListMembershipRBACRoleBindings\x12=.google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsRequest\x1a>.google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsResponse\"S\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x44\x12\x42/v1/{parent=projects/*/locations/*/memberships/*}/rbacrolebindings\x12\xb8\x02\n%GenerateMembershipRBACRoleBindingYAML\x12\x44.google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLRequest\x1a\x45.google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLResponse\"\x81\x01\x82\xd3\xe4\x93\x02{\"h/v1/{parent=projects/*/locations/*/memberships/*}/rbacrolebindings:generateMembershipRBACRoleBindingYAML:\x0frbacrolebinding\x1aI\xca\x41\x15gkehub.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xae\x01\n\x1a\x63om.google.cloud.gkehub.v1B\x0cServiceProtoP\x01Z2cloud.google.com/go/gkehub/apiv1/gkehubpb;gkehubpb\xaa\x02\x16Google.Cloud.GkeHub.V1\xca\x02\x16Google\\Cloud\\GkeHub\\V1\xea\x02\x19Google::Cloud::GkeHub::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.cloud.gkehub.v1.Namespace", "google/cloud/gkehub/v1/fleet.proto"], + ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], + ["google.cloud.gkehub.v1.Membership", "google/cloud/gkehub/v1/membership.proto"], + ["google.cloud.gkehub.v1.Feature", "google/cloud/gkehub/v1/feature.proto"], + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module GkeHub + module V1 + GetScopeNamespaceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.GetScopeNamespaceRequest").msgclass + CreateScopeNamespaceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.CreateScopeNamespaceRequest").msgclass + UpdateScopeNamespaceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.UpdateScopeNamespaceRequest").msgclass + DeleteScopeNamespaceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.DeleteScopeNamespaceRequest").msgclass + ListScopeNamespacesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.ListScopeNamespacesRequest").msgclass + ListScopeNamespacesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.ListScopeNamespacesResponse").msgclass + GetScopeRBACRoleBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.GetScopeRBACRoleBindingRequest").msgclass + CreateScopeRBACRoleBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.CreateScopeRBACRoleBindingRequest").msgclass + UpdateScopeRBACRoleBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.UpdateScopeRBACRoleBindingRequest").msgclass + DeleteScopeRBACRoleBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.DeleteScopeRBACRoleBindingRequest").msgclass + ListScopeRBACRoleBindingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.ListScopeRBACRoleBindingsRequest").msgclass + ListScopeRBACRoleBindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.ListScopeRBACRoleBindingsResponse").msgclass + GetScopeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.GetScopeRequest").msgclass + CreateScopeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.CreateScopeRequest").msgclass + UpdateScopeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.UpdateScopeRequest").msgclass + DeleteScopeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.DeleteScopeRequest").msgclass + ListScopesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.ListScopesRequest").msgclass + ListScopesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.ListScopesResponse").msgclass + ListPermittedScopesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.ListPermittedScopesRequest").msgclass + ListPermittedScopesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.ListPermittedScopesResponse").msgclass + GetMembershipBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.GetMembershipBindingRequest").msgclass + CreateMembershipBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.CreateMembershipBindingRequest").msgclass + UpdateMembershipBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.UpdateMembershipBindingRequest").msgclass + DeleteMembershipBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.DeleteMembershipBindingRequest").msgclass + ListMembershipBindingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.ListMembershipBindingsRequest").msgclass + ListMembershipBindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.ListMembershipBindingsResponse").msgclass + ListMembershipsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.ListMembershipsRequest").msgclass + GetMembershipRBACRoleBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.GetMembershipRBACRoleBindingRequest").msgclass + CreateMembershipRBACRoleBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.CreateMembershipRBACRoleBindingRequest").msgclass + UpdateMembershipRBACRoleBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.UpdateMembershipRBACRoleBindingRequest").msgclass + DeleteMembershipRBACRoleBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.DeleteMembershipRBACRoleBindingRequest").msgclass + ListMembershipRBACRoleBindingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsRequest").msgclass + ListMembershipRBACRoleBindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsResponse").msgclass + GenerateMembershipRBACRoleBindingYAMLRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLRequest").msgclass + GenerateMembershipRBACRoleBindingYAMLResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLResponse").msgclass + ListMembershipsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.ListMembershipsResponse").msgclass + GetMembershipRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.GetMembershipRequest").msgclass + ListBoundMembershipsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.ListBoundMembershipsRequest").msgclass + ListBoundMembershipsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.ListBoundMembershipsResponse").msgclass + CreateMembershipRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.CreateMembershipRequest").msgclass + DeleteMembershipRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.DeleteMembershipRequest").msgclass + UpdateMembershipRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.UpdateMembershipRequest").msgclass + GenerateConnectManifestRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.GenerateConnectManifestRequest").msgclass + GenerateConnectManifestResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.GenerateConnectManifestResponse").msgclass + ConnectAgentResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.ConnectAgentResource").msgclass + TypeMeta = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.TypeMeta").msgclass + ListFeaturesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.ListFeaturesRequest").msgclass + ListFeaturesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.ListFeaturesResponse").msgclass + GetFeatureRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.GetFeatureRequest").msgclass + CreateFeatureRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.CreateFeatureRequest").msgclass + DeleteFeatureRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.DeleteFeatureRequest").msgclass + UpdateFeatureRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.UpdateFeatureRequest").msgclass + CreateFleetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.CreateFleetRequest").msgclass + GetFleetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.GetFleetRequest").msgclass + UpdateFleetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.UpdateFleetRequest").msgclass + DeleteFleetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.DeleteFleetRequest").msgclass + ListFleetsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.ListFleetsRequest").msgclass + ListFleetsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.ListFleetsResponse").msgclass + OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.OperationMetadata").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gkehub/v1/service_services_pb.rb b/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gkehub/v1/service_services_pb.rb new file mode 100644 index 000000000000..bfb2e77eb718 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gkehub/v1/service_services_pb.rb @@ -0,0 +1,161 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/gkehub/v1/service.proto for package 'Google.Cloud.GkeHub.V1' +# Original file comments: +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/cloud/gkehub/v1/service_pb' + +module Google + module Cloud + module GkeHub + module V1 + module GkeHub + # The GKE Hub service handles the registration of many Kubernetes clusters to + # Google Cloud, and the management of multi-cluster features over those + # clusters. + # + # The GKE Hub service operates on the following resources: + # + # * [Membership][google.cloud.gkehub.v1.Membership] + # * [Feature][google.cloud.gkehub.v1.Feature] + # + # GKE Hub is currently available in the global region and all regions in + # https://cloud.google.com/compute/docs/regions-zones. Feature is only + # available in global region while membership is global region and all the + # regions. + # + # **Membership management may be non-trivial:** it is recommended to use one + # of the Google-provided client libraries or tools where possible when working + # with Membership resources. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.gkehub.v1.GkeHub' + + # Lists Memberships in a given project and location. + rpc :ListMemberships, ::Google::Cloud::GkeHub::V1::ListMembershipsRequest, ::Google::Cloud::GkeHub::V1::ListMembershipsResponse + # Lists Memberships bound to a Scope. The response includes relevant + # Memberships from all regions. + rpc :ListBoundMemberships, ::Google::Cloud::GkeHub::V1::ListBoundMembershipsRequest, ::Google::Cloud::GkeHub::V1::ListBoundMembershipsResponse + # Lists Features in a given project and location. + rpc :ListFeatures, ::Google::Cloud::GkeHub::V1::ListFeaturesRequest, ::Google::Cloud::GkeHub::V1::ListFeaturesResponse + # Gets the details of a Membership. + rpc :GetMembership, ::Google::Cloud::GkeHub::V1::GetMembershipRequest, ::Google::Cloud::GkeHub::V1::Membership + # Gets details of a single Feature. + rpc :GetFeature, ::Google::Cloud::GkeHub::V1::GetFeatureRequest, ::Google::Cloud::GkeHub::V1::Feature + # Creates a new Membership. + # + # **This is currently only supported for GKE clusters on Google Cloud**. + # To register other clusters, follow the instructions at + # https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster. + rpc :CreateMembership, ::Google::Cloud::GkeHub::V1::CreateMembershipRequest, ::Google::Longrunning::Operation + # Adds a new Feature. + rpc :CreateFeature, ::Google::Cloud::GkeHub::V1::CreateFeatureRequest, ::Google::Longrunning::Operation + # Removes a Membership. + # + # **This is currently only supported for GKE clusters on Google Cloud**. + # To unregister other clusters, follow the instructions at + # https://cloud.google.com/anthos/multicluster-management/connect/unregistering-a-cluster. + rpc :DeleteMembership, ::Google::Cloud::GkeHub::V1::DeleteMembershipRequest, ::Google::Longrunning::Operation + # Removes a Feature. + rpc :DeleteFeature, ::Google::Cloud::GkeHub::V1::DeleteFeatureRequest, ::Google::Longrunning::Operation + # Updates an existing Membership. + rpc :UpdateMembership, ::Google::Cloud::GkeHub::V1::UpdateMembershipRequest, ::Google::Longrunning::Operation + # Updates an existing Feature. + rpc :UpdateFeature, ::Google::Cloud::GkeHub::V1::UpdateFeatureRequest, ::Google::Longrunning::Operation + # Generates the manifest for deployment of the GKE connect agent. + # + # **This method is used internally by Google-provided libraries.** + # Most clients should not need to call this method directly. + rpc :GenerateConnectManifest, ::Google::Cloud::GkeHub::V1::GenerateConnectManifestRequest, ::Google::Cloud::GkeHub::V1::GenerateConnectManifestResponse + # Creates a fleet. + rpc :CreateFleet, ::Google::Cloud::GkeHub::V1::CreateFleetRequest, ::Google::Longrunning::Operation + # Returns the details of a fleet. + rpc :GetFleet, ::Google::Cloud::GkeHub::V1::GetFleetRequest, ::Google::Cloud::GkeHub::V1::Fleet + # Updates a fleet. + rpc :UpdateFleet, ::Google::Cloud::GkeHub::V1::UpdateFleetRequest, ::Google::Longrunning::Operation + # Removes a Fleet. There must be no memberships remaining in the Fleet. + rpc :DeleteFleet, ::Google::Cloud::GkeHub::V1::DeleteFleetRequest, ::Google::Longrunning::Operation + # Returns all fleets within an organization or a project that the caller has + # access to. + rpc :ListFleets, ::Google::Cloud::GkeHub::V1::ListFleetsRequest, ::Google::Cloud::GkeHub::V1::ListFleetsResponse + # Returns the details of a fleet namespace. + rpc :GetScopeNamespace, ::Google::Cloud::GkeHub::V1::GetScopeNamespaceRequest, ::Google::Cloud::GkeHub::V1::Namespace + # Creates a fleet namespace. + rpc :CreateScopeNamespace, ::Google::Cloud::GkeHub::V1::CreateScopeNamespaceRequest, ::Google::Longrunning::Operation + # Updates a fleet namespace. + rpc :UpdateScopeNamespace, ::Google::Cloud::GkeHub::V1::UpdateScopeNamespaceRequest, ::Google::Longrunning::Operation + # Deletes a fleet namespace. + rpc :DeleteScopeNamespace, ::Google::Cloud::GkeHub::V1::DeleteScopeNamespaceRequest, ::Google::Longrunning::Operation + # Lists fleet namespaces. + rpc :ListScopeNamespaces, ::Google::Cloud::GkeHub::V1::ListScopeNamespacesRequest, ::Google::Cloud::GkeHub::V1::ListScopeNamespacesResponse + # Returns the details of a Scope RBACRoleBinding. + rpc :GetScopeRBACRoleBinding, ::Google::Cloud::GkeHub::V1::GetScopeRBACRoleBindingRequest, ::Google::Cloud::GkeHub::V1::RBACRoleBinding + # Creates a Scope RBACRoleBinding. + rpc :CreateScopeRBACRoleBinding, ::Google::Cloud::GkeHub::V1::CreateScopeRBACRoleBindingRequest, ::Google::Longrunning::Operation + # Updates a Scope RBACRoleBinding. + rpc :UpdateScopeRBACRoleBinding, ::Google::Cloud::GkeHub::V1::UpdateScopeRBACRoleBindingRequest, ::Google::Longrunning::Operation + # Deletes a Scope RBACRoleBinding. + rpc :DeleteScopeRBACRoleBinding, ::Google::Cloud::GkeHub::V1::DeleteScopeRBACRoleBindingRequest, ::Google::Longrunning::Operation + # Lists all Scope RBACRoleBindings. + rpc :ListScopeRBACRoleBindings, ::Google::Cloud::GkeHub::V1::ListScopeRBACRoleBindingsRequest, ::Google::Cloud::GkeHub::V1::ListScopeRBACRoleBindingsResponse + # Returns the details of a Scope. + rpc :GetScope, ::Google::Cloud::GkeHub::V1::GetScopeRequest, ::Google::Cloud::GkeHub::V1::Scope + # Creates a Scope. + rpc :CreateScope, ::Google::Cloud::GkeHub::V1::CreateScopeRequest, ::Google::Longrunning::Operation + # Updates a scopes. + rpc :UpdateScope, ::Google::Cloud::GkeHub::V1::UpdateScopeRequest, ::Google::Longrunning::Operation + # Deletes a Scope. + rpc :DeleteScope, ::Google::Cloud::GkeHub::V1::DeleteScopeRequest, ::Google::Longrunning::Operation + # Lists Scopes. + rpc :ListScopes, ::Google::Cloud::GkeHub::V1::ListScopesRequest, ::Google::Cloud::GkeHub::V1::ListScopesResponse + # Lists permitted Scopes. + rpc :ListPermittedScopes, ::Google::Cloud::GkeHub::V1::ListPermittedScopesRequest, ::Google::Cloud::GkeHub::V1::ListPermittedScopesResponse + # Returns the details of a MembershipBinding. + rpc :GetMembershipBinding, ::Google::Cloud::GkeHub::V1::GetMembershipBindingRequest, ::Google::Cloud::GkeHub::V1::MembershipBinding + # Creates a MembershipBinding. + rpc :CreateMembershipBinding, ::Google::Cloud::GkeHub::V1::CreateMembershipBindingRequest, ::Google::Longrunning::Operation + # Updates a MembershipBinding. + rpc :UpdateMembershipBinding, ::Google::Cloud::GkeHub::V1::UpdateMembershipBindingRequest, ::Google::Longrunning::Operation + # Deletes a MembershipBinding. + rpc :DeleteMembershipBinding, ::Google::Cloud::GkeHub::V1::DeleteMembershipBindingRequest, ::Google::Longrunning::Operation + # Lists MembershipBindings. + rpc :ListMembershipBindings, ::Google::Cloud::GkeHub::V1::ListMembershipBindingsRequest, ::Google::Cloud::GkeHub::V1::ListMembershipBindingsResponse + # Returns the details of a Membership RBACRoleBinding. + rpc :GetMembershipRBACRoleBinding, ::Google::Cloud::GkeHub::V1::GetMembershipRBACRoleBindingRequest, ::Google::Cloud::GkeHub::V1::RBACRoleBinding + # Creates a Membership RBACRoleBinding. + rpc :CreateMembershipRBACRoleBinding, ::Google::Cloud::GkeHub::V1::CreateMembershipRBACRoleBindingRequest, ::Google::Longrunning::Operation + # Updates a Membership RBACRoleBinding. + rpc :UpdateMembershipRBACRoleBinding, ::Google::Cloud::GkeHub::V1::UpdateMembershipRBACRoleBindingRequest, ::Google::Longrunning::Operation + # Deletes a Membership RBACRoleBinding. + rpc :DeleteMembershipRBACRoleBinding, ::Google::Cloud::GkeHub::V1::DeleteMembershipRBACRoleBindingRequest, ::Google::Longrunning::Operation + # Lists all Membership RBACRoleBindings. + rpc :ListMembershipRBACRoleBindings, ::Google::Cloud::GkeHub::V1::ListMembershipRBACRoleBindingsRequest, ::Google::Cloud::GkeHub::V1::ListMembershipRBACRoleBindingsResponse + # Generates a YAML of the RBAC policies for the specified + # RoleBinding and its associated impersonation resources. + rpc :GenerateMembershipRBACRoleBindingYAML, ::Google::Cloud::GkeHub::V1::GenerateMembershipRBACRoleBindingYAMLRequest, ::Google::Cloud::GkeHub::V1::GenerateMembershipRBACRoleBindingYAMLResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/README.md new file mode 100644 index 000000000000..dd253e4b0c37 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# GKE Hub V1 Protocol Buffer Documentation + +These files are for the YARD documentation of the generated protobuf files. +They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..d59ba51a5612 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/api/client.rb @@ -0,0 +1,473 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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. + 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: + # 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. + 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. + # + # 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 + 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. + # @!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 + + # 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 + end +end diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/api/field_behavior.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # An indicator of the behavior of a given field (for example, that a field + # is required in requests, or given as output but ignored as input). + # This **does not** change the behavior in protocol buffers itself; it only + # denotes the behavior and may affect how API tooling handles the field. + # + # Note: This enum **may** receive new values in the future. + module FieldBehavior + # Conventional default for enums. Do not use this. + FIELD_BEHAVIOR_UNSPECIFIED = 0 + + # Specifically denotes a field as optional. + # While all fields in protocol buffers are optional, this may be specified + # for emphasis if appropriate. + OPTIONAL = 1 + + # Denotes a field as required. + # This indicates that the field **must** be provided as part of the request, + # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). + REQUIRED = 2 + + # Denotes a field as output only. + # This indicates that the field is provided in responses, but including the + # field in a request does nothing (the server *must* ignore it and + # *must not* throw an error as a result of the field's presence). + OUTPUT_ONLY = 3 + + # Denotes a field as input only. + # This indicates that the field is provided in requests, and the + # corresponding field is not included in output. + INPUT_ONLY = 4 + + # Denotes a field as immutable. + # This indicates that the field may be set once in a request to create a + # resource, but may not be changed thereafter. + IMMUTABLE = 5 + + # Denotes that a (repeated) field is an unordered list. + # This indicates that the service may provide the elements of the list + # in any arbitrary order, rather than the order the user originally + # provided. Additionally, the list's order may or may not be stable. + UNORDERED_LIST = 6 + + # Denotes that this field returns a non-empty default value if not set. + # This indicates that if the user provides the empty value in a request, + # a non-empty value will be returned. The user will not be aware of what + # non-empty value to expect. + NON_EMPTY_DEFAULT = 7 + + # Denotes that the field in a resource (a message annotated with + # google.api.resource) is used in the resource name to uniquely identify the + # resource. For AIP-compliant APIs, this should only be applied to the + # `name` field on the resource. + # + # This behavior should not be applied to references to other resources within + # the message. + # + # The identifier field of resources often have different field behavior + # depending on the request it is embedded in (e.g. for Create methods name + # is optional and unused, while for Update methods it is required). Instead + # of method-specific annotations, only `IDENTIFIER` is required. + IDENTIFIER = 8 + end + end +end diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/api/launch_stage.rb @@ -0,0 +1,71 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # The launch stage as defined by [Google Cloud Platform + # Launch Stages](https://cloud.google.com/terms/launch-stages). + module LaunchStage + # Do not use this default value. + LAUNCH_STAGE_UNSPECIFIED = 0 + + # The feature is not yet implemented. Users can not use it. + UNIMPLEMENTED = 6 + + # Prelaunch features are hidden from users and are only visible internally. + PRELAUNCH = 7 + + # Early Access features are limited to a closed group of testers. To use + # these features, you must sign up in advance and sign a Trusted Tester + # agreement (which includes confidentiality provisions). These features may + # be unstable, changed in backward-incompatible ways, and are not + # guaranteed to be released. + EARLY_ACCESS = 1 + + # Alpha is a limited availability test for releases before they are cleared + # for widespread use. By Alpha, all significant design issues are resolved + # and we are in the process of verifying functionality. Alpha customers + # need to apply for access, agree to applicable terms, and have their + # projects allowlisted. Alpha releases don't have to be feature complete, + # no SLAs are provided, and there are no technical support obligations, but + # they will be far enough along that customers can actually use them in + # test environments or for limited-use tests -- just like they would in + # normal production cases. + ALPHA = 2 + + # Beta is the point at which we are ready to open a release for any + # customer to use. There are no SLA or technical support obligations in a + # Beta release. Products will be complete from a feature perspective, but + # may have some open outstanding issues. Beta releases are suitable for + # limited production use cases. + BETA = 3 + + # GA features are open to all developers and are considered stable and + # fully qualified for production use. + GA = 4 + + # Deprecated features are scheduled to be shut down and removed. For more + # information, see the "Deprecation Policy" section of our [Terms of + # Service](https://cloud.google.com/terms/) + # and the [Google Cloud Platform Subject to the Deprecation + # Policy](https://cloud.google.com/terms/deprecation) documentation. + DEPRECATED = 5 + end + end +end diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/api/resource.rb @@ -0,0 +1,227 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # A simple descriptor of a resource type. + # + # ResourceDescriptor annotates a resource message (either by means of a + # protobuf annotation or use in the service config), and associates the + # resource's schema, the resource type, and the pattern of the resource name. + # + # Example: + # + # message Topic { + # // Indicates this message defines a resource schema. + # // Declares the resource type in the format of {service}/{kind}. + # // For Kubernetes resources, the format is {api group}/{kind}. + # option (google.api.resource) = { + # type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: "pubsub.googleapis.com/Topic" + # pattern: "projects/{project}/topics/{topic}" + # + # Sometimes, resources have multiple patterns, typically because they can + # live under multiple parents. + # + # Example: + # + # message LogEntry { + # option (google.api.resource) = { + # type: "logging.googleapis.com/LogEntry" + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # }; + # } + # + # The ResourceDescriptor Yaml config will look like: + # + # resources: + # - type: 'logging.googleapis.com/LogEntry' + # pattern: "projects/{project}/logs/{log}" + # pattern: "folders/{folder}/logs/{log}" + # pattern: "organizations/{organization}/logs/{log}" + # pattern: "billingAccounts/{billing_account}/logs/{log}" + # @!attribute [rw] type + # @return [::String] + # The resource type. It must be in the format of + # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be + # singular and must not include version numbers. + # + # Example: `storage.googleapis.com/Bucket` + # + # The value of the resource_type_kind must follow the regular expression + # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and + # should use PascalCase (UpperCamelCase). The maximum number of + # characters allowed for the `resource_type_kind` is 100. + # @!attribute [rw] pattern + # @return [::Array<::String>] + # Optional. The relative resource name pattern associated with this resource + # type. The DNS prefix of the full resource name shouldn't be specified here. + # + # The path pattern must follow the syntax, which aligns with HTTP binding + # syntax: + # + # Template = Segment { "/" Segment } ; + # Segment = LITERAL | Variable ; + # Variable = "{" LITERAL "}" ; + # + # Examples: + # + # - "projects/\\{project}/topics/\\{topic}" + # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" + # + # The components in braces correspond to the IDs for each resource in the + # hierarchy. It is expected that, if multiple patterns are provided, + # the same component name (e.g. "project") refers to IDs of the same + # type of resource. + # @!attribute [rw] name_field + # @return [::String] + # Optional. The field on the resource that designates the resource name + # field. If omitted, this is assumed to be "name". + # @!attribute [rw] history + # @return [::Google::Api::ResourceDescriptor::History] + # Optional. The historical or future-looking state of the resource pattern. + # + # Example: + # + # // The InspectTemplate message originally only supported resource + # // names with organization, and project was added later. + # message InspectTemplate { + # option (google.api.resource) = { + # type: "dlp.googleapis.com/InspectTemplate" + # pattern: + # "organizations/{organization}/inspectTemplates/{inspect_template}" + # pattern: "projects/{project}/inspectTemplates/{inspect_template}" + # history: ORIGINALLY_SINGLE_PATTERN + # }; + # } + # @!attribute [rw] plural + # @return [::String] + # The plural name used in the resource name and permission names, such as + # 'projects' for the resource name of 'projects/\\{project}' and the permission + # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception + # to this is for Nested Collections that have stuttering names, as defined + # in [AIP-122](https://google.aip.dev/122#nested-collections), where the + # collection ID in the resource name pattern does not necessarily directly + # match the `plural` value. + # + # It is the same concept of the `plural` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # + # Note: The plural form is required even for singleton resources. See + # https://aip.dev/156 + # @!attribute [rw] singular + # @return [::String] + # The same concept of the `singular` field in k8s CRD spec + # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ + # Such as "project" for the `resourcemanager.googleapis.com/Project` type. + # @!attribute [rw] style + # @return [::Array<::Google::Api::ResourceDescriptor::Style>] + # Style flag(s) for this resource. + # These indicate that a resource is expected to conform to a given + # style. See the specific style flags for additional information. + class ResourceDescriptor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A description of the historical or future-looking state of the + # resource pattern. + module History + # The "unset" value. + HISTORY_UNSPECIFIED = 0 + + # The resource originally had one pattern and launched as such, and + # additional patterns were added later. + ORIGINALLY_SINGLE_PATTERN = 1 + + # The resource has one pattern, but the API owner expects to add more + # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents + # that from being necessary once there are multiple patterns.) + FUTURE_MULTI_PATTERN = 2 + end + + # A flag representing a specific style that a resource claims to conform to. + module Style + # The unspecified value. Do not use. + STYLE_UNSPECIFIED = 0 + + # This resource is intended to be "declarative-friendly". + # + # Declarative-friendly resources must be more strictly consistent, and + # setting this to true communicates to tools that this resource should + # adhere to declarative-friendly expectations. + # + # Note: This is used by the API linter (linter.aip.dev) to enable + # additional checks. + DECLARATIVE_FRIENDLY = 1 + end + end + + # Defines a proto annotation that describes a string field that refers to + # an API resource. + # @!attribute [rw] type + # @return [::String] + # The resource type that the annotated field references. + # + # Example: + # + # message Subscription { + # string topic = 2 [(google.api.resource_reference) = { + # type: "pubsub.googleapis.com/Topic" + # }]; + # } + # + # Occasionally, a field may reference an arbitrary resource. In this case, + # APIs use the special value * in their resource reference. + # + # Example: + # + # message GetIamPolicyRequest { + # string resource = 2 [(google.api.resource_reference) = { + # type: "*" + # }]; + # } + # @!attribute [rw] child_type + # @return [::String] + # The resource type of a child collection that the annotated field + # references. This is useful for annotating the `parent` field that + # doesn't have a fixed resource type. + # + # Example: + # + # message ListLogEntriesRequest { + # string parent = 1 [(google.api.resource_reference) = { + # child_type: "logging.googleapis.com/LogEntry" + # }; + # } + class ResourceReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/cloud/gkehub/v1/configmanagement/configmanagement.rb b/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/cloud/gkehub/v1/configmanagement/configmanagement.rb new file mode 100644 index 000000000000..e97869ebf5d8 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/cloud/gkehub/v1/configmanagement/configmanagement.rb @@ -0,0 +1,584 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 GkeHub + module ConfigManagement + module V1 + # **Anthos Config Management**: State for a single cluster. + # @!attribute [rw] cluster_name + # @return [::String] + # This field is set to the `cluster_name` field of the Membership Spec if it + # is not empty. Otherwise, it is set to the cluster's fleet membership name. + # @!attribute [rw] membership_spec + # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::MembershipSpec] + # Membership configuration in the cluster. This represents the actual state + # in the cluster, while the MembershipSpec in the FeatureSpec represents + # the intended state + # @!attribute [rw] operator_state + # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::OperatorState] + # Current install status of ACM's Operator + # @!attribute [rw] config_sync_state + # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::ConfigSyncState] + # Current sync status + # @!attribute [rw] policy_controller_state + # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::PolicyControllerState] + # PolicyController status + # @!attribute [rw] hierarchy_controller_state + # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::HierarchyControllerState] + # Hierarchy Controller status + class MembershipState + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # **Anthos Config Management**: Configuration for a single cluster. + # Intended to parallel the ConfigManagement CR. + # @!attribute [rw] config_sync + # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::ConfigSync] + # Config Sync configuration for the cluster. + # @!attribute [rw] policy_controller + # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::PolicyController] + # Policy Controller configuration for the cluster. + # @!attribute [rw] hierarchy_controller + # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::HierarchyControllerConfig] + # Hierarchy Controller configuration for the cluster. + # @!attribute [rw] version + # @return [::String] + # Version of ACM installed. + # @!attribute [rw] cluster + # @return [::String] + # The user-specified cluster name used by Config Sync cluster-name-selector + # annotation or ClusterSelector, for applying configs to only a subset + # of clusters. + # Omit this field if the cluster's fleet membership name is used by Config + # Sync cluster-name-selector annotation or ClusterSelector. + # Set this field if a name different from the cluster's fleet membership name + # is used by Config Sync cluster-name-selector annotation or ClusterSelector. + # @!attribute [rw] management + # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::MembershipSpec::Management] + # Enables automatic Feature management. + class MembershipSpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Whether to automatically manage the Feature. + module Management + # Unspecified + MANAGEMENT_UNSPECIFIED = 0 + + # Google will manage the Feature for the cluster. + MANAGEMENT_AUTOMATIC = 1 + + # User will manually manage the Feature for the cluster. + MANAGEMENT_MANUAL = 2 + end + end + + # Configuration for Config Sync + # @!attribute [rw] git + # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::GitConfig] + # Git repo configuration for the cluster. + # @!attribute [rw] source_format + # @return [::String] + # Specifies whether the Config Sync Repo is + # in "hierarchical" or "unstructured" mode. + # @!attribute [rw] enabled + # @return [::Boolean] + # Enables the installation of ConfigSync. + # If set to true, ConfigSync resources will be created and the other + # ConfigSync fields will be applied if exist. + # If set to false, all other ConfigSync fields will be ignored, ConfigSync + # resources will be deleted. + # If omitted, ConfigSync resources will be managed depends on the presence + # of the git or oci field. + # @!attribute [rw] prevent_drift + # @return [::Boolean] + # Set to true to enable the Config Sync admission webhook to prevent drifts. + # If set to `false`, disables the Config Sync admission webhook and does not + # prevent drifts. + # @!attribute [rw] oci + # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::OciConfig] + # OCI repo configuration for the cluster + # @!attribute [rw] metrics_gcp_service_account_email + # @return [::String] + # The Email of the Google Cloud Service Account (GSA) used for exporting + # Config Sync metrics to Cloud Monitoring when Workload Identity is enabled. + # The GSA should have the Monitoring Metric Writer + # (roles/monitoring.metricWriter) IAM role. + # The Kubernetes ServiceAccount `default` in the namespace + # `config-management-monitoring` should be bound to the GSA. + class ConfigSync + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Git repo configuration for a single cluster. + # @!attribute [rw] sync_repo + # @return [::String] + # The URL of the Git repository to use as the source of truth. + # @!attribute [rw] sync_branch + # @return [::String] + # The branch of the repository to sync from. Default: master. + # @!attribute [rw] policy_dir + # @return [::String] + # The path within the Git repository that represents the top level of the + # repo to sync. Default: the root directory of the repository. + # @!attribute [rw] sync_wait_secs + # @return [::Integer] + # Period in seconds between consecutive syncs. Default: 15. + # @!attribute [rw] sync_rev + # @return [::String] + # Git revision (tag or hash) to check out. Default HEAD. + # @!attribute [rw] secret_type + # @return [::String] + # Type of secret configured for access to the Git repo. Must be one of ssh, + # cookiefile, gcenode, token, gcpserviceaccount or none. The + # validation of this is case-sensitive. Required. + # @!attribute [rw] https_proxy + # @return [::String] + # URL for the HTTPS proxy to be used when communicating with the Git repo. + # @!attribute [rw] gcp_service_account_email + # @return [::String] + # The Google Cloud Service Account Email used for auth when secret_type is + # gcpServiceAccount. + class GitConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # OCI repo configuration for a single cluster + # @!attribute [rw] sync_repo + # @return [::String] + # The OCI image repository URL for the package to sync from. + # e.g. `LOCATION-docker.pkg.dev/PROJECT_ID/REPOSITORY_NAME/PACKAGE_NAME`. + # @!attribute [rw] policy_dir + # @return [::String] + # The absolute path of the directory that contains + # the local resources. Default: the root directory of the image. + # @!attribute [rw] sync_wait_secs + # @return [::Integer] + # Period in seconds between consecutive syncs. Default: 15. + # @!attribute [rw] secret_type + # @return [::String] + # Type of secret configured for access to the Git repo. + # @!attribute [rw] gcp_service_account_email + # @return [::String] + # The Google Cloud Service Account Email used for auth when secret_type is + # gcpServiceAccount. + class OciConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configuration for Policy Controller + # @!attribute [rw] enabled + # @return [::Boolean] + # Enables the installation of Policy Controller. + # If false, the rest of PolicyController fields take no + # effect. + # @!attribute [rw] template_library_installed + # @return [::Boolean] + # Installs the default template library along with Policy Controller. + # @!attribute [rw] audit_interval_seconds + # @return [::Integer] + # Sets the interval for Policy Controller Audit Scans (in seconds). + # When set to 0, this disables audit functionality altogether. + # @!attribute [rw] exemptable_namespaces + # @return [::Array<::String>] + # The set of namespaces that are excluded from Policy Controller checks. + # Namespaces do not need to currently exist on the cluster. + # @!attribute [rw] referential_rules_enabled + # @return [::Boolean] + # Enables the ability to use Constraint Templates that reference to objects + # other than the object currently being evaluated. + # @!attribute [rw] log_denies_enabled + # @return [::Boolean] + # Logs all denies and dry run failures. + class PolicyController + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configuration for Hierarchy Controller + # @!attribute [rw] enabled + # @return [::Boolean] + # Whether Hierarchy Controller is enabled in this cluster. + # @!attribute [rw] enable_pod_tree_labels + # @return [::Boolean] + # Whether pod tree labels are enabled in this cluster. + # @!attribute [rw] enable_hierarchical_resource_quota + # @return [::Boolean] + # Whether hierarchical resource quota is enabled in this cluster. + class HierarchyControllerConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Deployment state for Hierarchy Controller + # @!attribute [rw] hnc + # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::DeploymentState] + # The deployment state for open source HNC (e.g. v0.7.0-hc.0) + # @!attribute [rw] extension + # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::DeploymentState] + # The deployment state for Hierarchy Controller extension (e.g. v0.7.0-hc.1) + class HierarchyControllerDeploymentState + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Version for Hierarchy Controller + # @!attribute [rw] hnc + # @return [::String] + # Version for open source HNC + # @!attribute [rw] extension + # @return [::String] + # Version for Hierarchy Controller extension + class HierarchyControllerVersion + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # State for Hierarchy Controller + # @!attribute [rw] version + # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::HierarchyControllerVersion] + # The version for Hierarchy Controller + # @!attribute [rw] state + # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::HierarchyControllerDeploymentState] + # The deployment state for Hierarchy Controller + class HierarchyControllerState + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # State information for an ACM's Operator + # @!attribute [rw] version + # @return [::String] + # The semenatic version number of the operator + # @!attribute [rw] deployment_state + # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::DeploymentState] + # The state of the Operator's deployment + # @!attribute [rw] errors + # @return [::Array<::Google::Cloud::GkeHub::ConfigManagement::V1::InstallError>] + # Install errors. + class OperatorState + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Errors pertaining to the installation of ACM + # @!attribute [rw] error_message + # @return [::String] + # A string representing the user facing error message + class InstallError + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # State information for ConfigSync + # @!attribute [rw] version + # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::ConfigSyncVersion] + # The version of ConfigSync deployed + # @!attribute [rw] deployment_state + # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::ConfigSyncDeploymentState] + # Information about the deployment of ConfigSync, including the version + # of the various Pods deployed + # @!attribute [rw] sync_state + # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::SyncState] + # The state of ConfigSync's process to sync configs to a cluster + # @!attribute [rw] errors + # @return [::Array<::Google::Cloud::GkeHub::ConfigManagement::V1::ConfigSyncError>] + # Errors pertaining to the installation of Config Sync. + # @!attribute [rw] rootsync_crd + # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::ConfigSyncState::CRDState] + # The state of the RootSync CRD + # @!attribute [rw] reposync_crd + # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::ConfigSyncState::CRDState] + # The state of the Reposync CRD + # @!attribute [rw] state + # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::ConfigSyncState::State] + # The state of CS + # This field summarizes the other fields in this message. + class ConfigSyncState + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # CRDState representing the state of a CRD + module CRDState + # CRD's state cannot be determined + CRD_STATE_UNSPECIFIED = 0 + + # CRD is not installed + NOT_INSTALLED = 1 + + # CRD is installed + INSTALLED = 2 + + # CRD is terminating (i.e., it has been deleted and is cleaning up) + TERMINATING = 3 + + # CRD is installing + INSTALLING = 4 + end + + module State + # CS's state cannot be determined. + STATE_UNSPECIFIED = 0 + + # CS is not installed. + CONFIG_SYNC_NOT_INSTALLED = 1 + + # The expected CS version is installed successfully. + CONFIG_SYNC_INSTALLED = 2 + + # CS encounters errors. + CONFIG_SYNC_ERROR = 3 + + # CS is installing or terminating. + CONFIG_SYNC_PENDING = 4 + end + end + + # Errors pertaining to the installation of Config Sync + # @!attribute [rw] error_message + # @return [::String] + # A string representing the user facing error message + class ConfigSyncError + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Specific versioning information pertaining to ConfigSync's Pods + # @!attribute [rw] importer + # @return [::String] + # Version of the deployed importer pod + # @!attribute [rw] syncer + # @return [::String] + # Version of the deployed syncer pod + # @!attribute [rw] git_sync + # @return [::String] + # Version of the deployed git-sync pod + # @!attribute [rw] monitor + # @return [::String] + # Version of the deployed monitor pod + # @!attribute [rw] reconciler_manager + # @return [::String] + # Version of the deployed reconciler-manager pod + # @!attribute [rw] root_reconciler + # @return [::String] + # Version of the deployed reconciler container in root-reconciler pod + # @!attribute [rw] admission_webhook + # @return [::String] + # Version of the deployed admission_webhook pod + class ConfigSyncVersion + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The state of ConfigSync's deployment on a cluster + # @!attribute [rw] importer + # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::DeploymentState] + # Deployment state of the importer pod + # @!attribute [rw] syncer + # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::DeploymentState] + # Deployment state of the syncer pod + # @!attribute [rw] git_sync + # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::DeploymentState] + # Deployment state of the git-sync pod + # @!attribute [rw] monitor + # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::DeploymentState] + # Deployment state of the monitor pod + # @!attribute [rw] reconciler_manager + # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::DeploymentState] + # Deployment state of reconciler-manager pod + # @!attribute [rw] root_reconciler + # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::DeploymentState] + # Deployment state of root-reconciler + # @!attribute [rw] admission_webhook + # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::DeploymentState] + # Deployment state of admission-webhook + class ConfigSyncDeploymentState + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # State indicating an ACM's progress syncing configurations to a cluster + # @!attribute [rw] source_token + # @return [::String] + # Token indicating the state of the repo. + # @!attribute [rw] import_token + # @return [::String] + # Token indicating the state of the importer. + # @!attribute [rw] sync_token + # @return [::String] + # Token indicating the state of the syncer. + # @!attribute [rw] last_sync + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Deprecated: use last_sync_time instead. + # Timestamp of when ACM last successfully synced the repo + # The time format is specified in https://golang.org/pkg/time/#Time.String + # @!attribute [rw] last_sync_time + # @return [::Google::Protobuf::Timestamp] + # Timestamp type of when ACM last successfully synced the repo + # @!attribute [rw] code + # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::SyncState::SyncCode] + # Sync status code + # @!attribute [rw] errors + # @return [::Array<::Google::Cloud::GkeHub::ConfigManagement::V1::SyncError>] + # A list of errors resulting from problematic configs. + # This list will be truncated after 100 errors, although it is + # unlikely for that many errors to simultaneously exist. + class SyncState + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # An enum representing Config Sync's status of syncing configs to a cluster. + module SyncCode + # Config Sync cannot determine a sync code + SYNC_CODE_UNSPECIFIED = 0 + + # Config Sync successfully synced the git Repo with the cluster + SYNCED = 1 + + # Config Sync is in the progress of syncing a new change + PENDING = 2 + + # Indicates an error configuring Config Sync, and user action is required + ERROR = 3 + + # Config Sync has been installed but not configured + NOT_CONFIGURED = 4 + + # Config Sync has not been installed + NOT_INSTALLED = 5 + + # Error authorizing with the cluster + UNAUTHORIZED = 6 + + # Cluster could not be reached + UNREACHABLE = 7 + end + end + + # An ACM created error representing a problem syncing configurations + # @!attribute [rw] code + # @return [::String] + # An ACM defined error code + # @!attribute [rw] error_message + # @return [::String] + # A description of the error + # @!attribute [rw] error_resources + # @return [::Array<::Google::Cloud::GkeHub::ConfigManagement::V1::ErrorResource>] + # A list of config(s) associated with the error, if any + class SyncError + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Model for a config file in the git repo with an associated Sync error + # @!attribute [rw] source_path + # @return [::String] + # Path in the git repo of the erroneous config + # @!attribute [rw] resource_name + # @return [::String] + # Metadata name of the resource that is causing an error + # @!attribute [rw] resource_namespace + # @return [::String] + # Namespace of the resource that is causing an error + # @!attribute [rw] resource_gvk + # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::GroupVersionKind] + # Group/version/kind of the resource that is causing an error + class ErrorResource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A Kubernetes object's GVK + # @!attribute [rw] group + # @return [::String] + # Kubernetes Group + # @!attribute [rw] version + # @return [::String] + # Kubernetes Version + # @!attribute [rw] kind + # @return [::String] + # Kubernetes Kind + class GroupVersionKind + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # State for PolicyControllerState. + # @!attribute [rw] version + # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::PolicyControllerVersion] + # The version of Gatekeeper Policy Controller deployed. + # @!attribute [rw] deployment_state + # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::GatekeeperDeploymentState] + # The state about the policy controller installation. + class PolicyControllerState + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The build version of Gatekeeper Policy Controller is using. + # @!attribute [rw] version + # @return [::String] + # The gatekeeper image tag that is composed of ACM version, git tag, build + # number. + class PolicyControllerVersion + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # State of Policy Controller installation. + # @!attribute [rw] gatekeeper_controller_manager_state + # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::DeploymentState] + # Status of gatekeeper-controller-manager pod. + # @!attribute [rw] gatekeeper_audit + # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::DeploymentState] + # Status of gatekeeper-audit deployment. + class GatekeeperDeploymentState + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Enum representing the state of an ACM's deployment on a cluster + module DeploymentState + # Deployment's state cannot be determined + DEPLOYMENT_STATE_UNSPECIFIED = 0 + + # Deployment is not installed + NOT_INSTALLED = 1 + + # Deployment is installed + INSTALLED = 2 + + # Deployment was attempted to be installed, but has errors + ERROR = 3 + + # Deployment is installing or terminating + PENDING = 4 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/cloud/gkehub/v1/feature.rb b/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/cloud/gkehub/v1/feature.rb new file mode 100644 index 000000000000..b4570d53c995 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/cloud/gkehub/v1/feature.rb @@ -0,0 +1,300 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 GkeHub + module V1 + # Feature represents the settings and status of any Fleet Feature. + # @!attribute [r] name + # @return [::String] + # Output only. The full, unique name of this Feature resource in the format + # `projects/*/locations/*/features/*`. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Labels for this Feature. + # @!attribute [r] resource_state + # @return [::Google::Cloud::GkeHub::V1::FeatureResourceState] + # Output only. State of the Feature resource itself. + # @!attribute [rw] spec + # @return [::Google::Cloud::GkeHub::V1::CommonFeatureSpec] + # Optional. Fleet-wide Feature configuration. If this Feature does not + # support any Fleet-wide configuration, this field may be unused. + # @!attribute [rw] membership_specs + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::GkeHub::V1::MembershipFeatureSpec}] + # Optional. Membership-specific configuration for this Feature. If this + # Feature does not support any per-Membership configuration, this field may + # be unused. + # + # The keys indicate which Membership the configuration is for, in the form: + # + # `projects/{p}/locations/{l}/memberships/{m}` + # + # Where \\{p} is the project, \\{l} is a valid location and \\{m} is a valid + # Membership in this project at that location. \\{p} WILL match the Feature's + # project. + # + # \\{p} will always be returned as the project number, but the project ID is + # also accepted during input. If the same Membership is specified in the map + # twice (using the project ID form, and the project number form), exactly + # ONE of the entries will be saved, with no guarantees as to which. For this + # reason, it is recommended the same format be used for all entries when + # mutating a Feature. + # @!attribute [r] state + # @return [::Google::Cloud::GkeHub::V1::CommonFeatureState] + # Output only. The Fleet-wide Feature state. + # @!attribute [r] membership_states + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::GkeHub::V1::MembershipFeatureState}] + # Output only. Membership-specific Feature status. If this Feature does + # report any per-Membership status, this field may be unused. + # + # The keys indicate which Membership the state is for, in the form: + # + # `projects/{p}/locations/{l}/memberships/{m}` + # + # Where \\{p} is the project number, \\{l} is a valid location and \\{m} is a valid + # Membership in this project at that location. \\{p} MUST match the Feature's + # project number. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. When the Feature resource was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. When the Feature resource was last updated. + # @!attribute [r] delete_time + # @return [::Google::Protobuf::Timestamp] + # Output only. When the Feature resource was deleted. + # @!attribute [rw] scope_specs + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::GkeHub::V1::ScopeFeatureSpec}] + # Optional. Scope-specific configuration for this Feature. If this Feature + # does not support any per-Scope configuration, this field may be unused. + # + # The keys indicate which Scope the configuration is for, in the form: + # + # `projects/{p}/locations/global/scopes/{s}` + # + # Where \\{p} is the project, \\{s} is a valid Scope in this project. + # \\{p} WILL match the Feature's project. + # + # \\{p} will always be returned as the project number, but the project ID is + # also accepted during input. If the same Scope is specified in the map + # twice (using the project ID form, and the project number form), exactly + # ONE of the entries will be saved, with no guarantees as to which. For this + # reason, it is recommended the same format be used for all entries when + # mutating a Feature. + # @!attribute [r] scope_states + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::GkeHub::V1::ScopeFeatureState}] + # Output only. Scope-specific Feature status. If this Feature does + # report any per-Scope status, this field may be unused. + # + # The keys indicate which Scope the state is for, in the form: + # + # `projects/{p}/locations/global/scopes/{s}` + # + # Where \\{p} is the project, \\{s} is a valid Scope in this project. + # \\{p} WILL match the Feature's project. + # @!attribute [r] unreachable + # @return [::Array<::String>] + # Output only. List of locations that could not be reached while fetching + # this feature. + class Feature + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::GkeHub::V1::MembershipFeatureSpec] + class MembershipSpecsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::GkeHub::V1::MembershipFeatureState] + class MembershipStatesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::GkeHub::V1::ScopeFeatureSpec] + class ScopeSpecsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::GkeHub::V1::ScopeFeatureState] + class ScopeStatesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # FeatureResourceState describes the state of a Feature *resource* in the + # GkeHub API. See `FeatureState` for the "running state" of the Feature in the + # Fleet and across Memberships. + # @!attribute [rw] state + # @return [::Google::Cloud::GkeHub::V1::FeatureResourceState::State] + # The current state of the Feature resource in the Hub API. + class FeatureResourceState + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # State describes the lifecycle status of a Feature. + module State + # State is unknown or not set. + STATE_UNSPECIFIED = 0 + + # The Feature is being enabled, and the Feature resource is being created. + # Once complete, the corresponding Feature will be enabled in this Fleet. + ENABLING = 1 + + # The Feature is enabled in this Fleet, and the Feature resource is fully + # available. + ACTIVE = 2 + + # The Feature is being disabled in this Fleet, and the Feature resource + # is being deleted. + DISABLING = 3 + + # The Feature resource is being updated. + UPDATING = 4 + + # The Feature resource is being updated by the Hub Service. + SERVICE_UPDATING = 5 + end + end + + # FeatureState describes the high-level state of a Feature. It may be used to + # describe a Feature's state at the environ-level, or per-membershop, depending + # on the context. + # @!attribute [rw] code + # @return [::Google::Cloud::GkeHub::V1::FeatureState::Code] + # The high-level, machine-readable status of this Feature. + # @!attribute [rw] description + # @return [::String] + # A human-readable description of the current status. + # @!attribute [rw] update_time + # @return [::Google::Protobuf::Timestamp] + # The time this status and any related Feature-specific details were updated. + class FeatureState + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Code represents a machine-readable, high-level status of the Feature. + module Code + # Unknown or not set. + CODE_UNSPECIFIED = 0 + + # The Feature is operating normally. + OK = 1 + + # The Feature has encountered an issue, and is operating in a degraded + # state. The Feature may need intervention to return to normal operation. + # See the description and any associated Feature-specific details for more + # information. + WARNING = 2 + + # The Feature is not operating or is in a severely degraded state. + # The Feature may need intervention to return to normal operation. + # See the description and any associated Feature-specific details for more + # information. + ERROR = 3 + end + end + + # CommonFeatureSpec contains Hub-wide configuration information + # @!attribute [rw] multiclusteringress + # @return [::Google::Cloud::GkeHub::MultiClusterIngress::V1::FeatureSpec] + # Multicluster Ingress-specific spec. + class CommonFeatureSpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # CommonFeatureState contains Fleet-wide Feature status information. + # @!attribute [rw] rbacrolebindingactuation + # @return [::Google::Cloud::GkeHub::RbacRoleBindingActuation::V1::FeatureState] + # RBAC Role Binding Actuation feature state + # @!attribute [r] state + # @return [::Google::Cloud::GkeHub::V1::FeatureState] + # Output only. The "running state" of the Feature in this Fleet. + class CommonFeatureState + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # ScopeFeatureSpec contains feature specs for a fleet scope. + class ScopeFeatureSpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # ScopeFeatureState contains Scope-wide Feature status information. + # @!attribute [r] state + # @return [::Google::Cloud::GkeHub::V1::FeatureState] + # Output only. The "running state" of the Feature in this Scope. + class ScopeFeatureState + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # MembershipFeatureSpec contains configuration information for a single + # Membership. + # @!attribute [rw] configmanagement + # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::MembershipSpec] + # Config Management-specific spec. + class MembershipFeatureSpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # MembershipFeatureState contains Feature status information for a single + # Membership. + # @!attribute [rw] configmanagement + # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::MembershipState] + # Config Management-specific state. + # @!attribute [rw] state + # @return [::Google::Cloud::GkeHub::V1::FeatureState] + # The high-level state of this Feature for a single membership. + class MembershipFeatureState + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/cloud/gkehub/v1/fleet.rb b/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/cloud/gkehub/v1/fleet.rb new file mode 100644 index 000000000000..f759b5b24428 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/cloud/gkehub/v1/fleet.rb @@ -0,0 +1,591 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 GkeHub + module V1 + # Fleet contains the Fleet-wide metadata and configuration. + # @!attribute [r] name + # @return [::String] + # Output only. The full, unique resource name of this fleet in the format of + # `projects/{project}/locations/{location}/fleets/{fleet}`. + # + # Each Google Cloud project can have at most one fleet resource, named + # "default". + # @!attribute [rw] display_name + # @return [::String] + # Optional. A user-assigned display name of the Fleet. + # When present, it must be between 4 to 30 characters. + # Allowed characters are: lowercase and uppercase letters, numbers, + # hyphen, single-quote, double-quote, space, and exclamation point. + # + # Example: `Production Fleet` + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. When the Fleet was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. When the Fleet was last updated. + # @!attribute [r] delete_time + # @return [::Google::Protobuf::Timestamp] + # Output only. When the Fleet was deleted. + # @!attribute [r] uid + # @return [::String] + # Output only. Google-generated UUID for this resource. This is unique across + # all Fleet resources. If a Fleet resource is deleted and another resource + # with the same name is created, it gets a different uid. + # @!attribute [r] state + # @return [::Google::Cloud::GkeHub::V1::FleetLifecycleState] + # Output only. State of the namespace resource. + # @!attribute [rw] default_cluster_config + # @return [::Google::Cloud::GkeHub::V1::DefaultClusterConfig] + # Optional. The default cluster configurations to apply across the fleet. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Labels for this Fleet. + class Fleet + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # DefaultClusterConfig describes the default cluster configurations to be + # applied to all clusters born-in-fleet. + # @!attribute [rw] security_posture_config + # @return [::Google::Cloud::GkeHub::V1::SecurityPostureConfig] + # Enable/Disable Security Posture features for the cluster. + # @!attribute [rw] binary_authorization_config + # @return [::Google::Cloud::GkeHub::V1::BinaryAuthorizationConfig] + # Optional. Enable/Disable binary authorization features for the cluster. + # @!attribute [rw] compliance_posture_config + # @return [::Google::Cloud::GkeHub::V1::CompliancePostureConfig] + # Optional. Enable/Disable Compliance Posture features for the cluster. + # Note that on UpdateFleet, only full replacement of this field is allowed. + # Users are not allowed for partial updates through field mask. + class DefaultClusterConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # SecurityPostureConfig defines the flags needed to enable/disable features for + # the Security Posture API. + # @!attribute [rw] mode + # @return [::Google::Cloud::GkeHub::V1::SecurityPostureConfig::Mode] + # Sets which mode to use for Security Posture features. + # @!attribute [rw] vulnerability_mode + # @return [::Google::Cloud::GkeHub::V1::SecurityPostureConfig::VulnerabilityMode] + # Sets which mode to use for vulnerability scanning. + class SecurityPostureConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Mode defines enablement mode for GKE Security posture features. + module Mode + # Default value not specified. + MODE_UNSPECIFIED = 0 + + # Disables Security Posture features on the cluster. + DISABLED = 1 + + # Applies Security Posture features on the cluster. + BASIC = 2 + + # Applies the Security Posture off cluster Enterprise level features. + ENTERPRISE = 3 + end + + # VulnerabilityMode defines enablement mode for vulnerability scanning. + module VulnerabilityMode + # Default value not specified. + VULNERABILITY_MODE_UNSPECIFIED = 0 + + # Disables vulnerability scanning on the cluster. + VULNERABILITY_DISABLED = 1 + + # Applies basic vulnerability scanning on the cluster. + VULNERABILITY_BASIC = 2 + + # Applies the Security Posture's vulnerability on cluster Enterprise level + # features. + VULNERABILITY_ENTERPRISE = 3 + end + end + + # BinaryAuthorizationConfig defines the fleet level configuration of binary + # authorization feature. + # @!attribute [rw] evaluation_mode + # @return [::Google::Cloud::GkeHub::V1::BinaryAuthorizationConfig::EvaluationMode] + # Optional. Mode of operation for binauthz policy evaluation. + # @!attribute [rw] policy_bindings + # @return [::Array<::Google::Cloud::GkeHub::V1::BinaryAuthorizationConfig::PolicyBinding>] + # Optional. Binauthz policies that apply to this cluster. + class BinaryAuthorizationConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Binauthz policy that applies to this cluster. + # @!attribute [rw] name + # @return [::String] + # The relative resource name of the binauthz platform policy to audit. GKE + # platform policies have the following format: + # `projects/{project_number}/platforms/gke/policies/{policy_id}`. + class PolicyBinding + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Binary Authorization mode of operation. + module EvaluationMode + # Default value + EVALUATION_MODE_UNSPECIFIED = 0 + + # Disable BinaryAuthorization + DISABLED = 1 + + # Use Binary Authorization with the policies specified in policy_bindings. + POLICY_BINDINGS = 2 + end + end + + # CompliancePostureConfig defines the settings needed to enable/disable + # features for the Compliance Posture. + # @!attribute [rw] mode + # @return [::Google::Cloud::GkeHub::V1::CompliancePostureConfig::Mode] + # Defines the enablement mode for Compliance Posture. + # @!attribute [rw] compliance_standards + # @return [::Array<::Google::Cloud::GkeHub::V1::CompliancePostureConfig::ComplianceStandard>] + # List of enabled compliance standards. + class CompliancePostureConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] standard + # @return [::String] + # Name of the compliance standard. + class ComplianceStandard + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + module Mode + # Default value not specified. + MODE_UNSPECIFIED = 0 + + # Disables Compliance Posture features on the cluster. + DISABLED = 1 + + # Enables Compliance Posture features on the cluster. + ENABLED = 2 + end + end + + # FleetLifecycleState describes the state of a Fleet resource. + # @!attribute [r] code + # @return [::Google::Cloud::GkeHub::V1::FleetLifecycleState::Code] + # Output only. The current state of the Fleet resource. + class FleetLifecycleState + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Code describes the state of a Fleet resource. + module Code + # The code is not set. + CODE_UNSPECIFIED = 0 + + # The fleet is being created. + CREATING = 1 + + # The fleet active. + READY = 2 + + # The fleet is being deleted. + DELETING = 3 + + # The fleet is being updated. + UPDATING = 4 + end + end + + # Namespace represents a namespace across the Fleet + # @!attribute [rw] name + # @return [::String] + # The resource name for the namespace + # `projects/{project}/locations/{location}/namespaces/{namespace}` + # @!attribute [r] uid + # @return [::String] + # Output only. Google-generated UUID for this resource. This is unique across + # all namespace resources. If a namespace resource is deleted and another + # resource with the same name is created, it gets a different uid. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. When the namespace was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. When the namespace was last updated. + # @!attribute [r] delete_time + # @return [::Google::Protobuf::Timestamp] + # Output only. When the namespace was deleted. + # @!attribute [r] state + # @return [::Google::Cloud::GkeHub::V1::NamespaceLifecycleState] + # Output only. State of the namespace resource. + # @!attribute [rw] scope + # @return [::String] + # Required. Scope associated with the namespace + # @!attribute [rw] namespace_labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Namespace-level cluster namespace labels. These labels are + # applied to the related namespace of the member clusters bound to the parent + # Scope. Scope-level labels (`namespace_labels` in the Fleet Scope + # resource) take precedence over Namespace-level labels if they share + # a key. Keys and values must be Kubernetes-conformant. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Labels for this Namespace. + class Namespace + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class NamespaceLabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # NamespaceLifecycleState describes the state of a Namespace resource. + # @!attribute [r] code + # @return [::Google::Cloud::GkeHub::V1::NamespaceLifecycleState::Code] + # Output only. The current state of the Namespace resource. + class NamespaceLifecycleState + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Code describes the state of a Namespace resource. + module Code + # The code is not set. + CODE_UNSPECIFIED = 0 + + # The namespace is being created. + CREATING = 1 + + # The namespace active. + READY = 2 + + # The namespace is being deleted. + DELETING = 3 + + # The namespace is being updated. + UPDATING = 4 + end + end + + # RBACRoleBinding represents a rbacrolebinding across the Fleet + # @!attribute [rw] user + # @return [::String] + # user is the name of the user as seen by the kubernetes cluster, example + # "alice" or "alice@domain.tld" + # + # Note: The following fields are mutually exclusive: `user`, `group`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] group + # @return [::String] + # group is the group, as seen by the kubernetes cluster. + # + # Note: The following fields are mutually exclusive: `group`, `user`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] name + # @return [::String] + # The resource name for the rbacrolebinding + # `projects/{project}/locations/{location}/scopes/{scope}/rbacrolebindings/{rbacrolebinding}` + # or + # `projects/{project}/locations/{location}/memberships/{membership}/rbacrolebindings/{rbacrolebinding}` + # @!attribute [r] uid + # @return [::String] + # Output only. Google-generated UUID for this resource. This is unique across + # all rbacrolebinding resources. If a rbacrolebinding resource is deleted and + # another resource with the same name is created, it gets a different uid. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. When the rbacrolebinding was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. When the rbacrolebinding was last updated. + # @!attribute [r] delete_time + # @return [::Google::Protobuf::Timestamp] + # Output only. When the rbacrolebinding was deleted. + # @!attribute [r] state + # @return [::Google::Cloud::GkeHub::V1::RBACRoleBindingLifecycleState] + # Output only. State of the rbacrolebinding resource. + # @!attribute [rw] role + # @return [::Google::Cloud::GkeHub::V1::RBACRoleBinding::Role] + # Required. Role to bind to the principal + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Labels for this RBACRolebinding. + class RBACRoleBinding + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Role is the type for Kubernetes roles + # @!attribute [rw] predefined_role + # @return [::Google::Cloud::GkeHub::V1::RBACRoleBinding::Role::PredefinedRoles] + # predefined_role is the Kubernetes default role to use + # @!attribute [rw] custom_role + # @return [::String] + # Optional. custom_role is the name of a custom KubernetesClusterRole to + # use. + class Role + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # PredefinedRoles is an ENUM representation of the default Kubernetes Roles + module PredefinedRoles + # UNKNOWN + UNKNOWN = 0 + + # ADMIN has EDIT and RBAC permissions + ADMIN = 1 + + # EDIT can edit all resources except RBAC + EDIT = 2 + + # VIEW can only read resources + VIEW = 3 + + # ANTHOS_SUPPORT gives Google Support read-only access to a number of + # cluster resources. + ANTHOS_SUPPORT = 4 + end + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # RBACRoleBindingLifecycleState describes the state of a RbacRoleBinding + # resource. + # @!attribute [r] code + # @return [::Google::Cloud::GkeHub::V1::RBACRoleBindingLifecycleState::Code] + # Output only. The current state of the rbacrolebinding resource. + class RBACRoleBindingLifecycleState + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Code describes the state of a rbacrolebinding resource. + module Code + # The code is not set. + CODE_UNSPECIFIED = 0 + + # The rbacrolebinding is being created. + CREATING = 1 + + # The rbacrolebinding active. + READY = 2 + + # The rbacrolebinding is being deleted. + DELETING = 3 + + # The rbacrolebinding is being updated. + UPDATING = 4 + end + end + + # Scope represents a Scope in a Fleet. + # @!attribute [rw] name + # @return [::String] + # The resource name for the scope + # `projects/{project}/locations/{location}/scopes/{scope}` + # @!attribute [r] uid + # @return [::String] + # Output only. Google-generated UUID for this resource. This is unique across + # all scope resources. If a scope resource is deleted and another resource + # with the same name is created, it gets a different uid. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. When the scope was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. When the scope was last updated. + # @!attribute [r] delete_time + # @return [::Google::Protobuf::Timestamp] + # Output only. When the scope was deleted. + # @!attribute [r] state + # @return [::Google::Cloud::GkeHub::V1::ScopeLifecycleState] + # Output only. State of the scope resource. + # @!attribute [rw] namespace_labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Scope-level cluster namespace labels. For the member clusters + # bound to the Scope, these labels are applied to each namespace under the + # Scope. Scope-level labels take precedence over Namespace-level + # labels (`namespace_labels` in the Fleet Namespace resource) if they + # share a key. Keys and values must be Kubernetes-conformant. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Labels for this Scope. + class Scope + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class NamespaceLabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # ScopeLifecycleState describes the state of a Scope resource. + # @!attribute [r] code + # @return [::Google::Cloud::GkeHub::V1::ScopeLifecycleState::Code] + # Output only. The current state of the scope resource. + class ScopeLifecycleState + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Code describes the state of a Scope resource. + module Code + # The code is not set. + CODE_UNSPECIFIED = 0 + + # The scope is being created. + CREATING = 1 + + # The scope active. + READY = 2 + + # The scope is being deleted. + DELETING = 3 + + # The scope is being updated. + UPDATING = 4 + end + end + + # MembershipBinding is a subresource of a Membership, representing + # what Fleet Scopes (or other, future Fleet resources) a Membership is bound + # to. + # @!attribute [rw] scope + # @return [::String] + # A Scope resource name in the format + # `projects/*/locations/*/scopes/*`. + # @!attribute [rw] name + # @return [::String] + # The resource name for the membershipbinding itself + # `projects/{project}/locations/{location}/memberships/{membership}/bindings/{membershipbinding}` + # @!attribute [r] uid + # @return [::String] + # Output only. Google-generated UUID for this resource. This is unique across + # all membershipbinding resources. If a membershipbinding resource is deleted + # and another resource with the same name is created, it gets a different + # uid. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. When the membership binding was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. When the membership binding was last updated. + # @!attribute [r] delete_time + # @return [::Google::Protobuf::Timestamp] + # Output only. When the membership binding was deleted. + # @!attribute [r] state + # @return [::Google::Cloud::GkeHub::V1::MembershipBindingLifecycleState] + # Output only. State of the membership binding resource. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Labels for this MembershipBinding. + class MembershipBinding + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # MembershipBindingLifecycleState describes the state of a Binding resource. + # @!attribute [r] code + # @return [::Google::Cloud::GkeHub::V1::MembershipBindingLifecycleState::Code] + # Output only. The current state of the MembershipBinding resource. + class MembershipBindingLifecycleState + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Code describes the state of a MembershipBinding resource. + module Code + # The code is not set. + CODE_UNSPECIFIED = 0 + + # The membershipbinding is being created. + CREATING = 1 + + # The membershipbinding active. + READY = 2 + + # The membershipbinding is being deleted. + DELETING = 3 + + # The membershipbinding is being updated. + UPDATING = 4 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/cloud/gkehub/v1/membership.rb b/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/cloud/gkehub/v1/membership.rb new file mode 100644 index 000000000000..04f762eb627b --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/cloud/gkehub/v1/membership.rb @@ -0,0 +1,370 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 GkeHub + module V1 + # Membership contains information about a member cluster. + # @!attribute [rw] endpoint + # @return [::Google::Cloud::GkeHub::V1::MembershipEndpoint] + # Optional. Endpoint information to reach this member. + # @!attribute [r] name + # @return [::String] + # Output only. The full, unique name of this Membership resource in the + # format `projects/*/locations/*/memberships/{membership_id}`, set during + # creation. + # + # `membership_id` must be a valid RFC 1123 compliant DNS label: + # + # 1. At most 63 characters in length + # 2. It must consist of lower case alphanumeric characters or `-` + # 3. It must start and end with an alphanumeric character + # + # Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, + # with a maximum length of 63 characters. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Labels for this membership. + # @!attribute [r] description + # @return [::String] + # Output only. Description of this membership, limited to 63 characters. + # Must match the regex: `[a-zA-Z0-9][a-zA-Z0-9_\-\.\ ]*` + # + # This field is present for legacy purposes. + # @!attribute [r] state + # @return [::Google::Cloud::GkeHub::V1::MembershipState] + # Output only. State of the Membership resource. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. When the Membership was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. When the Membership was last updated. + # @!attribute [r] delete_time + # @return [::Google::Protobuf::Timestamp] + # Output only. When the Membership was deleted. + # @!attribute [rw] external_id + # @return [::String] + # Optional. An externally-generated and managed ID for this Membership. This + # ID may be modified after creation, but this is not recommended. + # + # The ID must match the regex: `[a-zA-Z0-9][a-zA-Z0-9_\-\.]*` + # + # If this Membership represents a Kubernetes cluster, this value should be + # set to the UID of the `kube-system` namespace object. + # @!attribute [r] last_connection_time + # @return [::Google::Protobuf::Timestamp] + # Output only. For clusters using Connect, the timestamp of the most recent + # connection established with Google Cloud. This time is updated every + # several minutes, not continuously. For clusters that do not use GKE + # Connect, or that have never connected successfully, this field will be + # unset. + # @!attribute [r] unique_id + # @return [::String] + # Output only. Google-generated UUID for this resource. This is unique across + # all Membership resources. If a Membership resource is deleted and another + # resource with the same name is created, it gets a different unique_id. + # @!attribute [rw] authority + # @return [::Google::Cloud::GkeHub::V1::Authority] + # Optional. How to identify workloads from this Membership. + # See the documentation on Workload Identity for more details: + # https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity + # @!attribute [rw] monitoring_config + # @return [::Google::Cloud::GkeHub::V1::MonitoringConfig] + # Optional. The monitoring config information for this membership. + class Membership + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # MembershipEndpoint contains information needed to contact a Kubernetes API, + # endpoint and any additional Kubernetes metadata. + # @!attribute [rw] gke_cluster + # @return [::Google::Cloud::GkeHub::V1::GkeCluster] + # Optional. GKE-specific information. Only present if this Membership is a GKE cluster. + # @!attribute [r] kubernetes_metadata + # @return [::Google::Cloud::GkeHub::V1::KubernetesMetadata] + # Output only. Useful Kubernetes-specific metadata. + # @!attribute [rw] kubernetes_resource + # @return [::Google::Cloud::GkeHub::V1::KubernetesResource] + # Optional. The in-cluster Kubernetes Resources that should be applied for a + # correctly registered cluster, in the steady state. These resources: + # + # * Ensure that the cluster is exclusively registered to one and only one + # Hub Membership. + # * Propagate Workload Pool Information available in the Membership + # Authority field. + # * Ensure proper initial configuration of default Hub Features. + # @!attribute [r] google_managed + # @return [::Boolean] + # Output only. Whether the lifecycle of this membership is managed by a + # google cluster platform service. + class MembershipEndpoint + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # KubernetesResource contains the YAML manifests and configuration for + # Membership Kubernetes resources in the cluster. After CreateMembership or + # UpdateMembership, these resources should be re-applied in the cluster. + # @!attribute [rw] membership_cr_manifest + # @return [::String] + # Input only. The YAML representation of the Membership CR. This field is + # ignored for GKE clusters where Hub can read the CR directly. + # + # Callers should provide the CR that is currently present in the cluster + # during CreateMembership or UpdateMembership, or leave this field empty if + # none exists. The CR manifest is used to validate the cluster has not been + # registered with another Membership. + # @!attribute [r] membership_resources + # @return [::Array<::Google::Cloud::GkeHub::V1::ResourceManifest>] + # Output only. Additional Kubernetes resources that need to be applied to the + # cluster after Membership creation, and after every update. + # + # This field is only populated in the Membership returned from a successful + # long-running operation from CreateMembership or UpdateMembership. It is not + # populated during normal GetMembership or ListMemberships requests. To get + # the resource manifest after the initial registration, the caller should + # make a UpdateMembership call with an empty field mask. + # @!attribute [r] connect_resources + # @return [::Array<::Google::Cloud::GkeHub::V1::ResourceManifest>] + # Output only. The Kubernetes resources for installing the GKE Connect agent + # + # This field is only populated in the Membership returned from a successful + # long-running operation from CreateMembership or UpdateMembership. It is not + # populated during normal GetMembership or ListMemberships requests. To get + # the resource manifest after the initial registration, the caller should + # make a UpdateMembership call with an empty field mask. + # @!attribute [rw] resource_options + # @return [::Google::Cloud::GkeHub::V1::ResourceOptions] + # Optional. Options for Kubernetes resource generation. + class KubernetesResource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # ResourceOptions represent options for Kubernetes resource generation. + # @!attribute [rw] connect_version + # @return [::String] + # Optional. The Connect agent version to use for connect_resources. Defaults + # to the latest GKE Connect version. The version must be a currently + # supported version, obsolete versions will be rejected. + # @!attribute [rw] v1beta1_crd + # @return [::Boolean] + # Optional. Use `apiextensions/v1beta1` instead of `apiextensions/v1` for + # CustomResourceDefinition resources. + # This option should be set for clusters with Kubernetes apiserver versions + # <1.16. + # @!attribute [rw] k8s_version + # @return [::String] + # Optional. Major and minor version of the Kubernetes cluster. This is only + # used to determine which version to use for the CustomResourceDefinition + # resources, `apiextensions/v1beta1` or`apiextensions/v1`. + # @!attribute [rw] k8s_git_version + # @return [::String] + # Optional. Git version of the Kubernetes cluster. This is only used to gate + # the Connect Agent migration to svc.id.goog on GDC-SO 1.33.100 patch and + # above. + class ResourceOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # ResourceManifest represents a single Kubernetes resource to be applied to + # the cluster. + # @!attribute [rw] manifest + # @return [::String] + # YAML manifest of the resource. + # @!attribute [rw] cluster_scoped + # @return [::Boolean] + # Whether the resource provided in the manifest is `cluster_scoped`. + # If unset, the manifest is assumed to be namespace scoped. + # + # This field is used for REST mapping when applying the resource in a + # cluster. + class ResourceManifest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # GkeCluster contains information specific to GKE clusters. + # @!attribute [rw] resource_link + # @return [::String] + # Immutable. Self-link of the Google Cloud resource for the GKE cluster. For + # example: + # + # //container.googleapis.com/projects/my-project/locations/us-west1-a/clusters/my-cluster + # + # Zonal clusters are also supported. + # @!attribute [r] cluster_missing + # @return [::Boolean] + # Output only. If cluster_missing is set then it denotes that the GKE cluster + # no longer exists in the GKE Control Plane. + class GkeCluster + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # KubernetesMetadata provides informational metadata for Memberships + # representing Kubernetes clusters. + # @!attribute [r] kubernetes_api_server_version + # @return [::String] + # Output only. Kubernetes API server version string as reported by + # `/version`. + # @!attribute [r] node_provider_id + # @return [::String] + # Output only. Node providerID as reported by the first node in the list of + # nodes on the Kubernetes endpoint. On Kubernetes platforms that support + # zero-node clusters (like GKE-on-GCP), the node_count will be zero and the + # node_provider_id will be empty. + # @!attribute [r] node_count + # @return [::Integer] + # Output only. Node count as reported by Kubernetes nodes resources. + # @!attribute [r] vcpu_count + # @return [::Integer] + # Output only. vCPU count as reported by Kubernetes nodes resources. + # @!attribute [r] memory_mb + # @return [::Integer] + # Output only. The total memory capacity as reported by the sum of all + # Kubernetes nodes resources, defined in MB. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which these details were last updated. This + # update_time is different from the Membership-level update_time since + # EndpointDetails are updated internally for API consumers. + class KubernetesMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This field informs Fleet-based applications/services/UIs with the necessary + # information for where each underlying Cluster reports its metrics. + # @!attribute [rw] project_id + # @return [::String] + # Immutable. Project used to report Metrics + # @!attribute [rw] location + # @return [::String] + # Immutable. Location used to report Metrics + # @!attribute [rw] cluster + # @return [::String] + # Immutable. Cluster name used to report metrics. + # For Anthos on VMWare/Baremetal, it would be in format + # `memberClusters/cluster_name`; And for Anthos on MultiCloud, it would be in + # format + # `{azureClusters, awsClusters}/cluster_name`. + # @!attribute [rw] kubernetes_metrics_prefix + # @return [::String] + # Kubernetes system metrics, if available, are written to this prefix. + # This defaults to kubernetes.io for GKE, and kubernetes.io/anthos for Anthos + # eventually. Noted: Anthos MultiCloud will have kubernetes.io prefix today + # but will migration to be under kubernetes.io/anthos + # @!attribute [rw] cluster_hash + # @return [::String] + # Immutable. Cluster hash, this is a unique string generated by google code, + # which does not contain any PII, which we can use to reference the cluster. + # This is expected to be created by the monitoring stack and persisted into + # the Cluster object as well as to GKE-Hub. + class MonitoringConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # MembershipState describes the state of a Membership resource. + # @!attribute [r] code + # @return [::Google::Cloud::GkeHub::V1::MembershipState::Code] + # Output only. The current state of the Membership resource. + class MembershipState + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Code describes the state of a Membership resource. + module Code + # The code is not set. + CODE_UNSPECIFIED = 0 + + # The cluster is being registered. + CREATING = 1 + + # The cluster is registered. + READY = 2 + + # The cluster is being unregistered. + DELETING = 3 + + # The Membership is being updated. + UPDATING = 4 + + # The Membership is being updated by the Hub Service. + SERVICE_UPDATING = 5 + end + end + + # Authority encodes how Google will recognize identities from this Membership. + # See the workload identity documentation for more details: + # https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity + # @!attribute [rw] issuer + # @return [::String] + # Optional. A JSON Web Token (JWT) issuer URI. `issuer` must start with + # `https://` and be a valid URL with length <2000 characters. + # + # If set, then Google will allow valid OIDC tokens from this issuer to + # authenticate within the workload_identity_pool. OIDC discovery will be + # performed on this URI to validate tokens from the issuer. + # + # Clearing `issuer` disables Workload Identity. `issuer` cannot be directly + # modified; it must be cleared (and Workload Identity disabled) before using + # a new issuer (and re-enabling Workload Identity). + # @!attribute [r] workload_identity_pool + # @return [::String] + # Output only. The name of the workload identity pool in which `issuer` will + # be recognized. + # + # There is a single Workload Identity Pool per Hub that is shared + # between all Memberships that belong to that Hub. For a Hub hosted in + # \\{PROJECT_ID}, the workload pool format is `{PROJECT_ID}.hub.id.goog`, + # although this is subject to change in newer versions of this API. + # @!attribute [r] identity_provider + # @return [::String] + # Output only. An identity provider that reflects the `issuer` in the + # workload identity pool. + # @!attribute [rw] oidc_jwks + # @return [::String] + # Optional. OIDC verification keys for this Membership in JWKS format (RFC + # 7517). + # + # When this field is set, OIDC discovery will NOT be performed on `issuer`, + # and instead OIDC tokens will be validated using this field. + class Authority + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/cloud/gkehub/v1/multiclusteringress/multiclusteringress.rb b/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/cloud/gkehub/v1/multiclusteringress/multiclusteringress.rb new file mode 100644 index 000000000000..fba6cc355b8a --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/cloud/gkehub/v1/multiclusteringress/multiclusteringress.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! + + +module Google + module Cloud + module GkeHub + module MultiClusterIngress + module V1 + # **Multi-cluster Ingress**: The configuration for the MultiClusterIngress + # feature. + # @!attribute [rw] config_membership + # @return [::String] + # Fully-qualified Membership name which hosts the MultiClusterIngress CRD. + # Example: `projects/foo-proj/locations/global/memberships/bar` + class FeatureSpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/cloud/gkehub/v1/rbacrolebindingactuation/rbacrolebindingactuation.rb b/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/cloud/gkehub/v1/rbacrolebindingactuation/rbacrolebindingactuation.rb new file mode 100644 index 000000000000..41386f176f58 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/cloud/gkehub/v1/rbacrolebindingactuation/rbacrolebindingactuation.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! + + +module Google + module Cloud + module GkeHub + module RbacRoleBindingActuation + module V1 + # **RBAC RoleBinding Actuation**: The Hub-wide input for the + # RBACRoleBindingActuation feature. + # @!attribute [rw] allowed_custom_roles + # @return [::Array<::String>] + # The list of allowed custom roles (ClusterRoles). If a ClusterRole is not + # part of this list, it cannot be used in a Scope RBACRoleBinding. If a + # ClusterRole in this list is in use, it cannot be removed from the list. + class FeatureSpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # **RBAC RoleBinding Actuation**: An empty state left as an example Hub-wide + # Feature state. + class FeatureState + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/cloud/gkehub/v1/service.rb b/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/cloud/gkehub/v1/service.rb new file mode 100644 index 000000000000..fd04c6333d37 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/cloud/gkehub/v1/service.rb @@ -0,0 +1,1142 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 GkeHub + module V1 + # Request message for the `GkeHub.GetNamespace` method. + # @!attribute [rw] name + # @return [::String] + # Required. The Namespace resource name in the format + # `projects/*/locations/*/scopes/*/namespaces/*`. + class GetScopeNamespaceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to create a fleet namespace. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent (project and location) where the Namespace will be + # created. Specified in the format `projects/*/locations/*/scopes/*`. + # @!attribute [rw] scope_namespace_id + # @return [::String] + # Required. Client chosen ID for the Namespace. `namespace_id` must be a + # valid RFC 1123 compliant DNS label: + # + # 1. At most 63 characters in length + # 2. It must consist of lower case alphanumeric characters or `-` + # 3. It must start and end with an alphanumeric character + # + # Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, + # with a maximum length of 63 characters. + # @!attribute [rw] scope_namespace + # @return [::Google::Cloud::GkeHub::V1::Namespace] + # Required. The fleet namespace to create. + class CreateScopeNamespaceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to update a fleet namespace. + # @!attribute [rw] scope_namespace + # @return [::Google::Cloud::GkeHub::V1::Namespace] + # Required. A namespace with fields updated. The 'name' field in this + # namespace is used to identify the resource to update. Given 'updated' + # prefix to follow go/proto-best-practices-checkers#keyword_conflict + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. The fields to be updated. + class UpdateScopeNamespaceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to delete a fleet namespace. + # @!attribute [rw] name + # @return [::String] + # Required. The Namespace resource name in the format + # `projects/*/locations/*/scopes/*/namespaces/*`. + class DeleteScopeNamespaceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to list fleet namespaces. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent (project and location) where the Features will be + # listed. Specified in the format `projects/*/locations/*/scopes/*`. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. When requesting a 'page' of resources, `page_size` specifies + # number of resources to return. If unspecified or set to 0, all resources + # will be returned. + # @!attribute [rw] page_token + # @return [::String] + # Optional. Token returned by previous call to `ListFeatures` which + # specifies the position in the list from where to continue listing the + # resources. + class ListScopeNamespacesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List of fleet namespaces. + # @!attribute [rw] scope_namespaces + # @return [::Array<::Google::Cloud::GkeHub::V1::Namespace>] + # The list of fleet namespaces + # @!attribute [rw] next_page_token + # @return [::String] + # A token to request the next page of resources from the + # `ListNamespaces` method. The value of an empty string means + # that there are no more resources to return. + class ListScopeNamespacesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `GkeHub.GetScopeRBACRoleBinding` method. + # @!attribute [rw] name + # @return [::String] + # Required. The RBACRoleBinding resource name in the format + # `projects/*/locations/*/scopes/*/rbacrolebindings/*`. + class GetScopeRBACRoleBindingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to create a rbacrolebindings. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent (project and location) where the RBACRoleBinding will + # be created. Specified in the format `projects/*/locations/*/scopes/*`. + # @!attribute [rw] rbacrolebinding_id + # @return [::String] + # Required. Client chosen ID for the RBACRoleBinding. `rbacrolebinding_id` + # must be a valid RFC 1123 compliant DNS label: + # + # 1. At most 63 characters in length + # 2. It must consist of lower case alphanumeric characters or `-` + # 3. It must start and end with an alphanumeric character + # + # Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, + # with a maximum length of 63 characters. + # @!attribute [rw] rbacrolebinding + # @return [::Google::Cloud::GkeHub::V1::RBACRoleBinding] + # Required. The rbacrolebindings to create. + class CreateScopeRBACRoleBindingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to update a scope rbacrolebinding. + # @!attribute [rw] rbacrolebinding + # @return [::Google::Cloud::GkeHub::V1::RBACRoleBinding] + # Required. A rbacrolebinding with fields updated. The 'name' field in this + # rbacrolebinding is used to identify the resource to update. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. The fields to be updated. + class UpdateScopeRBACRoleBindingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to delete a Scope RBACRoleBinding. + # @!attribute [rw] name + # @return [::String] + # Required. The RBACRoleBinding resource name in the format + # `projects/*/locations/*/scopes/*/rbacrolebindings/*`. + class DeleteScopeRBACRoleBindingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to list Scope RBACRoleBindings. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent (project and location) where the Features will be + # listed. Specified in the format `projects/*/locations/*/scopes/*`. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. When requesting a 'page' of resources, `page_size` specifies + # number of resources to return. If unspecified or set to 0, all resources + # will be returned. + # @!attribute [rw] page_token + # @return [::String] + # Optional. Token returned by previous call to `ListScopeRBACRoleBindings` + # which specifies the position in the list from where to continue listing the + # resources. + class ListScopeRBACRoleBindingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List of Scope RBACRoleBindings. + # @!attribute [rw] rbacrolebindings + # @return [::Array<::Google::Cloud::GkeHub::V1::RBACRoleBinding>] + # The list of Scope RBACRoleBindings. + # @!attribute [rw] next_page_token + # @return [::String] + # A token to request the next page of resources from the + # `ListScopeRBACRoleBindings` method. The value of an empty string means + # that there are no more resources to return. + class ListScopeRBACRoleBindingsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `GkeHub.GetScope` method. + # @!attribute [rw] name + # @return [::String] + # Required. The Scope resource name in the format + # `projects/*/locations/*/scopes/*`. + class GetScopeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to create a Scope. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent (project and location) where the Scope will be + # created. Specified in the format `projects/*/locations/*`. + # @!attribute [rw] scope_id + # @return [::String] + # Required. Client chosen ID for the Scope. `scope_id` must be a + # ???? + # @!attribute [rw] scope + # @return [::Google::Cloud::GkeHub::V1::Scope] + # Required. The Scope to create. + class CreateScopeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to update a Scope. + # @!attribute [rw] scope + # @return [::Google::Cloud::GkeHub::V1::Scope] + # Required. A Scope with fields updated. The 'name' field in this + # namespace is used to identify the resource to update. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. The fields to be updated. + class UpdateScopeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to delete a Scope. + # @!attribute [rw] name + # @return [::String] + # Required. The Scope resource name in the format + # `projects/*/locations/*/scopes/*`. + class DeleteScopeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to list Scopes. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent (project and location) where the Scope will be listed. + # Specified in the format `projects/*/locations/*`. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. When requesting a 'page' of resources, `page_size` specifies + # number of resources to return. If unspecified or set to 0, all resources + # will be returned. + # @!attribute [rw] page_token + # @return [::String] + # Optional. Token returned by previous call to `ListScopes` which + # specifies the position in the list from where to continue listing the + # resources. + class ListScopesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List of Scopes. + # @!attribute [rw] scopes + # @return [::Array<::Google::Cloud::GkeHub::V1::Scope>] + # The list of Scopes + # @!attribute [rw] next_page_token + # @return [::String] + # A token to request the next page of resources from the + # `ListScopes` method. The value of an empty string means + # that there are no more resources to return. + class ListScopesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to list permitted Scopes. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent (project and location) where the Scope will be listed. + # Specified in the format `projects/*/locations/*`. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. When requesting a 'page' of resources, `page_size` specifies + # number of resources to return. If unspecified or set to 0, all resources + # will be returned. + # @!attribute [rw] page_token + # @return [::String] + # Optional. Token returned by previous call to `ListPermittedScopes` which + # specifies the position in the list from where to continue listing the + # resources. + class ListPermittedScopesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List of permitted Scopes. + # @!attribute [rw] scopes + # @return [::Array<::Google::Cloud::GkeHub::V1::Scope>] + # The list of permitted Scopes + # @!attribute [rw] next_page_token + # @return [::String] + # A token to request the next page of resources from the + # `ListPermittedScopes` method. The value of an empty string means + # that there are no more resources to return. + class ListPermittedScopesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `GkeHub.GetMembershipBinding` method. + # @!attribute [rw] name + # @return [::String] + # Required. The MembershipBinding resource name in the format + # `projects/*/locations/*/memberships/*/bindings/*`. + class GetMembershipBindingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to create a MembershipBinding. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent (project and location) where the MembershipBinding + # will be created. Specified in the format + # `projects/*/locations/*/memberships/*`. + # @!attribute [rw] membership_binding + # @return [::Google::Cloud::GkeHub::V1::MembershipBinding] + # Required. The MembershipBinding to create. + # @!attribute [rw] membership_binding_id + # @return [::String] + # Required. The ID to use for the MembershipBinding. + class CreateMembershipBindingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to update a MembershipBinding. + # @!attribute [rw] membership_binding + # @return [::Google::Cloud::GkeHub::V1::MembershipBinding] + # Required. The MembershipBinding object with fields updated. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. The fields to be updated. + class UpdateMembershipBindingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to delete a Binding. + # @!attribute [rw] name + # @return [::String] + # Required. The MembershipBinding resource name in the format + # `projects/*/locations/*/memberships/*/bindings/*`. + class DeleteMembershipBindingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to list MembershipBinding. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent Membership for which the MembershipBindings will be + # listed. Specified in the format `projects/*/locations/*/memberships/*`. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. When requesting a 'page' of resources, `page_size` specifies + # number of resources to return. If unspecified or set to 0, all resources + # will be returned. + # @!attribute [rw] page_token + # @return [::String] + # Optional. Token returned by previous call to `ListMembershipBindings` which + # specifies the position in the list from where to continue listing the + # resources. + # @!attribute [rw] filter + # @return [::String] + # Optional. Lists MembershipBindings that match the filter expression, + # following the syntax outlined in https://google.aip.dev/160. + class ListMembershipBindingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List of MembershipBindings. + # @!attribute [rw] membership_bindings + # @return [::Array<::Google::Cloud::GkeHub::V1::MembershipBinding>] + # The list of membership_bindings + # @!attribute [rw] next_page_token + # @return [::String] + # A token to request the next page of resources from the + # `ListMembershipBindings` method. The value of an empty string means + # that there are no more resources to return. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # List of locations that could not be reached while fetching this list. + class ListMembershipBindingsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `GkeHub.ListMemberships` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent (project and location) where the Memberships will be + # listed. Specified in the format `projects/*/locations/*`. + # `projects/*/locations/-` list memberships in all the regions. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. When requesting a 'page' of resources, `page_size` specifies + # number of resources to return. If unspecified or set to 0, all resources + # will be returned. + # @!attribute [rw] page_token + # @return [::String] + # Optional. Token returned by previous call to `ListMemberships` which + # specifies the position in the list from where to continue listing the + # resources. + # @!attribute [rw] filter + # @return [::String] + # Optional. Lists Memberships that match the filter expression, following the + # syntax outlined in https://google.aip.dev/160. + # + # Examples: + # + # - Name is `bar` in project `foo-proj` and location `global`: + # + # name = "projects/foo-proj/locations/global/membership/bar" + # + # - Memberships that have a label called `foo`: + # + # labels.foo:* + # + # - Memberships that have a label called `foo` whose value is `bar`: + # + # labels.foo = bar + # + # - Memberships in the CREATING state: + # + # state = CREATING + # @!attribute [rw] order_by + # @return [::String] + # Optional. One or more fields to compare and use to sort the output. + # See https://google.aip.dev/132#ordering. + class ListMembershipsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `GkeHub.GetMembershipRBACRoleBinding` method. + # @!attribute [rw] name + # @return [::String] + # Required. The RBACRoleBinding resource name in the format + # `projects/*/locations/*/memberships/*/rbacrolebindings/*`. + class GetMembershipRBACRoleBindingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to create a rbacrolebindings. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent (project and location) where the RBACRoleBinding will + # be created. Specified in the format `projects/*/locations/*/memberships/*`. + # @!attribute [rw] rbacrolebinding_id + # @return [::String] + # Required. Client chosen ID for the RBACRoleBinding. `rbacrolebinding_id` + # must be a valid RFC 1123 compliant DNS label: + # + # 1. At most 63 characters in length + # 2. It must consist of lower case alphanumeric characters or `-` + # 3. It must start and end with an alphanumeric character + # + # Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, + # with a maximum length of 63 characters. + # @!attribute [rw] rbacrolebinding + # @return [::Google::Cloud::GkeHub::V1::RBACRoleBinding] + # Required. The rbacrolebindings to create. + class CreateMembershipRBACRoleBindingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to update a membership rbacrolebinding. + # @!attribute [rw] rbacrolebinding + # @return [::Google::Cloud::GkeHub::V1::RBACRoleBinding] + # Required. A rbacrolebinding with fields updated. The 'name' field in this + # rbacrolebinding is used to identify the resource to update. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. The fields to be updated. + class UpdateMembershipRBACRoleBindingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to delete a Membership RBACRoleBinding. + # @!attribute [rw] name + # @return [::String] + # Required. The RBACRoleBinding resource name in the format + # `projects/*/locations/*/memberships/*/rbacrolebindings/*`. + class DeleteMembershipRBACRoleBindingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to list Membership RBACRoleBindings. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent (project and location) where the Features will be + # listed. Specified in the format `projects/*/locations/*/memberships/*`. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. When requesting a 'page' of resources, `page_size` specifies + # number of resources to return. If unspecified or set to 0, all resources + # will be returned. + # @!attribute [rw] page_token + # @return [::String] + # Optional. Token returned by previous call to + # `ListMembershipRBACRoleBindings` which specifies the position in the list + # from where to continue listing the resources. + class ListMembershipRBACRoleBindingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List of Membership RBACRoleBindings. + # @!attribute [rw] rbacrolebindings + # @return [::Array<::Google::Cloud::GkeHub::V1::RBACRoleBinding>] + # The list of Membership RBACRoleBindings. + # @!attribute [rw] next_page_token + # @return [::String] + # A token to request the next page of resources from the + # `ListMembershipRBACRoleBindings` method. The value of an empty string means + # that there are no more resources to return. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # List of locations that could not be reached while fetching this list. + class ListMembershipRBACRoleBindingsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to generate a YAML of the RBAC policies for the specified + # RoleBinding and its associated impersonation resources. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent (project and location) where the RBACRoleBinding will + # be created. Specified in the format `projects/*/locations/*/memberships/*`. + # @!attribute [rw] rbacrolebinding_id + # @return [::String] + # Required. Client chosen ID for the RBACRoleBinding. `rbacrolebinding_id` + # must be a valid RFC 1123 compliant DNS label: + # + # 1. At most 63 characters in length + # 2. It must consist of lower case alphanumeric characters or `-` + # 3. It must start and end with an alphanumeric character + # + # Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, + # with a maximum length of 63 characters. + # @!attribute [rw] rbacrolebinding + # @return [::Google::Cloud::GkeHub::V1::RBACRoleBinding] + # Required. The rbacrolebindings to generate the YAML for. + class GenerateMembershipRBACRoleBindingYAMLRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for GenerateRBACRoleBindingYAML. + # @!attribute [rw] role_bindings_yaml + # @return [::String] + # a yaml text blob including the RBAC policies. + class GenerateMembershipRBACRoleBindingYAMLResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the `GkeHub.ListMemberships` method. + # @!attribute [rw] resources + # @return [::Array<::Google::Cloud::GkeHub::V1::Membership>] + # The list of matching Memberships. + # @!attribute [rw] next_page_token + # @return [::String] + # A token to request the next page of resources from the + # `ListMemberships` method. The value of an empty string means that + # there are no more resources to return. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # List of locations that could not be reached while fetching this list. + class ListMembershipsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `GkeHub.GetMembership` method. + # @!attribute [rw] name + # @return [::String] + # Required. The Membership resource name in the format + # `projects/*/locations/*/memberships/*`. + class GetMembershipRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to list Memberships bound to a Scope. + # @!attribute [rw] scope_name + # @return [::String] + # Required. Name of the Scope, in the format + # `projects/*/locations/global/scopes/*`, to which the Memberships are bound. + # @!attribute [rw] filter + # @return [::String] + # Optional. Lists Memberships that match the filter expression, following the + # syntax outlined in https://google.aip.dev/160. Currently, filtering + # can be done only based on Memberships's `name`, `labels`, `create_time`, + # `update_time`, and `unique_id`. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. When requesting a 'page' of resources, `page_size` specifies + # number of resources to return. If unspecified or set to 0, all resources + # will be returned. Pagination is currently not supported; therefore, setting + # this field does not have any impact for now. + # @!attribute [rw] page_token + # @return [::String] + # Optional. Token returned by previous call to `ListBoundMemberships` which + # specifies the position in the list from where to continue listing the + # resources. + class ListBoundMembershipsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List of Memberships bound to a Scope. + # @!attribute [rw] memberships + # @return [::Array<::Google::Cloud::GkeHub::V1::Membership>] + # The list of Memberships bound to the given Scope. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # List of locations that could not be reached while fetching this list. + # @!attribute [rw] next_page_token + # @return [::String] + # A token to request the next page of resources from the + # `ListBoundMemberships` method. The value of an empty string means that + # there are no more resources to return. + class ListBoundMembershipsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `GkeHub.CreateMembership` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent (project and location) where the Memberships will be + # created. Specified in the format `projects/*/locations/*`. + # @!attribute [rw] membership_id + # @return [::String] + # Required. Client chosen ID for the membership. `membership_id` must be a + # valid RFC 1123 compliant DNS label: + # + # 1. At most 63 characters in length + # 2. It must consist of lower case alphanumeric characters or `-` + # 3. It must start and end with an alphanumeric character + # + # Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, + # with a maximum length of 63 characters. + # @!attribute [rw] resource + # @return [::Google::Cloud::GkeHub::V1::Membership] + # Required. The membership to create. + # @!attribute [rw] request_id + # @return [::String] + # Optional. A request ID to identify requests. Specify a unique request ID + # so that if you must retry your request, the server will know to ignore + # the request if it has already been completed. The server will guarantee + # that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class CreateMembershipRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `GkeHub.DeleteMembership` method. + # @!attribute [rw] name + # @return [::String] + # Required. The Membership resource name in the format + # `projects/*/locations/*/memberships/*`. + # @!attribute [rw] request_id + # @return [::String] + # Optional. A request ID to identify requests. Specify a unique request ID + # so that if you must retry your request, the server will know to ignore + # the request if it has already been completed. The server will guarantee + # that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @!attribute [rw] force + # @return [::Boolean] + # Optional. If set to true, any subresource from this Membership will also be + # deleted. Otherwise, the request will only work if the Membership has no + # subresource. + class DeleteMembershipRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `GkeHub.UpdateMembership` method. + # @!attribute [rw] name + # @return [::String] + # Required. The Membership resource name in the format + # `projects/*/locations/*/memberships/*`. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Mask of fields to update. + # @!attribute [rw] resource + # @return [::Google::Cloud::GkeHub::V1::Membership] + # Required. Only fields specified in update_mask are updated. + # If you specify a field in the update_mask but don't specify its value here + # that field will be deleted. + # If you are updating a map field, set the value of a key to null or empty + # string to delete the key from the map. It's not possible to update a key's + # value to the empty string. + # If you specify the update_mask to be a special path "*", fully replaces all + # user-modifiable fields to match `resource`. + # @!attribute [rw] request_id + # @return [::String] + # Optional. A request ID to identify requests. Specify a unique request ID + # so that if you must retry your request, the server will know to ignore + # the request if it has already been completed. The server will guarantee + # that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class UpdateMembershipRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `GkeHub.GenerateConnectManifest` + # method. + # . + # @!attribute [rw] name + # @return [::String] + # Required. The Membership resource name the Agent will associate with, in + # the format `projects/*/locations/*/memberships/*`. + # @!attribute [rw] namespace + # @return [::String] + # Optional. Namespace for GKE Connect agent resources. Defaults to + # `gke-connect`. + # + # The Connect Agent is authorized automatically when run in the default + # namespace. Otherwise, explicit authorization must be granted with an + # additional IAM binding. + # @!attribute [rw] proxy + # @return [::String] + # Optional. URI of a proxy if connectivity from the agent to + # gkeconnect.googleapis.com requires the use of a proxy. Format must be in + # the form `http(s)://{proxy_address}`, depending on the HTTP/HTTPS protocol + # supported by the proxy. This will direct the connect agent's outbound + # traffic through a HTTP(S) proxy. + # @!attribute [rw] version + # @return [::String] + # Optional. The Connect agent version to use. Defaults to the most current + # version. + # @!attribute [rw] is_upgrade + # @return [::Boolean] + # Optional. If true, generate the resources for upgrade only. Some resources + # generated only for installation (e.g. secrets) will be excluded. + # @!attribute [rw] registry + # @return [::String] + # Optional. The registry to fetch the connect agent image from. Defaults to + # gcr.io/gkeconnect. + # @!attribute [rw] image_pull_secret_content + # @return [::String] + # Optional. The image pull secret content for the registry, if not public. + class GenerateConnectManifestRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # GenerateConnectManifestResponse contains manifest information for + # installing/upgrading a Connect agent. + # @!attribute [rw] manifest + # @return [::Array<::Google::Cloud::GkeHub::V1::ConnectAgentResource>] + # The ordered list of Kubernetes resources that need to be applied to the + # cluster for GKE Connect agent installation/upgrade. + class GenerateConnectManifestResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # ConnectAgentResource represents a Kubernetes resource manifest for Connect + # Agent deployment. + # @!attribute [rw] type + # @return [::Google::Cloud::GkeHub::V1::TypeMeta] + # Kubernetes type of the resource. + # @!attribute [rw] manifest + # @return [::String] + # YAML manifest of the resource. + class ConnectAgentResource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # TypeMeta is the type information needed for content unmarshalling of + # Kubernetes resources in the manifest. + # @!attribute [rw] kind + # @return [::String] + # Kind of the resource (e.g. Deployment). + # @!attribute [rw] api_version + # @return [::String] + # APIVersion of the resource (e.g. v1). + class TypeMeta + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `GkeHub.ListFeatures` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent (project and location) where the Features will be + # listed. Specified in the format `projects/*/locations/*`. + # @!attribute [rw] page_size + # @return [::Integer] + # When requesting a 'page' of resources, `page_size` specifies number of + # resources to return. If unspecified or set to 0, all resources will + # be returned. + # @!attribute [rw] page_token + # @return [::String] + # Token returned by previous call to `ListFeatures` which + # specifies the position in the list from where to continue listing the + # resources. + # @!attribute [rw] filter + # @return [::String] + # Lists Features that match the filter expression, following the syntax + # outlined in https://google.aip.dev/160. + # + # Examples: + # + # - Feature with the name "servicemesh" in project "foo-proj": + # + # name = "projects/foo-proj/locations/global/features/servicemesh" + # + # - Features that have a label called `foo`: + # + # labels.foo:* + # + # - Features that have a label called `foo` whose value is `bar`: + # + # labels.foo = bar + # @!attribute [rw] order_by + # @return [::String] + # One or more fields to compare and use to sort the output. + # See https://google.aip.dev/132#ordering. + # @!attribute [rw] return_partial_success + # @return [::Boolean] + # Optional. If set to true, the response will return partial results when + # some regions are unreachable and the unreachable field in Feature proto + # will be populated. If set to false, the request will fail when some regions + # are unreachable. + class ListFeaturesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the `GkeHub.ListFeatures` method. + # @!attribute [rw] resources + # @return [::Array<::Google::Cloud::GkeHub::V1::Feature>] + # The list of matching Features + # @!attribute [rw] next_page_token + # @return [::String] + # A token to request the next page of resources from the + # `ListFeatures` method. The value of an empty string means + # that there are no more resources to return. + class ListFeaturesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `GkeHub.GetFeature` method. + # @!attribute [rw] name + # @return [::String] + # Required. The Feature resource name in the format + # `projects/*/locations/*/features/*` + # @!attribute [rw] return_partial_success + # @return [::Boolean] + # Optional. If set to true, the response will return partial results when + # some regions are unreachable and the unreachable field in Feature proto + # will be populated. If set to false, the request will fail when some regions + # are unreachable. + class GetFeatureRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `GkeHub.CreateFeature` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent (project and location) where the Feature will be + # created. Specified in the format `projects/*/locations/*`. + # @!attribute [rw] feature_id + # @return [::String] + # The ID of the feature to create. + # @!attribute [rw] resource + # @return [::Google::Cloud::GkeHub::V1::Feature] + # The Feature resource to create. + # @!attribute [rw] request_id + # @return [::String] + # A request ID to identify requests. Specify a unique request ID + # so that if you must retry your request, the server will know to ignore + # the request if it has already been completed. The server will guarantee + # that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class CreateFeatureRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `GkeHub.DeleteFeature` method. + # @!attribute [rw] name + # @return [::String] + # Required. The Feature resource name in the format + # `projects/*/locations/*/features/*`. + # @!attribute [rw] force + # @return [::Boolean] + # If set to true, the delete will ignore any outstanding resources for + # this Feature (that is, `FeatureState.has_resources` is set to true). These + # resources will NOT be cleaned up or modified in any way. + # @!attribute [rw] request_id + # @return [::String] + # Optional. A request ID to identify requests. Specify a unique request ID + # so that if you must retry your request, the server will know to ignore + # the request if it has already been completed. The server will guarantee + # that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class DeleteFeatureRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `GkeHub.UpdateFeature` method. + # @!attribute [rw] name + # @return [::String] + # Required. The Feature resource name in the format + # `projects/*/locations/*/features/*`. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Mask of fields to update. + # @!attribute [rw] resource + # @return [::Google::Cloud::GkeHub::V1::Feature] + # Only fields specified in update_mask are updated. + # If you specify a field in the update_mask but don't specify its value here + # that field will be deleted. + # If you are updating a map field, set the value of a key to null or empty + # string to delete the key from the map. It's not possible to update a key's + # value to the empty string. + # If you specify the update_mask to be a special path "*", fully replaces all + # user-modifiable fields to match `resource`. + # @!attribute [rw] request_id + # @return [::String] + # A request ID to identify requests. Specify a unique request ID + # so that if you must retry your request, the server will know to ignore + # the request if it has already been completed. The server will guarantee + # that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and + # the request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class UpdateFeatureRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `GkeHub.CreateFleet` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent (project and location) where the Fleet will be + # created. Specified in the format `projects/*/locations/*`. + # @!attribute [rw] fleet + # @return [::Google::Cloud::GkeHub::V1::Fleet] + # Required. The fleet to create. + class CreateFleetRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `GkeHub.GetFleet` method. + # @!attribute [rw] name + # @return [::String] + # Required. The Fleet resource name in the format + # `projects/*/locations/*/fleets/*`. + class GetFleetRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `GkeHub.UpdateFleet` method. + # @!attribute [rw] fleet + # @return [::Google::Cloud::GkeHub::V1::Fleet] + # Required. The Fleet to update. + # + # The `name` field of the Fleet object identifies which fleet will be + # updated. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. The fields to be updated; + class UpdateFleetRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `GkeHub.DeleteFleet` method. + # @!attribute [rw] name + # @return [::String] + # Required. The Fleet resource name in the format + # `projects/*/locations/*/fleets/*`. + class DeleteFleetRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `GkeHub.ListFleets` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The organization or project to list for Fleets under, in the + # format `organizations/*/locations/*` or `projects/*/locations/*`. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `ListFleets` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListFleets` must match + # the call that provided the page token. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of fleets to return. The service may return + # fewer than this value. If unspecified, at most 200 fleets will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + class ListFleetsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the `GkeHub.ListFleetsResponse` method. + # @!attribute [rw] fleets + # @return [::Array<::Google::Cloud::GkeHub::V1::Fleet>] + # The list of matching fleets. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + # The token is only valid for 1h. + class ListFleetsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents the metadata of the long-running operation. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the operation was created. + # @!attribute [r] end_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the operation finished running. + # @!attribute [r] target + # @return [::String] + # Output only. Server-defined resource path for the target of the operation. + # @!attribute [r] verb + # @return [::String] + # Output only. Name of the verb executed by the operation. + # @!attribute [r] status_detail + # @return [::String] + # Output only. Human-readable status of the operation, if any. + # @!attribute [r] cancel_requested + # @return [::Boolean] + # Output only. Identifies whether the user has requested cancellation + # of the operation. Operations that have successfully been cancelled + # have + # {::Google::Longrunning::Operation#error google.longrunning.Operation.error} + # value with a {::Google::Rpc::Status#code google.rpc.Status.code} of 1, + # corresponding to `Code.CANCELLED`. + # @!attribute [r] api_version + # @return [::String] + # Output only. API version used to start the operation. + class OperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/longrunning/operations.rb @@ -0,0 +1,191 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Longrunning + # This resource represents a long-running operation that is the result of a + # network API call. + # @!attribute [rw] name + # @return [::String] + # The server-assigned name, which is only unique within the same service that + # originally returns it. If you use the default HTTP mapping, the + # `name` should be a resource name ending with `operations/{unique_id}`. + # @!attribute [rw] metadata + # @return [::Google::Protobuf::Any] + # Service-specific metadata associated with the operation. It typically + # contains progress information and common metadata such as create time. + # Some services might not provide such metadata. Any method that returns a + # long-running operation should document the metadata type, if any. + # @!attribute [rw] done + # @return [::Boolean] + # If the value is `false`, it means the operation is still in progress. + # If `true`, the operation is completed, and either `error` or `response` is + # available. + # @!attribute [rw] error + # @return [::Google::Rpc::Status] + # The error result of the operation in case of failure or cancellation. + # + # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] response + # @return [::Google::Protobuf::Any] + # The normal, successful response of the operation. If the original + # method returns no data on success, such as `Delete`, the response is + # `google.protobuf.Empty`. If the original method is standard + # `Get`/`Create`/`Update`, the response should be the resource. For other + # methods, the response should have the type `XxxResponse`, where `Xxx` + # is the original method name. For example, if the original method name + # is `TakeSnapshot()`, the inferred response type is + # `TakeSnapshotResponse`. + # + # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Operation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.GetOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource. + class GetOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.ListOperations. + # @!attribute [rw] name + # @return [::String] + # The name of the operation's parent resource. + # @!attribute [rw] filter + # @return [::String] + # The standard list filter. + # @!attribute [rw] page_size + # @return [::Integer] + # The standard list page size. + # @!attribute [rw] page_token + # @return [::String] + # The standard list page token. + # @!attribute [rw] return_partial_success + # @return [::Boolean] + # When set to `true`, operations that are reachable are returned as normal, + # and those that are unreachable are returned in the + # [ListOperationsResponse.unreachable] field. + # + # This can only be `true` when reading across collections e.g. when `parent` + # is set to `"projects/example/locations/-"`. + # + # This field is not by default supported and will result in an + # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + # service or product specific documentation. + class ListOperationsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message for + # Operations.ListOperations. + # @!attribute [rw] operations + # @return [::Array<::Google::Longrunning::Operation>] + # A list of operations that matches the specified filter in the request. + # @!attribute [rw] next_page_token + # @return [::String] + # The standard List next-page token. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unordered list. Unreachable resources. Populated when the request sets + # `ListOperationsRequest.return_partial_success` and reads across + # collections e.g. when attempting to list all resources across all supported + # locations. + class ListOperationsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.CancelOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be cancelled. + class CancelOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.DeleteOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to be deleted. + class DeleteOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # Operations.WaitOperation. + # @!attribute [rw] name + # @return [::String] + # The name of the operation resource to wait on. + # @!attribute [rw] timeout + # @return [::Google::Protobuf::Duration] + # The maximum duration to wait before timing out. If left blank, the wait + # will be at most the time permitted by the underlying HTTP/RPC protocol. + # If RPC context deadline is also specified, the shorter one will be used. + class WaitOperationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message representing the message types used by a long-running operation. + # + # Example: + # + # rpc Export(ExportRequest) returns (google.longrunning.Operation) { + # option (google.longrunning.operation_info) = { + # response_type: "ExportResponse" + # metadata_type: "ExportMetadata" + # }; + # } + # @!attribute [rw] response_type + # @return [::String] + # Required. The message name of the primary return type for this + # long-running operation. + # This type will be used to deserialize the LRO's response. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + # @!attribute [rw] metadata_type + # @return [::String] + # Required. The message name of the metadata type for this long-running + # operation. + # + # If the response is in a different package from the rpc, a fully-qualified + # message name must be used (e.g. `google.protobuf.Struct`). + # + # Note: Altering this value constitutes a breaking change. + class OperationInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/protobuf/any.rb @@ -0,0 +1,145 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `Any` contains an arbitrary serialized protocol buffer message along with a + # URL that describes the type of the serialized message. + # + # Protobuf library provides support to pack/unpack Any values in the form + # of utility functions or additional generated methods of the Any type. + # + # Example 1: Pack and unpack a message in C++. + # + # Foo foo = ...; + # Any any; + # any.PackFrom(foo); + # ... + # if (any.UnpackTo(&foo)) { + # ... + # } + # + # Example 2: Pack and unpack a message in Java. + # + # Foo foo = ...; + # Any any = Any.pack(foo); + # ... + # if (any.is(Foo.class)) { + # foo = any.unpack(Foo.class); + # } + # // or ... + # if (any.isSameTypeAs(Foo.getDefaultInstance())) { + # foo = any.unpack(Foo.getDefaultInstance()); + # } + # + # Example 3: Pack and unpack a message in Python. + # + # foo = Foo(...) + # any = Any() + # any.Pack(foo) + # ... + # if any.Is(Foo.DESCRIPTOR): + # any.Unpack(foo) + # ... + # + # Example 4: Pack and unpack a message in Go + # + # foo := &pb.Foo{...} + # any, err := anypb.New(foo) + # if err != nil { + # ... + # } + # ... + # foo := &pb.Foo{} + # if err := any.UnmarshalTo(foo); err != nil { + # ... + # } + # + # The pack methods provided by protobuf library will by default use + # 'type.googleapis.com/full.type.name' as the type URL and the unpack + # methods only use the fully qualified type name after the last '/' + # in the type URL, for example "foo.bar.com/x/y.z" will yield type + # name "y.z". + # + # JSON + # ==== + # The JSON representation of an `Any` value uses the regular + # representation of the deserialized, embedded message, with an + # additional field `@type` which contains the type URL. Example: + # + # package google.profile; + # message Person { + # string first_name = 1; + # string last_name = 2; + # } + # + # { + # "@type": "type.googleapis.com/google.profile.Person", + # "firstName": , + # "lastName": + # } + # + # If the embedded message type is well-known and has a custom JSON + # representation, that representation will be embedded adding a field + # `value` which holds the custom JSON in addition to the `@type` + # field. Example (for message [google.protobuf.Duration][]): + # + # { + # "@type": "type.googleapis.com/google.protobuf.Duration", + # "value": "1.212s" + # } + # @!attribute [rw] type_url + # @return [::String] + # A URL/resource name that uniquely identifies the type of the serialized + # protocol buffer message. This string must contain at least + # one "/" character. The last segment of the URL's path must represent + # the fully qualified name of the type (as in + # `path/google.protobuf.Duration`). The name should be in a canonical form + # (e.g., leading "." is not accepted). + # + # In practice, teams usually precompile into the binary all types that they + # expect it to use in the context of Any. However, for URLs which use the + # scheme `http`, `https`, or no scheme, one can optionally set up a type + # server that maps type URLs to message definitions as follows: + # + # * If no scheme is provided, `https` is assumed. + # * An HTTP GET on the URL must yield a [google.protobuf.Type][] + # value in binary format, or produce an error. + # * Applications are allowed to cache lookup results based on the + # URL, or have them precompiled into a binary to avoid any + # lookup. Therefore, binary compatibility needs to be preserved + # on changes to types. (Use versioned type names to manage + # breaking changes.) + # + # Note: this functionality is not currently available in the official + # protobuf release, and it is not used for type URLs beginning with + # type.googleapis.com. As of May 2023, there are no widely used type server + # implementations and no plans to implement one. + # + # Schemes other than `http`, `https` (or the empty scheme) might be + # used with implementation specific semantics. + # @!attribute [rw] value + # @return [::String] + # Must be a valid serialized protocol buffer of the above specified type. + class Any + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/protobuf/duration.rb @@ -0,0 +1,98 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Duration represents a signed, fixed-length span of time represented + # as a count of seconds and fractions of seconds at nanosecond + # resolution. It is independent of any calendar and concepts like "day" + # or "month". It is related to Timestamp in that the difference between + # two Timestamp values is a Duration and it can be added or subtracted + # from a Timestamp. Range is approximately +-10,000 years. + # + # # Examples + # + # Example 1: Compute Duration from two Timestamps in pseudo code. + # + # Timestamp start = ...; + # Timestamp end = ...; + # Duration duration = ...; + # + # duration.seconds = end.seconds - start.seconds; + # duration.nanos = end.nanos - start.nanos; + # + # if (duration.seconds < 0 && duration.nanos > 0) { + # duration.seconds += 1; + # duration.nanos -= 1000000000; + # } else if (duration.seconds > 0 && duration.nanos < 0) { + # duration.seconds -= 1; + # duration.nanos += 1000000000; + # } + # + # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. + # + # Timestamp start = ...; + # Duration duration = ...; + # Timestamp end = ...; + # + # end.seconds = start.seconds + duration.seconds; + # end.nanos = start.nanos + duration.nanos; + # + # if (end.nanos < 0) { + # end.seconds -= 1; + # end.nanos += 1000000000; + # } else if (end.nanos >= 1000000000) { + # end.seconds += 1; + # end.nanos -= 1000000000; + # } + # + # Example 3: Compute Duration from datetime.timedelta in Python. + # + # td = datetime.timedelta(days=3, minutes=10) + # duration = Duration() + # duration.FromTimedelta(td) + # + # # JSON Mapping + # + # In JSON format, the Duration type is encoded as a string rather than an + # object, where the string ends in the suffix "s" (indicating seconds) and + # is preceded by the number of seconds, with nanoseconds expressed as + # fractional seconds. For example, 3 seconds with 0 nanoseconds should be + # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should + # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 + # microsecond should be expressed in JSON format as "3.000001s". + # @!attribute [rw] seconds + # @return [::Integer] + # Signed seconds of the span of time. Must be from -315,576,000,000 + # to +315,576,000,000 inclusive. Note: these bounds are computed from: + # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years + # @!attribute [rw] nanos + # @return [::Integer] + # Signed fractions of a second at nanosecond resolution of the span + # of time. Durations less than one second are represented with a 0 + # `seconds` field and a positive or negative `nanos` field. For durations + # of one second or more, a non-zero value for the `nanos` field must be + # of the same sign as the `seconds` field. Must be from -999,999,999 + # to +999,999,999 inclusive. + class Duration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/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-gke_hub-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/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-gke_hub-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/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-gke_hub-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/rpc/status.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Rpc + # The `Status` type defines a logical error model that is suitable for + # different programming environments, including REST APIs and RPC APIs. It is + # used by [gRPC](https://github.com/grpc). Each `Status` message contains + # three pieces of data: error code, error message, and error details. + # + # You can find out more about this error model and how to work with it in the + # [API Design Guide](https://cloud.google.com/apis/design/errors). + # @!attribute [rw] code + # @return [::Integer] + # The status code, which should be an enum value of + # [google.rpc.Code][google.rpc.Code]. + # @!attribute [rw] message + # @return [::String] + # A developer-facing error message, which should be in English. Any + # user-facing error message should be localized and sent in the + # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized + # by the client. + # @!attribute [rw] details + # @return [::Array<::Google::Protobuf::Any>] + # A list of messages that carry the error details. There is a common set of + # message types for APIs to use. + class Status + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/Gemfile new file mode 100644 index 000000000000..7c86bdbf96dc --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/Gemfile @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +source "https://rubygems.org" + +if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" + gem "google-cloud-gke_hub-v1", path: "../" +else + gem "google-cloud-gke_hub-v1" +end + +group :test do + gem "google-style", "~> 1.26.1" + gem "minitest", "~> 5.16" + gem "minitest-focus", "~> 1.1" + gem "minitest-hooks", "~> 1.5" +end diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/create_feature.rb b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/create_feature.rb new file mode 100644 index 000000000000..dfc6134d9771 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/create_feature.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 gkehub_v1_generated_GkeHub_CreateFeature_sync] +require "google/cloud/gke_hub/v1" + +## +# Snippet for the create_feature call in the GkeHub 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::GkeHub::V1::GkeHub::Client#create_feature. +# +def create_feature + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GkeHub::V1::CreateFeatureRequest.new + + # Call the create_feature method. + result = client.create_feature request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END gkehub_v1_generated_GkeHub_CreateFeature_sync] diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/create_fleet.rb b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/create_fleet.rb new file mode 100644 index 000000000000..c77b8b0a1c47 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/create_fleet.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 gkehub_v1_generated_GkeHub_CreateFleet_sync] +require "google/cloud/gke_hub/v1" + +## +# Snippet for the create_fleet call in the GkeHub 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::GkeHub::V1::GkeHub::Client#create_fleet. +# +def create_fleet + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GkeHub::V1::CreateFleetRequest.new + + # Call the create_fleet method. + result = client.create_fleet request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END gkehub_v1_generated_GkeHub_CreateFleet_sync] diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/create_membership.rb b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/create_membership.rb new file mode 100644 index 000000000000..28f6d4328e93 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/create_membership.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 gkehub_v1_generated_GkeHub_CreateMembership_sync] +require "google/cloud/gke_hub/v1" + +## +# Snippet for the create_membership call in the GkeHub 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::GkeHub::V1::GkeHub::Client#create_membership. +# +def create_membership + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GkeHub::V1::CreateMembershipRequest.new + + # Call the create_membership method. + result = client.create_membership request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END gkehub_v1_generated_GkeHub_CreateMembership_sync] diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/create_membership_binding.rb b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/create_membership_binding.rb new file mode 100644 index 000000000000..29f4afd18ec7 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/create_membership_binding.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 gkehub_v1_generated_GkeHub_CreateMembershipBinding_sync] +require "google/cloud/gke_hub/v1" + +## +# Snippet for the create_membership_binding call in the GkeHub 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::GkeHub::V1::GkeHub::Client#create_membership_binding. +# +def create_membership_binding + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GkeHub::V1::CreateMembershipBindingRequest.new + + # Call the create_membership_binding method. + result = client.create_membership_binding request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END gkehub_v1_generated_GkeHub_CreateMembershipBinding_sync] diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/create_membership_rbac_role_binding.rb b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/create_membership_rbac_role_binding.rb new file mode 100644 index 000000000000..b0f6ca1bd720 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/create_membership_rbac_role_binding.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 gkehub_v1_generated_GkeHub_CreateMembershipRBACRoleBinding_sync] +require "google/cloud/gke_hub/v1" + +## +# Snippet for the create_membership_rbac_role_binding call in the GkeHub 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::GkeHub::V1::GkeHub::Client#create_membership_rbac_role_binding. +# +def create_membership_rbac_role_binding + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GkeHub::V1::CreateMembershipRBACRoleBindingRequest.new + + # Call the create_membership_rbac_role_binding method. + result = client.create_membership_rbac_role_binding request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END gkehub_v1_generated_GkeHub_CreateMembershipRBACRoleBinding_sync] diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/create_scope.rb b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/create_scope.rb new file mode 100644 index 000000000000..f11c5d23043f --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/create_scope.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 gkehub_v1_generated_GkeHub_CreateScope_sync] +require "google/cloud/gke_hub/v1" + +## +# Snippet for the create_scope call in the GkeHub 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::GkeHub::V1::GkeHub::Client#create_scope. +# +def create_scope + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GkeHub::V1::CreateScopeRequest.new + + # Call the create_scope method. + result = client.create_scope request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END gkehub_v1_generated_GkeHub_CreateScope_sync] diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/create_scope_namespace.rb b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/create_scope_namespace.rb new file mode 100644 index 000000000000..5d9f6e8667d9 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/create_scope_namespace.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 gkehub_v1_generated_GkeHub_CreateScopeNamespace_sync] +require "google/cloud/gke_hub/v1" + +## +# Snippet for the create_scope_namespace call in the GkeHub 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::GkeHub::V1::GkeHub::Client#create_scope_namespace. +# +def create_scope_namespace + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GkeHub::V1::CreateScopeNamespaceRequest.new + + # Call the create_scope_namespace method. + result = client.create_scope_namespace request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END gkehub_v1_generated_GkeHub_CreateScopeNamespace_sync] diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/create_scope_rbac_role_binding.rb b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/create_scope_rbac_role_binding.rb new file mode 100644 index 000000000000..db1adbe2cacb --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/create_scope_rbac_role_binding.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 gkehub_v1_generated_GkeHub_CreateScopeRBACRoleBinding_sync] +require "google/cloud/gke_hub/v1" + +## +# Snippet for the create_scope_rbac_role_binding call in the GkeHub 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::GkeHub::V1::GkeHub::Client#create_scope_rbac_role_binding. +# +def create_scope_rbac_role_binding + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GkeHub::V1::CreateScopeRBACRoleBindingRequest.new + + # Call the create_scope_rbac_role_binding method. + result = client.create_scope_rbac_role_binding request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END gkehub_v1_generated_GkeHub_CreateScopeRBACRoleBinding_sync] diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/delete_feature.rb b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/delete_feature.rb new file mode 100644 index 000000000000..d5ab282208d9 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/delete_feature.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 gkehub_v1_generated_GkeHub_DeleteFeature_sync] +require "google/cloud/gke_hub/v1" + +## +# Snippet for the delete_feature call in the GkeHub 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::GkeHub::V1::GkeHub::Client#delete_feature. +# +def delete_feature + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GkeHub::V1::DeleteFeatureRequest.new + + # Call the delete_feature method. + result = client.delete_feature request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END gkehub_v1_generated_GkeHub_DeleteFeature_sync] diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/delete_fleet.rb b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/delete_fleet.rb new file mode 100644 index 000000000000..fd1468fd9659 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/delete_fleet.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 gkehub_v1_generated_GkeHub_DeleteFleet_sync] +require "google/cloud/gke_hub/v1" + +## +# Snippet for the delete_fleet call in the GkeHub 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::GkeHub::V1::GkeHub::Client#delete_fleet. +# +def delete_fleet + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GkeHub::V1::DeleteFleetRequest.new + + # Call the delete_fleet method. + result = client.delete_fleet request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END gkehub_v1_generated_GkeHub_DeleteFleet_sync] diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/delete_membership.rb b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/delete_membership.rb new file mode 100644 index 000000000000..bda3bb0bb7e8 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/delete_membership.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 gkehub_v1_generated_GkeHub_DeleteMembership_sync] +require "google/cloud/gke_hub/v1" + +## +# Snippet for the delete_membership call in the GkeHub 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::GkeHub::V1::GkeHub::Client#delete_membership. +# +def delete_membership + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GkeHub::V1::DeleteMembershipRequest.new + + # Call the delete_membership method. + result = client.delete_membership request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END gkehub_v1_generated_GkeHub_DeleteMembership_sync] diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/delete_membership_binding.rb b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/delete_membership_binding.rb new file mode 100644 index 000000000000..eb004dbaff12 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/delete_membership_binding.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 gkehub_v1_generated_GkeHub_DeleteMembershipBinding_sync] +require "google/cloud/gke_hub/v1" + +## +# Snippet for the delete_membership_binding call in the GkeHub 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::GkeHub::V1::GkeHub::Client#delete_membership_binding. +# +def delete_membership_binding + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GkeHub::V1::DeleteMembershipBindingRequest.new + + # Call the delete_membership_binding method. + result = client.delete_membership_binding request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END gkehub_v1_generated_GkeHub_DeleteMembershipBinding_sync] diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/delete_membership_rbac_role_binding.rb b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/delete_membership_rbac_role_binding.rb new file mode 100644 index 000000000000..526b1a039aeb --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/delete_membership_rbac_role_binding.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 gkehub_v1_generated_GkeHub_DeleteMembershipRBACRoleBinding_sync] +require "google/cloud/gke_hub/v1" + +## +# Snippet for the delete_membership_rbac_role_binding call in the GkeHub 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::GkeHub::V1::GkeHub::Client#delete_membership_rbac_role_binding. +# +def delete_membership_rbac_role_binding + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GkeHub::V1::DeleteMembershipRBACRoleBindingRequest.new + + # Call the delete_membership_rbac_role_binding method. + result = client.delete_membership_rbac_role_binding request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END gkehub_v1_generated_GkeHub_DeleteMembershipRBACRoleBinding_sync] diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/delete_scope.rb b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/delete_scope.rb new file mode 100644 index 000000000000..b9026dc287e3 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/delete_scope.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 gkehub_v1_generated_GkeHub_DeleteScope_sync] +require "google/cloud/gke_hub/v1" + +## +# Snippet for the delete_scope call in the GkeHub 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::GkeHub::V1::GkeHub::Client#delete_scope. +# +def delete_scope + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GkeHub::V1::DeleteScopeRequest.new + + # Call the delete_scope method. + result = client.delete_scope request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END gkehub_v1_generated_GkeHub_DeleteScope_sync] diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/delete_scope_namespace.rb b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/delete_scope_namespace.rb new file mode 100644 index 000000000000..97c934ddce40 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/delete_scope_namespace.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 gkehub_v1_generated_GkeHub_DeleteScopeNamespace_sync] +require "google/cloud/gke_hub/v1" + +## +# Snippet for the delete_scope_namespace call in the GkeHub 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::GkeHub::V1::GkeHub::Client#delete_scope_namespace. +# +def delete_scope_namespace + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GkeHub::V1::DeleteScopeNamespaceRequest.new + + # Call the delete_scope_namespace method. + result = client.delete_scope_namespace request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END gkehub_v1_generated_GkeHub_DeleteScopeNamespace_sync] diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/delete_scope_rbac_role_binding.rb b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/delete_scope_rbac_role_binding.rb new file mode 100644 index 000000000000..9b225d7f0e23 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/delete_scope_rbac_role_binding.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 gkehub_v1_generated_GkeHub_DeleteScopeRBACRoleBinding_sync] +require "google/cloud/gke_hub/v1" + +## +# Snippet for the delete_scope_rbac_role_binding call in the GkeHub 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::GkeHub::V1::GkeHub::Client#delete_scope_rbac_role_binding. +# +def delete_scope_rbac_role_binding + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GkeHub::V1::DeleteScopeRBACRoleBindingRequest.new + + # Call the delete_scope_rbac_role_binding method. + result = client.delete_scope_rbac_role_binding request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END gkehub_v1_generated_GkeHub_DeleteScopeRBACRoleBinding_sync] diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/generate_connect_manifest.rb b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/generate_connect_manifest.rb new file mode 100644 index 000000000000..a9afd25a3136 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/generate_connect_manifest.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 gkehub_v1_generated_GkeHub_GenerateConnectManifest_sync] +require "google/cloud/gke_hub/v1" + +## +# Snippet for the generate_connect_manifest call in the GkeHub 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::GkeHub::V1::GkeHub::Client#generate_connect_manifest. +# +def generate_connect_manifest + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GkeHub::V1::GenerateConnectManifestRequest.new + + # Call the generate_connect_manifest method. + result = client.generate_connect_manifest request + + # The returned object is of type Google::Cloud::GkeHub::V1::GenerateConnectManifestResponse. + p result +end +# [END gkehub_v1_generated_GkeHub_GenerateConnectManifest_sync] diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/generate_membership_rbac_role_binding_yaml.rb b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/generate_membership_rbac_role_binding_yaml.rb new file mode 100644 index 000000000000..a1ede83cb4c3 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/generate_membership_rbac_role_binding_yaml.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 gkehub_v1_generated_GkeHub_GenerateMembershipRBACRoleBindingYAML_sync] +require "google/cloud/gke_hub/v1" + +## +# Snippet for the generate_membership_rbac_role_binding_yaml call in the GkeHub 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::GkeHub::V1::GkeHub::Client#generate_membership_rbac_role_binding_yaml. +# +def generate_membership_rbac_role_binding_yaml + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GkeHub::V1::GenerateMembershipRBACRoleBindingYAMLRequest.new + + # Call the generate_membership_rbac_role_binding_yaml method. + result = client.generate_membership_rbac_role_binding_yaml request + + # The returned object is of type Google::Cloud::GkeHub::V1::GenerateMembershipRBACRoleBindingYAMLResponse. + p result +end +# [END gkehub_v1_generated_GkeHub_GenerateMembershipRBACRoleBindingYAML_sync] diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/get_feature.rb b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/get_feature.rb new file mode 100644 index 000000000000..f7e8cd8203b8 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/get_feature.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 gkehub_v1_generated_GkeHub_GetFeature_sync] +require "google/cloud/gke_hub/v1" + +## +# Snippet for the get_feature call in the GkeHub 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::GkeHub::V1::GkeHub::Client#get_feature. +# +def get_feature + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GkeHub::V1::GetFeatureRequest.new + + # Call the get_feature method. + result = client.get_feature request + + # The returned object is of type Google::Cloud::GkeHub::V1::Feature. + p result +end +# [END gkehub_v1_generated_GkeHub_GetFeature_sync] diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/get_fleet.rb b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/get_fleet.rb new file mode 100644 index 000000000000..8cdaad109b91 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/get_fleet.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 gkehub_v1_generated_GkeHub_GetFleet_sync] +require "google/cloud/gke_hub/v1" + +## +# Snippet for the get_fleet call in the GkeHub 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::GkeHub::V1::GkeHub::Client#get_fleet. +# +def get_fleet + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GkeHub::V1::GetFleetRequest.new + + # Call the get_fleet method. + result = client.get_fleet request + + # The returned object is of type Google::Cloud::GkeHub::V1::Fleet. + p result +end +# [END gkehub_v1_generated_GkeHub_GetFleet_sync] diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/get_membership.rb b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/get_membership.rb new file mode 100644 index 000000000000..936b0e63b577 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/get_membership.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 gkehub_v1_generated_GkeHub_GetMembership_sync] +require "google/cloud/gke_hub/v1" + +## +# Snippet for the get_membership call in the GkeHub 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::GkeHub::V1::GkeHub::Client#get_membership. +# +def get_membership + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GkeHub::V1::GetMembershipRequest.new + + # Call the get_membership method. + result = client.get_membership request + + # The returned object is of type Google::Cloud::GkeHub::V1::Membership. + p result +end +# [END gkehub_v1_generated_GkeHub_GetMembership_sync] diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/get_membership_binding.rb b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/get_membership_binding.rb new file mode 100644 index 000000000000..19829bc7ac58 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/get_membership_binding.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 gkehub_v1_generated_GkeHub_GetMembershipBinding_sync] +require "google/cloud/gke_hub/v1" + +## +# Snippet for the get_membership_binding call in the GkeHub 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::GkeHub::V1::GkeHub::Client#get_membership_binding. +# +def get_membership_binding + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GkeHub::V1::GetMembershipBindingRequest.new + + # Call the get_membership_binding method. + result = client.get_membership_binding request + + # The returned object is of type Google::Cloud::GkeHub::V1::MembershipBinding. + p result +end +# [END gkehub_v1_generated_GkeHub_GetMembershipBinding_sync] diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/get_membership_rbac_role_binding.rb b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/get_membership_rbac_role_binding.rb new file mode 100644 index 000000000000..f174431da9ec --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/get_membership_rbac_role_binding.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 gkehub_v1_generated_GkeHub_GetMembershipRBACRoleBinding_sync] +require "google/cloud/gke_hub/v1" + +## +# Snippet for the get_membership_rbac_role_binding call in the GkeHub 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::GkeHub::V1::GkeHub::Client#get_membership_rbac_role_binding. +# +def get_membership_rbac_role_binding + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GkeHub::V1::GetMembershipRBACRoleBindingRequest.new + + # Call the get_membership_rbac_role_binding method. + result = client.get_membership_rbac_role_binding request + + # The returned object is of type Google::Cloud::GkeHub::V1::RBACRoleBinding. + p result +end +# [END gkehub_v1_generated_GkeHub_GetMembershipRBACRoleBinding_sync] diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/get_scope.rb b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/get_scope.rb new file mode 100644 index 000000000000..5670d5d6bb95 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/get_scope.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 gkehub_v1_generated_GkeHub_GetScope_sync] +require "google/cloud/gke_hub/v1" + +## +# Snippet for the get_scope call in the GkeHub 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::GkeHub::V1::GkeHub::Client#get_scope. +# +def get_scope + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GkeHub::V1::GetScopeRequest.new + + # Call the get_scope method. + result = client.get_scope request + + # The returned object is of type Google::Cloud::GkeHub::V1::Scope. + p result +end +# [END gkehub_v1_generated_GkeHub_GetScope_sync] diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/get_scope_namespace.rb b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/get_scope_namespace.rb new file mode 100644 index 000000000000..b90151be11dd --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/get_scope_namespace.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 gkehub_v1_generated_GkeHub_GetScopeNamespace_sync] +require "google/cloud/gke_hub/v1" + +## +# Snippet for the get_scope_namespace call in the GkeHub 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::GkeHub::V1::GkeHub::Client#get_scope_namespace. +# +def get_scope_namespace + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GkeHub::V1::GetScopeNamespaceRequest.new + + # Call the get_scope_namespace method. + result = client.get_scope_namespace request + + # The returned object is of type Google::Cloud::GkeHub::V1::Namespace. + p result +end +# [END gkehub_v1_generated_GkeHub_GetScopeNamespace_sync] diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/get_scope_rbac_role_binding.rb b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/get_scope_rbac_role_binding.rb new file mode 100644 index 000000000000..fa7993b6704b --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/get_scope_rbac_role_binding.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 gkehub_v1_generated_GkeHub_GetScopeRBACRoleBinding_sync] +require "google/cloud/gke_hub/v1" + +## +# Snippet for the get_scope_rbac_role_binding call in the GkeHub 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::GkeHub::V1::GkeHub::Client#get_scope_rbac_role_binding. +# +def get_scope_rbac_role_binding + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GkeHub::V1::GetScopeRBACRoleBindingRequest.new + + # Call the get_scope_rbac_role_binding method. + result = client.get_scope_rbac_role_binding request + + # The returned object is of type Google::Cloud::GkeHub::V1::RBACRoleBinding. + p result +end +# [END gkehub_v1_generated_GkeHub_GetScopeRBACRoleBinding_sync] diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/list_bound_memberships.rb b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/list_bound_memberships.rb new file mode 100644 index 000000000000..086f3074a3c8 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/list_bound_memberships.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 gkehub_v1_generated_GkeHub_ListBoundMemberships_sync] +require "google/cloud/gke_hub/v1" + +## +# Snippet for the list_bound_memberships call in the GkeHub 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::GkeHub::V1::GkeHub::Client#list_bound_memberships. +# +def list_bound_memberships + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GkeHub::V1::ListBoundMembershipsRequest.new + + # Call the list_bound_memberships method. + result = client.list_bound_memberships 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::GkeHub::V1::Membership. + p item + end +end +# [END gkehub_v1_generated_GkeHub_ListBoundMemberships_sync] diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/list_features.rb b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/list_features.rb new file mode 100644 index 000000000000..691761a88b5f --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/list_features.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 gkehub_v1_generated_GkeHub_ListFeatures_sync] +require "google/cloud/gke_hub/v1" + +## +# Snippet for the list_features call in the GkeHub 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::GkeHub::V1::GkeHub::Client#list_features. +# +def list_features + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GkeHub::V1::ListFeaturesRequest.new + + # Call the list_features method. + result = client.list_features 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::GkeHub::V1::Feature. + p item + end +end +# [END gkehub_v1_generated_GkeHub_ListFeatures_sync] diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/list_fleets.rb b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/list_fleets.rb new file mode 100644 index 000000000000..0c8eb5240327 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/list_fleets.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 gkehub_v1_generated_GkeHub_ListFleets_sync] +require "google/cloud/gke_hub/v1" + +## +# Snippet for the list_fleets call in the GkeHub 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::GkeHub::V1::GkeHub::Client#list_fleets. +# +def list_fleets + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GkeHub::V1::ListFleetsRequest.new + + # Call the list_fleets method. + result = client.list_fleets 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::GkeHub::V1::Fleet. + p item + end +end +# [END gkehub_v1_generated_GkeHub_ListFleets_sync] diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/list_membership_bindings.rb b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/list_membership_bindings.rb new file mode 100644 index 000000000000..7b37dfa7c06b --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/list_membership_bindings.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 gkehub_v1_generated_GkeHub_ListMembershipBindings_sync] +require "google/cloud/gke_hub/v1" + +## +# Snippet for the list_membership_bindings call in the GkeHub 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::GkeHub::V1::GkeHub::Client#list_membership_bindings. +# +def list_membership_bindings + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GkeHub::V1::ListMembershipBindingsRequest.new + + # Call the list_membership_bindings method. + result = client.list_membership_bindings 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::GkeHub::V1::MembershipBinding. + p item + end +end +# [END gkehub_v1_generated_GkeHub_ListMembershipBindings_sync] diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/list_membership_rbac_role_bindings.rb b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/list_membership_rbac_role_bindings.rb new file mode 100644 index 000000000000..96971e399c00 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/list_membership_rbac_role_bindings.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 gkehub_v1_generated_GkeHub_ListMembershipRBACRoleBindings_sync] +require "google/cloud/gke_hub/v1" + +## +# Snippet for the list_membership_rbac_role_bindings call in the GkeHub 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::GkeHub::V1::GkeHub::Client#list_membership_rbac_role_bindings. +# +def list_membership_rbac_role_bindings + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GkeHub::V1::ListMembershipRBACRoleBindingsRequest.new + + # Call the list_membership_rbac_role_bindings method. + result = client.list_membership_rbac_role_bindings 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::GkeHub::V1::RBACRoleBinding. + p item + end +end +# [END gkehub_v1_generated_GkeHub_ListMembershipRBACRoleBindings_sync] diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/list_memberships.rb b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/list_memberships.rb new file mode 100644 index 000000000000..26d33fb34cf5 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/list_memberships.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 gkehub_v1_generated_GkeHub_ListMemberships_sync] +require "google/cloud/gke_hub/v1" + +## +# Snippet for the list_memberships call in the GkeHub 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::GkeHub::V1::GkeHub::Client#list_memberships. +# +def list_memberships + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GkeHub::V1::ListMembershipsRequest.new + + # Call the list_memberships method. + result = client.list_memberships 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::GkeHub::V1::Membership. + p item + end +end +# [END gkehub_v1_generated_GkeHub_ListMemberships_sync] diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/list_permitted_scopes.rb b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/list_permitted_scopes.rb new file mode 100644 index 000000000000..39346d3d3afd --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/list_permitted_scopes.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 gkehub_v1_generated_GkeHub_ListPermittedScopes_sync] +require "google/cloud/gke_hub/v1" + +## +# Snippet for the list_permitted_scopes call in the GkeHub 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::GkeHub::V1::GkeHub::Client#list_permitted_scopes. +# +def list_permitted_scopes + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GkeHub::V1::ListPermittedScopesRequest.new + + # Call the list_permitted_scopes method. + result = client.list_permitted_scopes 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::GkeHub::V1::Scope. + p item + end +end +# [END gkehub_v1_generated_GkeHub_ListPermittedScopes_sync] diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/list_scope_namespaces.rb b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/list_scope_namespaces.rb new file mode 100644 index 000000000000..0032bdea979d --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/list_scope_namespaces.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 gkehub_v1_generated_GkeHub_ListScopeNamespaces_sync] +require "google/cloud/gke_hub/v1" + +## +# Snippet for the list_scope_namespaces call in the GkeHub 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::GkeHub::V1::GkeHub::Client#list_scope_namespaces. +# +def list_scope_namespaces + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GkeHub::V1::ListScopeNamespacesRequest.new + + # Call the list_scope_namespaces method. + result = client.list_scope_namespaces 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::GkeHub::V1::Namespace. + p item + end +end +# [END gkehub_v1_generated_GkeHub_ListScopeNamespaces_sync] diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/list_scope_rbac_role_bindings.rb b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/list_scope_rbac_role_bindings.rb new file mode 100644 index 000000000000..60b54e79a8fe --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/list_scope_rbac_role_bindings.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 gkehub_v1_generated_GkeHub_ListScopeRBACRoleBindings_sync] +require "google/cloud/gke_hub/v1" + +## +# Snippet for the list_scope_rbac_role_bindings call in the GkeHub 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::GkeHub::V1::GkeHub::Client#list_scope_rbac_role_bindings. +# +def list_scope_rbac_role_bindings + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GkeHub::V1::ListScopeRBACRoleBindingsRequest.new + + # Call the list_scope_rbac_role_bindings method. + result = client.list_scope_rbac_role_bindings 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::GkeHub::V1::RBACRoleBinding. + p item + end +end +# [END gkehub_v1_generated_GkeHub_ListScopeRBACRoleBindings_sync] diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/list_scopes.rb b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/list_scopes.rb new file mode 100644 index 000000000000..cc3c7230c516 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/list_scopes.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 gkehub_v1_generated_GkeHub_ListScopes_sync] +require "google/cloud/gke_hub/v1" + +## +# Snippet for the list_scopes call in the GkeHub 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::GkeHub::V1::GkeHub::Client#list_scopes. +# +def list_scopes + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GkeHub::V1::ListScopesRequest.new + + # Call the list_scopes method. + result = client.list_scopes 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::GkeHub::V1::Scope. + p item + end +end +# [END gkehub_v1_generated_GkeHub_ListScopes_sync] diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/update_feature.rb b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/update_feature.rb new file mode 100644 index 000000000000..b7b0abe5df93 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/update_feature.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 gkehub_v1_generated_GkeHub_UpdateFeature_sync] +require "google/cloud/gke_hub/v1" + +## +# Snippet for the update_feature call in the GkeHub 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::GkeHub::V1::GkeHub::Client#update_feature. +# +def update_feature + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GkeHub::V1::UpdateFeatureRequest.new + + # Call the update_feature method. + result = client.update_feature request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END gkehub_v1_generated_GkeHub_UpdateFeature_sync] diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/update_fleet.rb b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/update_fleet.rb new file mode 100644 index 000000000000..bdbf68efa231 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/update_fleet.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 gkehub_v1_generated_GkeHub_UpdateFleet_sync] +require "google/cloud/gke_hub/v1" + +## +# Snippet for the update_fleet call in the GkeHub 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::GkeHub::V1::GkeHub::Client#update_fleet. +# +def update_fleet + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GkeHub::V1::UpdateFleetRequest.new + + # Call the update_fleet method. + result = client.update_fleet request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END gkehub_v1_generated_GkeHub_UpdateFleet_sync] diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/update_membership.rb b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/update_membership.rb new file mode 100644 index 000000000000..46717539b954 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/update_membership.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 gkehub_v1_generated_GkeHub_UpdateMembership_sync] +require "google/cloud/gke_hub/v1" + +## +# Snippet for the update_membership call in the GkeHub 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::GkeHub::V1::GkeHub::Client#update_membership. +# +def update_membership + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GkeHub::V1::UpdateMembershipRequest.new + + # Call the update_membership method. + result = client.update_membership request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END gkehub_v1_generated_GkeHub_UpdateMembership_sync] diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/update_membership_binding.rb b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/update_membership_binding.rb new file mode 100644 index 000000000000..7151c55c6fc9 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/update_membership_binding.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 gkehub_v1_generated_GkeHub_UpdateMembershipBinding_sync] +require "google/cloud/gke_hub/v1" + +## +# Snippet for the update_membership_binding call in the GkeHub 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::GkeHub::V1::GkeHub::Client#update_membership_binding. +# +def update_membership_binding + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GkeHub::V1::UpdateMembershipBindingRequest.new + + # Call the update_membership_binding method. + result = client.update_membership_binding request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END gkehub_v1_generated_GkeHub_UpdateMembershipBinding_sync] diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/update_membership_rbac_role_binding.rb b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/update_membership_rbac_role_binding.rb new file mode 100644 index 000000000000..1ec7b8a81a76 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/update_membership_rbac_role_binding.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 gkehub_v1_generated_GkeHub_UpdateMembershipRBACRoleBinding_sync] +require "google/cloud/gke_hub/v1" + +## +# Snippet for the update_membership_rbac_role_binding call in the GkeHub 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::GkeHub::V1::GkeHub::Client#update_membership_rbac_role_binding. +# +def update_membership_rbac_role_binding + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GkeHub::V1::UpdateMembershipRBACRoleBindingRequest.new + + # Call the update_membership_rbac_role_binding method. + result = client.update_membership_rbac_role_binding request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END gkehub_v1_generated_GkeHub_UpdateMembershipRBACRoleBinding_sync] diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/update_scope.rb b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/update_scope.rb new file mode 100644 index 000000000000..213660d3bc6d --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/update_scope.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 gkehub_v1_generated_GkeHub_UpdateScope_sync] +require "google/cloud/gke_hub/v1" + +## +# Snippet for the update_scope call in the GkeHub 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::GkeHub::V1::GkeHub::Client#update_scope. +# +def update_scope + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GkeHub::V1::UpdateScopeRequest.new + + # Call the update_scope method. + result = client.update_scope request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END gkehub_v1_generated_GkeHub_UpdateScope_sync] diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/update_scope_namespace.rb b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/update_scope_namespace.rb new file mode 100644 index 000000000000..536b90d986aa --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/update_scope_namespace.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 gkehub_v1_generated_GkeHub_UpdateScopeNamespace_sync] +require "google/cloud/gke_hub/v1" + +## +# Snippet for the update_scope_namespace call in the GkeHub 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::GkeHub::V1::GkeHub::Client#update_scope_namespace. +# +def update_scope_namespace + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GkeHub::V1::UpdateScopeNamespaceRequest.new + + # Call the update_scope_namespace method. + result = client.update_scope_namespace request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END gkehub_v1_generated_GkeHub_UpdateScopeNamespace_sync] diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/update_scope_rbac_role_binding.rb b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/update_scope_rbac_role_binding.rb new file mode 100644 index 000000000000..a5bb349701d0 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/update_scope_rbac_role_binding.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 gkehub_v1_generated_GkeHub_UpdateScopeRBACRoleBinding_sync] +require "google/cloud/gke_hub/v1" + +## +# Snippet for the update_scope_rbac_role_binding call in the GkeHub 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::GkeHub::V1::GkeHub::Client#update_scope_rbac_role_binding. +# +def update_scope_rbac_role_binding + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GkeHub::V1::UpdateScopeRBACRoleBindingRequest.new + + # Call the update_scope_rbac_role_binding method. + result = client.update_scope_rbac_role_binding request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END gkehub_v1_generated_GkeHub_UpdateScopeRBACRoleBinding_sync] diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/snippet_metadata_google.cloud.gkehub.v1.json b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/snippet_metadata_google.cloud.gkehub.v1.json new file mode 100644 index 000000000000..6a997ad0f834 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/snippet_metadata_google.cloud.gkehub.v1.json @@ -0,0 +1,1775 @@ +{ + "client_library": { + "name": "google-cloud-gke_hub-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.gkehub.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "gkehub_v1_generated_GkeHub_ListMemberships_sync", + "title": "Snippet for the list_memberships call in the GkeHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#list_memberships.", + "file": "gke_hub/list_memberships.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_memberships", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#list_memberships", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeHub::V1::ListMembershipsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::GkeHub::V1::ListMembershipsResponse", + "client": { + "short_name": "GkeHub::Client", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" + }, + "method": { + "short_name": "ListMemberships", + "full_name": "google.cloud.gkehub.v1.GkeHub.ListMemberships", + "service": { + "short_name": "GkeHub", + "full_name": "google.cloud.gkehub.v1.GkeHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkehub_v1_generated_GkeHub_ListBoundMemberships_sync", + "title": "Snippet for the list_bound_memberships call in the GkeHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#list_bound_memberships.", + "file": "gke_hub/list_bound_memberships.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_bound_memberships", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#list_bound_memberships", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeHub::V1::ListBoundMembershipsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::GkeHub::V1::ListBoundMembershipsResponse", + "client": { + "short_name": "GkeHub::Client", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" + }, + "method": { + "short_name": "ListBoundMemberships", + "full_name": "google.cloud.gkehub.v1.GkeHub.ListBoundMemberships", + "service": { + "short_name": "GkeHub", + "full_name": "google.cloud.gkehub.v1.GkeHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkehub_v1_generated_GkeHub_ListFeatures_sync", + "title": "Snippet for the list_features call in the GkeHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#list_features.", + "file": "gke_hub/list_features.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_features", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#list_features", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeHub::V1::ListFeaturesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::GkeHub::V1::ListFeaturesResponse", + "client": { + "short_name": "GkeHub::Client", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" + }, + "method": { + "short_name": "ListFeatures", + "full_name": "google.cloud.gkehub.v1.GkeHub.ListFeatures", + "service": { + "short_name": "GkeHub", + "full_name": "google.cloud.gkehub.v1.GkeHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkehub_v1_generated_GkeHub_GetMembership_sync", + "title": "Snippet for the get_membership call in the GkeHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#get_membership.", + "file": "gke_hub/get_membership.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_membership", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#get_membership", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeHub::V1::GetMembershipRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::GkeHub::V1::Membership", + "client": { + "short_name": "GkeHub::Client", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" + }, + "method": { + "short_name": "GetMembership", + "full_name": "google.cloud.gkehub.v1.GkeHub.GetMembership", + "service": { + "short_name": "GkeHub", + "full_name": "google.cloud.gkehub.v1.GkeHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkehub_v1_generated_GkeHub_GetFeature_sync", + "title": "Snippet for the get_feature call in the GkeHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#get_feature.", + "file": "gke_hub/get_feature.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_feature", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#get_feature", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeHub::V1::GetFeatureRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::GkeHub::V1::Feature", + "client": { + "short_name": "GkeHub::Client", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" + }, + "method": { + "short_name": "GetFeature", + "full_name": "google.cloud.gkehub.v1.GkeHub.GetFeature", + "service": { + "short_name": "GkeHub", + "full_name": "google.cloud.gkehub.v1.GkeHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkehub_v1_generated_GkeHub_CreateMembership_sync", + "title": "Snippet for the create_membership call in the GkeHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#create_membership.", + "file": "gke_hub/create_membership.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_membership", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#create_membership", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeHub::V1::CreateMembershipRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "GkeHub::Client", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" + }, + "method": { + "short_name": "CreateMembership", + "full_name": "google.cloud.gkehub.v1.GkeHub.CreateMembership", + "service": { + "short_name": "GkeHub", + "full_name": "google.cloud.gkehub.v1.GkeHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkehub_v1_generated_GkeHub_CreateFeature_sync", + "title": "Snippet for the create_feature call in the GkeHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#create_feature.", + "file": "gke_hub/create_feature.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_feature", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#create_feature", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeHub::V1::CreateFeatureRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "GkeHub::Client", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" + }, + "method": { + "short_name": "CreateFeature", + "full_name": "google.cloud.gkehub.v1.GkeHub.CreateFeature", + "service": { + "short_name": "GkeHub", + "full_name": "google.cloud.gkehub.v1.GkeHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkehub_v1_generated_GkeHub_DeleteMembership_sync", + "title": "Snippet for the delete_membership call in the GkeHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#delete_membership.", + "file": "gke_hub/delete_membership.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_membership", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#delete_membership", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeHub::V1::DeleteMembershipRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "GkeHub::Client", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" + }, + "method": { + "short_name": "DeleteMembership", + "full_name": "google.cloud.gkehub.v1.GkeHub.DeleteMembership", + "service": { + "short_name": "GkeHub", + "full_name": "google.cloud.gkehub.v1.GkeHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkehub_v1_generated_GkeHub_DeleteFeature_sync", + "title": "Snippet for the delete_feature call in the GkeHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#delete_feature.", + "file": "gke_hub/delete_feature.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_feature", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#delete_feature", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeHub::V1::DeleteFeatureRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "GkeHub::Client", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" + }, + "method": { + "short_name": "DeleteFeature", + "full_name": "google.cloud.gkehub.v1.GkeHub.DeleteFeature", + "service": { + "short_name": "GkeHub", + "full_name": "google.cloud.gkehub.v1.GkeHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkehub_v1_generated_GkeHub_UpdateMembership_sync", + "title": "Snippet for the update_membership call in the GkeHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#update_membership.", + "file": "gke_hub/update_membership.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_membership", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#update_membership", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeHub::V1::UpdateMembershipRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "GkeHub::Client", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" + }, + "method": { + "short_name": "UpdateMembership", + "full_name": "google.cloud.gkehub.v1.GkeHub.UpdateMembership", + "service": { + "short_name": "GkeHub", + "full_name": "google.cloud.gkehub.v1.GkeHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkehub_v1_generated_GkeHub_UpdateFeature_sync", + "title": "Snippet for the update_feature call in the GkeHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#update_feature.", + "file": "gke_hub/update_feature.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_feature", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#update_feature", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeHub::V1::UpdateFeatureRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "GkeHub::Client", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" + }, + "method": { + "short_name": "UpdateFeature", + "full_name": "google.cloud.gkehub.v1.GkeHub.UpdateFeature", + "service": { + "short_name": "GkeHub", + "full_name": "google.cloud.gkehub.v1.GkeHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkehub_v1_generated_GkeHub_GenerateConnectManifest_sync", + "title": "Snippet for the generate_connect_manifest call in the GkeHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#generate_connect_manifest.", + "file": "gke_hub/generate_connect_manifest.rb", + "language": "RUBY", + "client_method": { + "short_name": "generate_connect_manifest", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#generate_connect_manifest", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeHub::V1::GenerateConnectManifestRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::GkeHub::V1::GenerateConnectManifestResponse", + "client": { + "short_name": "GkeHub::Client", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" + }, + "method": { + "short_name": "GenerateConnectManifest", + "full_name": "google.cloud.gkehub.v1.GkeHub.GenerateConnectManifest", + "service": { + "short_name": "GkeHub", + "full_name": "google.cloud.gkehub.v1.GkeHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkehub_v1_generated_GkeHub_CreateFleet_sync", + "title": "Snippet for the create_fleet call in the GkeHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#create_fleet.", + "file": "gke_hub/create_fleet.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_fleet", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#create_fleet", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeHub::V1::CreateFleetRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "GkeHub::Client", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" + }, + "method": { + "short_name": "CreateFleet", + "full_name": "google.cloud.gkehub.v1.GkeHub.CreateFleet", + "service": { + "short_name": "GkeHub", + "full_name": "google.cloud.gkehub.v1.GkeHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkehub_v1_generated_GkeHub_GetFleet_sync", + "title": "Snippet for the get_fleet call in the GkeHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#get_fleet.", + "file": "gke_hub/get_fleet.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_fleet", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#get_fleet", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeHub::V1::GetFleetRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::GkeHub::V1::Fleet", + "client": { + "short_name": "GkeHub::Client", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" + }, + "method": { + "short_name": "GetFleet", + "full_name": "google.cloud.gkehub.v1.GkeHub.GetFleet", + "service": { + "short_name": "GkeHub", + "full_name": "google.cloud.gkehub.v1.GkeHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkehub_v1_generated_GkeHub_UpdateFleet_sync", + "title": "Snippet for the update_fleet call in the GkeHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#update_fleet.", + "file": "gke_hub/update_fleet.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_fleet", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#update_fleet", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeHub::V1::UpdateFleetRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "GkeHub::Client", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" + }, + "method": { + "short_name": "UpdateFleet", + "full_name": "google.cloud.gkehub.v1.GkeHub.UpdateFleet", + "service": { + "short_name": "GkeHub", + "full_name": "google.cloud.gkehub.v1.GkeHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkehub_v1_generated_GkeHub_DeleteFleet_sync", + "title": "Snippet for the delete_fleet call in the GkeHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#delete_fleet.", + "file": "gke_hub/delete_fleet.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_fleet", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#delete_fleet", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeHub::V1::DeleteFleetRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "GkeHub::Client", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" + }, + "method": { + "short_name": "DeleteFleet", + "full_name": "google.cloud.gkehub.v1.GkeHub.DeleteFleet", + "service": { + "short_name": "GkeHub", + "full_name": "google.cloud.gkehub.v1.GkeHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkehub_v1_generated_GkeHub_ListFleets_sync", + "title": "Snippet for the list_fleets call in the GkeHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#list_fleets.", + "file": "gke_hub/list_fleets.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_fleets", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#list_fleets", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeHub::V1::ListFleetsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::GkeHub::V1::ListFleetsResponse", + "client": { + "short_name": "GkeHub::Client", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" + }, + "method": { + "short_name": "ListFleets", + "full_name": "google.cloud.gkehub.v1.GkeHub.ListFleets", + "service": { + "short_name": "GkeHub", + "full_name": "google.cloud.gkehub.v1.GkeHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkehub_v1_generated_GkeHub_GetScopeNamespace_sync", + "title": "Snippet for the get_scope_namespace call in the GkeHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#get_scope_namespace.", + "file": "gke_hub/get_scope_namespace.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_scope_namespace", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#get_scope_namespace", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeHub::V1::GetScopeNamespaceRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::GkeHub::V1::Namespace", + "client": { + "short_name": "GkeHub::Client", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" + }, + "method": { + "short_name": "GetScopeNamespace", + "full_name": "google.cloud.gkehub.v1.GkeHub.GetScopeNamespace", + "service": { + "short_name": "GkeHub", + "full_name": "google.cloud.gkehub.v1.GkeHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkehub_v1_generated_GkeHub_CreateScopeNamespace_sync", + "title": "Snippet for the create_scope_namespace call in the GkeHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#create_scope_namespace.", + "file": "gke_hub/create_scope_namespace.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_scope_namespace", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#create_scope_namespace", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeHub::V1::CreateScopeNamespaceRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "GkeHub::Client", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" + }, + "method": { + "short_name": "CreateScopeNamespace", + "full_name": "google.cloud.gkehub.v1.GkeHub.CreateScopeNamespace", + "service": { + "short_name": "GkeHub", + "full_name": "google.cloud.gkehub.v1.GkeHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkehub_v1_generated_GkeHub_UpdateScopeNamespace_sync", + "title": "Snippet for the update_scope_namespace call in the GkeHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#update_scope_namespace.", + "file": "gke_hub/update_scope_namespace.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_scope_namespace", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#update_scope_namespace", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeHub::V1::UpdateScopeNamespaceRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "GkeHub::Client", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" + }, + "method": { + "short_name": "UpdateScopeNamespace", + "full_name": "google.cloud.gkehub.v1.GkeHub.UpdateScopeNamespace", + "service": { + "short_name": "GkeHub", + "full_name": "google.cloud.gkehub.v1.GkeHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkehub_v1_generated_GkeHub_DeleteScopeNamespace_sync", + "title": "Snippet for the delete_scope_namespace call in the GkeHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#delete_scope_namespace.", + "file": "gke_hub/delete_scope_namespace.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_scope_namespace", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#delete_scope_namespace", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeHub::V1::DeleteScopeNamespaceRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "GkeHub::Client", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" + }, + "method": { + "short_name": "DeleteScopeNamespace", + "full_name": "google.cloud.gkehub.v1.GkeHub.DeleteScopeNamespace", + "service": { + "short_name": "GkeHub", + "full_name": "google.cloud.gkehub.v1.GkeHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkehub_v1_generated_GkeHub_ListScopeNamespaces_sync", + "title": "Snippet for the list_scope_namespaces call in the GkeHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#list_scope_namespaces.", + "file": "gke_hub/list_scope_namespaces.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_scope_namespaces", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#list_scope_namespaces", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeHub::V1::ListScopeNamespacesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::GkeHub::V1::ListScopeNamespacesResponse", + "client": { + "short_name": "GkeHub::Client", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" + }, + "method": { + "short_name": "ListScopeNamespaces", + "full_name": "google.cloud.gkehub.v1.GkeHub.ListScopeNamespaces", + "service": { + "short_name": "GkeHub", + "full_name": "google.cloud.gkehub.v1.GkeHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkehub_v1_generated_GkeHub_GetScopeRBACRoleBinding_sync", + "title": "Snippet for the get_scope_rbac_role_binding call in the GkeHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#get_scope_rbac_role_binding.", + "file": "gke_hub/get_scope_rbac_role_binding.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_scope_rbac_role_binding", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#get_scope_rbac_role_binding", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeHub::V1::GetScopeRBACRoleBindingRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::GkeHub::V1::RBACRoleBinding", + "client": { + "short_name": "GkeHub::Client", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" + }, + "method": { + "short_name": "GetScopeRBACRoleBinding", + "full_name": "google.cloud.gkehub.v1.GkeHub.GetScopeRBACRoleBinding", + "service": { + "short_name": "GkeHub", + "full_name": "google.cloud.gkehub.v1.GkeHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkehub_v1_generated_GkeHub_CreateScopeRBACRoleBinding_sync", + "title": "Snippet for the create_scope_rbac_role_binding call in the GkeHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#create_scope_rbac_role_binding.", + "file": "gke_hub/create_scope_rbac_role_binding.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_scope_rbac_role_binding", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#create_scope_rbac_role_binding", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeHub::V1::CreateScopeRBACRoleBindingRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "GkeHub::Client", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" + }, + "method": { + "short_name": "CreateScopeRBACRoleBinding", + "full_name": "google.cloud.gkehub.v1.GkeHub.CreateScopeRBACRoleBinding", + "service": { + "short_name": "GkeHub", + "full_name": "google.cloud.gkehub.v1.GkeHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkehub_v1_generated_GkeHub_UpdateScopeRBACRoleBinding_sync", + "title": "Snippet for the update_scope_rbac_role_binding call in the GkeHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#update_scope_rbac_role_binding.", + "file": "gke_hub/update_scope_rbac_role_binding.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_scope_rbac_role_binding", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#update_scope_rbac_role_binding", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeHub::V1::UpdateScopeRBACRoleBindingRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "GkeHub::Client", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" + }, + "method": { + "short_name": "UpdateScopeRBACRoleBinding", + "full_name": "google.cloud.gkehub.v1.GkeHub.UpdateScopeRBACRoleBinding", + "service": { + "short_name": "GkeHub", + "full_name": "google.cloud.gkehub.v1.GkeHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkehub_v1_generated_GkeHub_DeleteScopeRBACRoleBinding_sync", + "title": "Snippet for the delete_scope_rbac_role_binding call in the GkeHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#delete_scope_rbac_role_binding.", + "file": "gke_hub/delete_scope_rbac_role_binding.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_scope_rbac_role_binding", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#delete_scope_rbac_role_binding", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeHub::V1::DeleteScopeRBACRoleBindingRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "GkeHub::Client", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" + }, + "method": { + "short_name": "DeleteScopeRBACRoleBinding", + "full_name": "google.cloud.gkehub.v1.GkeHub.DeleteScopeRBACRoleBinding", + "service": { + "short_name": "GkeHub", + "full_name": "google.cloud.gkehub.v1.GkeHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkehub_v1_generated_GkeHub_ListScopeRBACRoleBindings_sync", + "title": "Snippet for the list_scope_rbac_role_bindings call in the GkeHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#list_scope_rbac_role_bindings.", + "file": "gke_hub/list_scope_rbac_role_bindings.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_scope_rbac_role_bindings", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#list_scope_rbac_role_bindings", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeHub::V1::ListScopeRBACRoleBindingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::GkeHub::V1::ListScopeRBACRoleBindingsResponse", + "client": { + "short_name": "GkeHub::Client", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" + }, + "method": { + "short_name": "ListScopeRBACRoleBindings", + "full_name": "google.cloud.gkehub.v1.GkeHub.ListScopeRBACRoleBindings", + "service": { + "short_name": "GkeHub", + "full_name": "google.cloud.gkehub.v1.GkeHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkehub_v1_generated_GkeHub_GetScope_sync", + "title": "Snippet for the get_scope call in the GkeHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#get_scope.", + "file": "gke_hub/get_scope.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_scope", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#get_scope", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeHub::V1::GetScopeRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::GkeHub::V1::Scope", + "client": { + "short_name": "GkeHub::Client", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" + }, + "method": { + "short_name": "GetScope", + "full_name": "google.cloud.gkehub.v1.GkeHub.GetScope", + "service": { + "short_name": "GkeHub", + "full_name": "google.cloud.gkehub.v1.GkeHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkehub_v1_generated_GkeHub_CreateScope_sync", + "title": "Snippet for the create_scope call in the GkeHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#create_scope.", + "file": "gke_hub/create_scope.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_scope", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#create_scope", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeHub::V1::CreateScopeRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "GkeHub::Client", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" + }, + "method": { + "short_name": "CreateScope", + "full_name": "google.cloud.gkehub.v1.GkeHub.CreateScope", + "service": { + "short_name": "GkeHub", + "full_name": "google.cloud.gkehub.v1.GkeHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkehub_v1_generated_GkeHub_UpdateScope_sync", + "title": "Snippet for the update_scope call in the GkeHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#update_scope.", + "file": "gke_hub/update_scope.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_scope", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#update_scope", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeHub::V1::UpdateScopeRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "GkeHub::Client", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" + }, + "method": { + "short_name": "UpdateScope", + "full_name": "google.cloud.gkehub.v1.GkeHub.UpdateScope", + "service": { + "short_name": "GkeHub", + "full_name": "google.cloud.gkehub.v1.GkeHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkehub_v1_generated_GkeHub_DeleteScope_sync", + "title": "Snippet for the delete_scope call in the GkeHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#delete_scope.", + "file": "gke_hub/delete_scope.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_scope", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#delete_scope", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeHub::V1::DeleteScopeRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "GkeHub::Client", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" + }, + "method": { + "short_name": "DeleteScope", + "full_name": "google.cloud.gkehub.v1.GkeHub.DeleteScope", + "service": { + "short_name": "GkeHub", + "full_name": "google.cloud.gkehub.v1.GkeHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkehub_v1_generated_GkeHub_ListScopes_sync", + "title": "Snippet for the list_scopes call in the GkeHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#list_scopes.", + "file": "gke_hub/list_scopes.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_scopes", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#list_scopes", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeHub::V1::ListScopesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::GkeHub::V1::ListScopesResponse", + "client": { + "short_name": "GkeHub::Client", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" + }, + "method": { + "short_name": "ListScopes", + "full_name": "google.cloud.gkehub.v1.GkeHub.ListScopes", + "service": { + "short_name": "GkeHub", + "full_name": "google.cloud.gkehub.v1.GkeHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkehub_v1_generated_GkeHub_ListPermittedScopes_sync", + "title": "Snippet for the list_permitted_scopes call in the GkeHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#list_permitted_scopes.", + "file": "gke_hub/list_permitted_scopes.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_permitted_scopes", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#list_permitted_scopes", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeHub::V1::ListPermittedScopesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::GkeHub::V1::ListPermittedScopesResponse", + "client": { + "short_name": "GkeHub::Client", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" + }, + "method": { + "short_name": "ListPermittedScopes", + "full_name": "google.cloud.gkehub.v1.GkeHub.ListPermittedScopes", + "service": { + "short_name": "GkeHub", + "full_name": "google.cloud.gkehub.v1.GkeHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkehub_v1_generated_GkeHub_GetMembershipBinding_sync", + "title": "Snippet for the get_membership_binding call in the GkeHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#get_membership_binding.", + "file": "gke_hub/get_membership_binding.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_membership_binding", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#get_membership_binding", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeHub::V1::GetMembershipBindingRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::GkeHub::V1::MembershipBinding", + "client": { + "short_name": "GkeHub::Client", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" + }, + "method": { + "short_name": "GetMembershipBinding", + "full_name": "google.cloud.gkehub.v1.GkeHub.GetMembershipBinding", + "service": { + "short_name": "GkeHub", + "full_name": "google.cloud.gkehub.v1.GkeHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkehub_v1_generated_GkeHub_CreateMembershipBinding_sync", + "title": "Snippet for the create_membership_binding call in the GkeHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#create_membership_binding.", + "file": "gke_hub/create_membership_binding.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_membership_binding", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#create_membership_binding", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeHub::V1::CreateMembershipBindingRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "GkeHub::Client", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" + }, + "method": { + "short_name": "CreateMembershipBinding", + "full_name": "google.cloud.gkehub.v1.GkeHub.CreateMembershipBinding", + "service": { + "short_name": "GkeHub", + "full_name": "google.cloud.gkehub.v1.GkeHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkehub_v1_generated_GkeHub_UpdateMembershipBinding_sync", + "title": "Snippet for the update_membership_binding call in the GkeHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#update_membership_binding.", + "file": "gke_hub/update_membership_binding.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_membership_binding", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#update_membership_binding", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeHub::V1::UpdateMembershipBindingRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "GkeHub::Client", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" + }, + "method": { + "short_name": "UpdateMembershipBinding", + "full_name": "google.cloud.gkehub.v1.GkeHub.UpdateMembershipBinding", + "service": { + "short_name": "GkeHub", + "full_name": "google.cloud.gkehub.v1.GkeHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkehub_v1_generated_GkeHub_DeleteMembershipBinding_sync", + "title": "Snippet for the delete_membership_binding call in the GkeHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#delete_membership_binding.", + "file": "gke_hub/delete_membership_binding.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_membership_binding", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#delete_membership_binding", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeHub::V1::DeleteMembershipBindingRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "GkeHub::Client", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" + }, + "method": { + "short_name": "DeleteMembershipBinding", + "full_name": "google.cloud.gkehub.v1.GkeHub.DeleteMembershipBinding", + "service": { + "short_name": "GkeHub", + "full_name": "google.cloud.gkehub.v1.GkeHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkehub_v1_generated_GkeHub_ListMembershipBindings_sync", + "title": "Snippet for the list_membership_bindings call in the GkeHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#list_membership_bindings.", + "file": "gke_hub/list_membership_bindings.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_membership_bindings", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#list_membership_bindings", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeHub::V1::ListMembershipBindingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::GkeHub::V1::ListMembershipBindingsResponse", + "client": { + "short_name": "GkeHub::Client", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" + }, + "method": { + "short_name": "ListMembershipBindings", + "full_name": "google.cloud.gkehub.v1.GkeHub.ListMembershipBindings", + "service": { + "short_name": "GkeHub", + "full_name": "google.cloud.gkehub.v1.GkeHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkehub_v1_generated_GkeHub_GetMembershipRBACRoleBinding_sync", + "title": "Snippet for the get_membership_rbac_role_binding call in the GkeHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#get_membership_rbac_role_binding.", + "file": "gke_hub/get_membership_rbac_role_binding.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_membership_rbac_role_binding", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#get_membership_rbac_role_binding", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeHub::V1::GetMembershipRBACRoleBindingRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::GkeHub::V1::RBACRoleBinding", + "client": { + "short_name": "GkeHub::Client", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" + }, + "method": { + "short_name": "GetMembershipRBACRoleBinding", + "full_name": "google.cloud.gkehub.v1.GkeHub.GetMembershipRBACRoleBinding", + "service": { + "short_name": "GkeHub", + "full_name": "google.cloud.gkehub.v1.GkeHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkehub_v1_generated_GkeHub_CreateMembershipRBACRoleBinding_sync", + "title": "Snippet for the create_membership_rbac_role_binding call in the GkeHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#create_membership_rbac_role_binding.", + "file": "gke_hub/create_membership_rbac_role_binding.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_membership_rbac_role_binding", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#create_membership_rbac_role_binding", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeHub::V1::CreateMembershipRBACRoleBindingRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "GkeHub::Client", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" + }, + "method": { + "short_name": "CreateMembershipRBACRoleBinding", + "full_name": "google.cloud.gkehub.v1.GkeHub.CreateMembershipRBACRoleBinding", + "service": { + "short_name": "GkeHub", + "full_name": "google.cloud.gkehub.v1.GkeHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkehub_v1_generated_GkeHub_UpdateMembershipRBACRoleBinding_sync", + "title": "Snippet for the update_membership_rbac_role_binding call in the GkeHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#update_membership_rbac_role_binding.", + "file": "gke_hub/update_membership_rbac_role_binding.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_membership_rbac_role_binding", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#update_membership_rbac_role_binding", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeHub::V1::UpdateMembershipRBACRoleBindingRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "GkeHub::Client", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" + }, + "method": { + "short_name": "UpdateMembershipRBACRoleBinding", + "full_name": "google.cloud.gkehub.v1.GkeHub.UpdateMembershipRBACRoleBinding", + "service": { + "short_name": "GkeHub", + "full_name": "google.cloud.gkehub.v1.GkeHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkehub_v1_generated_GkeHub_DeleteMembershipRBACRoleBinding_sync", + "title": "Snippet for the delete_membership_rbac_role_binding call in the GkeHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#delete_membership_rbac_role_binding.", + "file": "gke_hub/delete_membership_rbac_role_binding.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_membership_rbac_role_binding", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#delete_membership_rbac_role_binding", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeHub::V1::DeleteMembershipRBACRoleBindingRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "GkeHub::Client", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" + }, + "method": { + "short_name": "DeleteMembershipRBACRoleBinding", + "full_name": "google.cloud.gkehub.v1.GkeHub.DeleteMembershipRBACRoleBinding", + "service": { + "short_name": "GkeHub", + "full_name": "google.cloud.gkehub.v1.GkeHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkehub_v1_generated_GkeHub_ListMembershipRBACRoleBindings_sync", + "title": "Snippet for the list_membership_rbac_role_bindings call in the GkeHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#list_membership_rbac_role_bindings.", + "file": "gke_hub/list_membership_rbac_role_bindings.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_membership_rbac_role_bindings", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#list_membership_rbac_role_bindings", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeHub::V1::ListMembershipRBACRoleBindingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::GkeHub::V1::ListMembershipRBACRoleBindingsResponse", + "client": { + "short_name": "GkeHub::Client", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" + }, + "method": { + "short_name": "ListMembershipRBACRoleBindings", + "full_name": "google.cloud.gkehub.v1.GkeHub.ListMembershipRBACRoleBindings", + "service": { + "short_name": "GkeHub", + "full_name": "google.cloud.gkehub.v1.GkeHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkehub_v1_generated_GkeHub_GenerateMembershipRBACRoleBindingYAML_sync", + "title": "Snippet for the generate_membership_rbac_role_binding_yaml call in the GkeHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#generate_membership_rbac_role_binding_yaml.", + "file": "gke_hub/generate_membership_rbac_role_binding_yaml.rb", + "language": "RUBY", + "client_method": { + "short_name": "generate_membership_rbac_role_binding_yaml", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#generate_membership_rbac_role_binding_yaml", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeHub::V1::GenerateMembershipRBACRoleBindingYAMLRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::GkeHub::V1::GenerateMembershipRBACRoleBindingYAMLResponse", + "client": { + "short_name": "GkeHub::Client", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" + }, + "method": { + "short_name": "GenerateMembershipRBACRoleBindingYAML", + "full_name": "google.cloud.gkehub.v1.GkeHub.GenerateMembershipRBACRoleBindingYAML", + "service": { + "short_name": "GkeHub", + "full_name": "google.cloud.gkehub.v1.GkeHub" + } + } + }, + "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-gke_hub-v1/test/google/cloud/gke_hub/v1/gke_hub_operations_test.rb b/owl-bot-staging/google-cloud-gke_hub-v1/test/google/cloud/gke_hub/v1/gke_hub_operations_test.rb new file mode 100644 index 000000000000..7d3682da88a8 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/test/google/cloud/gke_hub/v1/gke_hub_operations_test.rb @@ -0,0 +1,400 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/gkehub/v1/service_pb" +require "google/cloud/gkehub/v1/service_services_pb" +require "google/cloud/gke_hub/v1/gke_hub" + +class ::Google::Cloud::GkeHub::V1::GkeHub::OperationsTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_operations + # Create GRPC objects. + grpc_response = ::Google::Longrunning::ListOperationsResponse.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" + filter = "hello world" + page_size = 42 + page_token = "hello world" + return_partial_success = true + + list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_operations, name + assert_kind_of ::Google::Longrunning::ListOperationsRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal true, request["return_partial_success"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_operations_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) 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 + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, 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 + client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), 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_operations_client_stub.call_rpc_count + end + end + + def test_get_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_operation, name + assert_kind_of ::Google::Longrunning::GetOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_operation_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_operation({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_operation name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_operation({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_operation_client_stub.call_rpc_count + end + end + + def test_delete_operation + # 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_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_operation, name + assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_operation_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_operation(::Google::Longrunning::DeleteOperationRequest.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_operation_client_stub.call_rpc_count + end + end + + def test_cancel_operation + # 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" + + cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_operation, name + assert_kind_of ::Google::Longrunning::CancelOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_operation_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.cancel_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.cancel_operation(::Google::Longrunning::CancelOperationRequest.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, cancel_operation_client_stub.call_rpc_count + end + end + + def test_wait_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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" + timeout = {} + + wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :wait_operation, name + assert_kind_of ::Google::Longrunning::WaitOperationRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, wait_operation_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.wait_operation({ name: name, timeout: timeout }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.wait_operation name: name, timeout: timeout do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, wait_operation_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::GkeHub::V1::GkeHub::Operations.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::GkeHub::V1::GkeHub::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/test/google/cloud/gke_hub/v1/gke_hub_paths_test.rb b/owl-bot-staging/google-cloud-gke_hub-v1/test/google/cloud/gke_hub/v1/gke_hub_paths_test.rb new file mode 100644 index 000000000000..282a2b7080cf --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/test/google/cloud/gke_hub/v1/gke_hub_paths_test.rb @@ -0,0 +1,145 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/gke_hub/v1/gke_hub" + +class ::Google::Cloud::GkeHub::V1::GkeHub::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_feature_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.feature_path project: "value0", location: "value1", feature: "value2" + assert_equal "projects/value0/locations/value1/features/value2", path + end + end + + def test_fleet_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.fleet_path project: "value0", location: "value1", fleet: "value2" + assert_equal "projects/value0/locations/value1/fleets/value2", path + + path = client.fleet_path organization: "value0", location: "value1", fleet: "value2" + assert_equal "organizations/value0/locations/value1/fleets/value2", path + end + end + + def test_location_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.location_path project: "value0", location: "value1" + assert_equal "projects/value0/locations/value1", path + end + end + + def test_membership_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.membership_path project: "value0", location: "value1", membership: "value2" + assert_equal "projects/value0/locations/value1/memberships/value2", path + end + end + + def test_membership_binding_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.membership_binding_path project: "value0", location: "value1", membership: "value2", membershipbinding: "value3" + assert_equal "projects/value0/locations/value1/memberships/value2/bindings/value3", path + end + end + + def test_namespace_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.namespace_path project: "value0", location: "value1", scope: "value2", namespace: "value3" + assert_equal "projects/value0/locations/value1/scopes/value2/namespaces/value3", path + end + end + + def test_rbac_role_binding_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.rbac_role_binding_path project: "value0", location: "value1", scope: "value2", rbacrolebinding: "value3" + assert_equal "projects/value0/locations/value1/scopes/value2/rbacrolebindings/value3", path + + path = client.rbac_role_binding_path project: "value0", location: "value1", membership: "value2", rbacrolebinding: "value3" + assert_equal "projects/value0/locations/value1/memberships/value2/rbacrolebindings/value3", path + end + end + + def test_scope_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.scope_path project: "value0", location: "value1", scope: "value2" + assert_equal "projects/value0/locations/value1/scopes/value2", path + end + end +end diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/test/google/cloud/gke_hub/v1/gke_hub_rest_test.rb b/owl-bot-staging/google-cloud-gke_hub-v1/test/google/cloud/gke_hub/v1/gke_hub_rest_test.rb new file mode 100644 index 000000000000..0c529b1fe0bf --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/test/google/cloud/gke_hub/v1/gke_hub_rest_test.rb @@ -0,0 +1,2544 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/gkehub/v1/service_pb" +require "google/cloud/gke_hub/v1/gke_hub/rest" + + +class ::Google::Cloud::GkeHub::V1::GkeHub::Rest::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_count, :requests + + def initialize response, &block + @response = response + @block = block + @call_count = 0 + @requests = [] + end + + def make_get_request uri:, params: {}, options: {}, method_name: nil + make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_delete_request uri:, params: {}, options: {}, method_name: nil + make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name + end + + def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil + make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_put_request uri:, body:, params: {}, options: {}, method_name: nil + make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name + end + + def make_http_request *args, **kwargs + @call_count += 1 + + @requests << @block&.call(*args, **kwargs) + + @response + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_memberships + # Create test objects. + client_result = ::Google::Cloud::GkeHub::V1::ListMembershipsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_memberships_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_list_memberships_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_memberships_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_memberships({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_memberships parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_memberships ::Google::Cloud::GkeHub::V1::ListMembershipsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_memberships({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_memberships(::Google::Cloud::GkeHub::V1::ListMembershipsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_memberships_client_stub.call_count + end + end + end + + def test_list_bound_memberships + # Create test objects. + client_result = ::Google::Cloud::GkeHub::V1::ListBoundMembershipsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + scope_name = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + + list_bound_memberships_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_list_bound_memberships_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_bound_memberships_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_bound_memberships({ scope_name: scope_name, filter: filter, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_bound_memberships scope_name: scope_name, filter: filter, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_bound_memberships ::Google::Cloud::GkeHub::V1::ListBoundMembershipsRequest.new(scope_name: scope_name, filter: filter, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_bound_memberships({ scope_name: scope_name, filter: filter, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_bound_memberships(::Google::Cloud::GkeHub::V1::ListBoundMembershipsRequest.new(scope_name: scope_name, filter: filter, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_bound_memberships_client_stub.call_count + end + end + end + + def test_list_features + # Create test objects. + client_result = ::Google::Cloud::GkeHub::V1::ListFeaturesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + return_partial_success = true + + list_features_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_list_features_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_features_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_features({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, return_partial_success: return_partial_success }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_features parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, return_partial_success: return_partial_success do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_features ::Google::Cloud::GkeHub::V1::ListFeaturesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, return_partial_success: return_partial_success) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_features({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, return_partial_success: return_partial_success }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_features(::Google::Cloud::GkeHub::V1::ListFeaturesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, return_partial_success: return_partial_success), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_features_client_stub.call_count + end + end + end + + def test_get_membership + # Create test objects. + client_result = ::Google::Cloud::GkeHub::V1::Membership.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_membership_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_get_membership_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_membership_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_membership({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_membership name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_membership ::Google::Cloud::GkeHub::V1::GetMembershipRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_membership({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_membership(::Google::Cloud::GkeHub::V1::GetMembershipRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_membership_client_stub.call_count + end + end + end + + def test_get_feature + # Create test objects. + client_result = ::Google::Cloud::GkeHub::V1::Feature.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + return_partial_success = true + + get_feature_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_get_feature_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_feature_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_feature({ name: name, return_partial_success: return_partial_success }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_feature name: name, return_partial_success: return_partial_success do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_feature ::Google::Cloud::GkeHub::V1::GetFeatureRequest.new(name: name, return_partial_success: return_partial_success) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_feature({ name: name, return_partial_success: return_partial_success }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_feature(::Google::Cloud::GkeHub::V1::GetFeatureRequest.new(name: name, return_partial_success: return_partial_success), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_feature_client_stub.call_count + end + end + end + + def test_create_membership + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + membership_id = "hello world" + resource = {} + request_id = "hello world" + + create_membership_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_create_membership_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_membership_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_membership({ parent: parent, membership_id: membership_id, resource: resource, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_membership parent: parent, membership_id: membership_id, resource: resource, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_membership ::Google::Cloud::GkeHub::V1::CreateMembershipRequest.new(parent: parent, membership_id: membership_id, resource: resource, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_membership({ parent: parent, membership_id: membership_id, resource: resource, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_membership(::Google::Cloud::GkeHub::V1::CreateMembershipRequest.new(parent: parent, membership_id: membership_id, resource: resource, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_membership_client_stub.call_count + end + end + end + + def test_create_feature + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + feature_id = "hello world" + resource = {} + request_id = "hello world" + + create_feature_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_create_feature_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_feature_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_feature({ parent: parent, feature_id: feature_id, resource: resource, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_feature parent: parent, feature_id: feature_id, resource: resource, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_feature ::Google::Cloud::GkeHub::V1::CreateFeatureRequest.new(parent: parent, feature_id: feature_id, resource: resource, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_feature({ parent: parent, feature_id: feature_id, resource: resource, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_feature(::Google::Cloud::GkeHub::V1::CreateFeatureRequest.new(parent: parent, feature_id: feature_id, resource: resource, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_feature_client_stub.call_count + end + end + end + + def test_delete_membership + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + force = true + + delete_membership_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_delete_membership_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_membership_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_membership({ name: name, request_id: request_id, force: force }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_membership name: name, request_id: request_id, force: force do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_membership ::Google::Cloud::GkeHub::V1::DeleteMembershipRequest.new(name: name, request_id: request_id, force: force) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_membership({ name: name, request_id: request_id, force: force }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_membership(::Google::Cloud::GkeHub::V1::DeleteMembershipRequest.new(name: name, request_id: request_id, force: force), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_membership_client_stub.call_count + end + end + end + + def test_delete_feature + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + force = true + request_id = "hello world" + + delete_feature_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_delete_feature_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_feature_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_feature({ name: name, force: force, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_feature name: name, force: force, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_feature ::Google::Cloud::GkeHub::V1::DeleteFeatureRequest.new(name: name, force: force, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_feature({ name: name, force: force, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_feature(::Google::Cloud::GkeHub::V1::DeleteFeatureRequest.new(name: name, force: force, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_feature_client_stub.call_count + end + end + end + + def test_update_membership + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + update_mask = {} + resource = {} + request_id = "hello world" + + update_membership_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_update_membership_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_membership_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_membership({ name: name, update_mask: update_mask, resource: resource, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_membership name: name, update_mask: update_mask, resource: resource, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_membership ::Google::Cloud::GkeHub::V1::UpdateMembershipRequest.new(name: name, update_mask: update_mask, resource: resource, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_membership({ name: name, update_mask: update_mask, resource: resource, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_membership(::Google::Cloud::GkeHub::V1::UpdateMembershipRequest.new(name: name, update_mask: update_mask, resource: resource, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_membership_client_stub.call_count + end + end + end + + def test_update_feature + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + update_mask = {} + resource = {} + request_id = "hello world" + + update_feature_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_update_feature_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_feature_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_feature({ name: name, update_mask: update_mask, resource: resource, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_feature name: name, update_mask: update_mask, resource: resource, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_feature ::Google::Cloud::GkeHub::V1::UpdateFeatureRequest.new(name: name, update_mask: update_mask, resource: resource, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_feature({ name: name, update_mask: update_mask, resource: resource, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_feature(::Google::Cloud::GkeHub::V1::UpdateFeatureRequest.new(name: name, update_mask: update_mask, resource: resource, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_feature_client_stub.call_count + end + end + end + + def test_generate_connect_manifest + # Create test objects. + client_result = ::Google::Cloud::GkeHub::V1::GenerateConnectManifestResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + namespace = "hello world" + proxy = "hello world" + version = "hello world" + is_upgrade = true + registry = "hello world" + image_pull_secret_content = "hello world" + + generate_connect_manifest_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_generate_connect_manifest_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, generate_connect_manifest_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.generate_connect_manifest({ name: name, namespace: namespace, proxy: proxy, version: version, is_upgrade: is_upgrade, registry: registry, image_pull_secret_content: image_pull_secret_content }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.generate_connect_manifest name: name, namespace: namespace, proxy: proxy, version: version, is_upgrade: is_upgrade, registry: registry, image_pull_secret_content: image_pull_secret_content do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.generate_connect_manifest ::Google::Cloud::GkeHub::V1::GenerateConnectManifestRequest.new(name: name, namespace: namespace, proxy: proxy, version: version, is_upgrade: is_upgrade, registry: registry, image_pull_secret_content: image_pull_secret_content) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.generate_connect_manifest({ name: name, namespace: namespace, proxy: proxy, version: version, is_upgrade: is_upgrade, registry: registry, image_pull_secret_content: image_pull_secret_content }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.generate_connect_manifest(::Google::Cloud::GkeHub::V1::GenerateConnectManifestRequest.new(name: name, namespace: namespace, proxy: proxy, version: version, is_upgrade: is_upgrade, registry: registry, image_pull_secret_content: image_pull_secret_content), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, generate_connect_manifest_client_stub.call_count + end + end + end + + def test_create_fleet + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + fleet = {} + + create_fleet_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_create_fleet_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_fleet_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_fleet({ parent: parent, fleet: fleet }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_fleet parent: parent, fleet: fleet do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_fleet ::Google::Cloud::GkeHub::V1::CreateFleetRequest.new(parent: parent, fleet: fleet) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_fleet({ parent: parent, fleet: fleet }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_fleet(::Google::Cloud::GkeHub::V1::CreateFleetRequest.new(parent: parent, fleet: fleet), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_fleet_client_stub.call_count + end + end + end + + def test_get_fleet + # Create test objects. + client_result = ::Google::Cloud::GkeHub::V1::Fleet.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_fleet_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_get_fleet_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_fleet_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_fleet({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_fleet name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_fleet ::Google::Cloud::GkeHub::V1::GetFleetRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_fleet({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_fleet(::Google::Cloud::GkeHub::V1::GetFleetRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_fleet_client_stub.call_count + end + end + end + + def test_update_fleet + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + fleet = {} + update_mask = {} + + update_fleet_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_update_fleet_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_fleet_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_fleet({ fleet: fleet, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_fleet fleet: fleet, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_fleet ::Google::Cloud::GkeHub::V1::UpdateFleetRequest.new(fleet: fleet, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_fleet({ fleet: fleet, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_fleet(::Google::Cloud::GkeHub::V1::UpdateFleetRequest.new(fleet: fleet, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_fleet_client_stub.call_count + end + end + end + + def test_delete_fleet + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_fleet_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_delete_fleet_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_fleet_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_fleet({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_fleet name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_fleet ::Google::Cloud::GkeHub::V1::DeleteFleetRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_fleet({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_fleet(::Google::Cloud::GkeHub::V1::DeleteFleetRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_fleet_client_stub.call_count + end + end + end + + def test_list_fleets + # Create test objects. + client_result = ::Google::Cloud::GkeHub::V1::ListFleetsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_token = "hello world" + page_size = 42 + + list_fleets_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_list_fleets_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_fleets_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_fleets({ parent: parent, page_token: page_token, page_size: page_size }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_fleets parent: parent, page_token: page_token, page_size: page_size do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_fleets ::Google::Cloud::GkeHub::V1::ListFleetsRequest.new(parent: parent, page_token: page_token, page_size: page_size) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_fleets({ parent: parent, page_token: page_token, page_size: page_size }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_fleets(::Google::Cloud::GkeHub::V1::ListFleetsRequest.new(parent: parent, page_token: page_token, page_size: page_size), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_fleets_client_stub.call_count + end + end + end + + def test_get_scope_namespace + # Create test objects. + client_result = ::Google::Cloud::GkeHub::V1::Namespace.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_scope_namespace_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_get_scope_namespace_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_scope_namespace_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_scope_namespace({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_scope_namespace name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_scope_namespace ::Google::Cloud::GkeHub::V1::GetScopeNamespaceRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_scope_namespace({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_scope_namespace(::Google::Cloud::GkeHub::V1::GetScopeNamespaceRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_scope_namespace_client_stub.call_count + end + end + end + + def test_create_scope_namespace + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + scope_namespace_id = "hello world" + scope_namespace = {} + + create_scope_namespace_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_create_scope_namespace_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_scope_namespace_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_scope_namespace({ parent: parent, scope_namespace_id: scope_namespace_id, scope_namespace: scope_namespace }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_scope_namespace parent: parent, scope_namespace_id: scope_namespace_id, scope_namespace: scope_namespace do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_scope_namespace ::Google::Cloud::GkeHub::V1::CreateScopeNamespaceRequest.new(parent: parent, scope_namespace_id: scope_namespace_id, scope_namespace: scope_namespace) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_scope_namespace({ parent: parent, scope_namespace_id: scope_namespace_id, scope_namespace: scope_namespace }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_scope_namespace(::Google::Cloud::GkeHub::V1::CreateScopeNamespaceRequest.new(parent: parent, scope_namespace_id: scope_namespace_id, scope_namespace: scope_namespace), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_scope_namespace_client_stub.call_count + end + end + end + + def test_update_scope_namespace + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + scope_namespace = {} + update_mask = {} + + update_scope_namespace_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_update_scope_namespace_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_scope_namespace_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_scope_namespace({ scope_namespace: scope_namespace, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_scope_namespace scope_namespace: scope_namespace, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_scope_namespace ::Google::Cloud::GkeHub::V1::UpdateScopeNamespaceRequest.new(scope_namespace: scope_namespace, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_scope_namespace({ scope_namespace: scope_namespace, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_scope_namespace(::Google::Cloud::GkeHub::V1::UpdateScopeNamespaceRequest.new(scope_namespace: scope_namespace, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_scope_namespace_client_stub.call_count + end + end + end + + def test_delete_scope_namespace + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_scope_namespace_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_delete_scope_namespace_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_scope_namespace_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_scope_namespace({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_scope_namespace name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_scope_namespace ::Google::Cloud::GkeHub::V1::DeleteScopeNamespaceRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_scope_namespace({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_scope_namespace(::Google::Cloud::GkeHub::V1::DeleteScopeNamespaceRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_scope_namespace_client_stub.call_count + end + end + end + + def test_list_scope_namespaces + # Create test objects. + client_result = ::Google::Cloud::GkeHub::V1::ListScopeNamespacesResponse.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_scope_namespaces_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_list_scope_namespaces_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_scope_namespaces_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_scope_namespaces({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_scope_namespaces parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_scope_namespaces ::Google::Cloud::GkeHub::V1::ListScopeNamespacesRequest.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 + client.list_scope_namespaces({ 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 + client.list_scope_namespaces(::Google::Cloud::GkeHub::V1::ListScopeNamespacesRequest.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_scope_namespaces_client_stub.call_count + end + end + end + + def test_get_scope_rbac_role_binding + # Create test objects. + client_result = ::Google::Cloud::GkeHub::V1::RBACRoleBinding.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_scope_rbac_role_binding_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_get_scope_rbac_role_binding_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_scope_rbac_role_binding_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_scope_rbac_role_binding({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_scope_rbac_role_binding name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_scope_rbac_role_binding ::Google::Cloud::GkeHub::V1::GetScopeRBACRoleBindingRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_scope_rbac_role_binding({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_scope_rbac_role_binding(::Google::Cloud::GkeHub::V1::GetScopeRBACRoleBindingRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_scope_rbac_role_binding_client_stub.call_count + end + end + end + + def test_create_scope_rbac_role_binding + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + rbacrolebinding_id = "hello world" + rbacrolebinding = {} + + create_scope_rbac_role_binding_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_create_scope_rbac_role_binding_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_scope_rbac_role_binding_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_scope_rbac_role_binding({ parent: parent, rbacrolebinding_id: rbacrolebinding_id, rbacrolebinding: rbacrolebinding }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_scope_rbac_role_binding parent: parent, rbacrolebinding_id: rbacrolebinding_id, rbacrolebinding: rbacrolebinding do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_scope_rbac_role_binding ::Google::Cloud::GkeHub::V1::CreateScopeRBACRoleBindingRequest.new(parent: parent, rbacrolebinding_id: rbacrolebinding_id, rbacrolebinding: rbacrolebinding) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_scope_rbac_role_binding({ parent: parent, rbacrolebinding_id: rbacrolebinding_id, rbacrolebinding: rbacrolebinding }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_scope_rbac_role_binding(::Google::Cloud::GkeHub::V1::CreateScopeRBACRoleBindingRequest.new(parent: parent, rbacrolebinding_id: rbacrolebinding_id, rbacrolebinding: rbacrolebinding), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_scope_rbac_role_binding_client_stub.call_count + end + end + end + + def test_update_scope_rbac_role_binding + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + rbacrolebinding = {} + update_mask = {} + + update_scope_rbac_role_binding_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_update_scope_rbac_role_binding_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_scope_rbac_role_binding_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_scope_rbac_role_binding({ rbacrolebinding: rbacrolebinding, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_scope_rbac_role_binding rbacrolebinding: rbacrolebinding, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_scope_rbac_role_binding ::Google::Cloud::GkeHub::V1::UpdateScopeRBACRoleBindingRequest.new(rbacrolebinding: rbacrolebinding, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_scope_rbac_role_binding({ rbacrolebinding: rbacrolebinding, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_scope_rbac_role_binding(::Google::Cloud::GkeHub::V1::UpdateScopeRBACRoleBindingRequest.new(rbacrolebinding: rbacrolebinding, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_scope_rbac_role_binding_client_stub.call_count + end + end + end + + def test_delete_scope_rbac_role_binding + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_scope_rbac_role_binding_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_delete_scope_rbac_role_binding_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_scope_rbac_role_binding_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_scope_rbac_role_binding({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_scope_rbac_role_binding name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_scope_rbac_role_binding ::Google::Cloud::GkeHub::V1::DeleteScopeRBACRoleBindingRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_scope_rbac_role_binding({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_scope_rbac_role_binding(::Google::Cloud::GkeHub::V1::DeleteScopeRBACRoleBindingRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_scope_rbac_role_binding_client_stub.call_count + end + end + end + + def test_list_scope_rbac_role_bindings + # Create test objects. + client_result = ::Google::Cloud::GkeHub::V1::ListScopeRBACRoleBindingsResponse.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_scope_rbac_role_bindings_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_list_scope_rbac_role_bindings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_scope_rbac_role_bindings_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_scope_rbac_role_bindings({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_scope_rbac_role_bindings parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_scope_rbac_role_bindings ::Google::Cloud::GkeHub::V1::ListScopeRBACRoleBindingsRequest.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 + client.list_scope_rbac_role_bindings({ 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 + client.list_scope_rbac_role_bindings(::Google::Cloud::GkeHub::V1::ListScopeRBACRoleBindingsRequest.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_scope_rbac_role_bindings_client_stub.call_count + end + end + end + + def test_get_scope + # Create test objects. + client_result = ::Google::Cloud::GkeHub::V1::Scope.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_scope_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_get_scope_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_scope_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_scope({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_scope name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_scope ::Google::Cloud::GkeHub::V1::GetScopeRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_scope({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_scope(::Google::Cloud::GkeHub::V1::GetScopeRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_scope_client_stub.call_count + end + end + end + + def test_create_scope + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + scope_id = "hello world" + scope = {} + + create_scope_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_create_scope_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_scope_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_scope({ parent: parent, scope_id: scope_id, scope: scope }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_scope parent: parent, scope_id: scope_id, scope: scope do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_scope ::Google::Cloud::GkeHub::V1::CreateScopeRequest.new(parent: parent, scope_id: scope_id, scope: scope) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_scope({ parent: parent, scope_id: scope_id, scope: scope }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_scope(::Google::Cloud::GkeHub::V1::CreateScopeRequest.new(parent: parent, scope_id: scope_id, scope: scope), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_scope_client_stub.call_count + end + end + end + + def test_update_scope + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + scope = {} + update_mask = {} + + update_scope_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_update_scope_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_scope_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_scope({ scope: scope, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_scope scope: scope, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_scope ::Google::Cloud::GkeHub::V1::UpdateScopeRequest.new(scope: scope, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_scope({ scope: scope, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_scope(::Google::Cloud::GkeHub::V1::UpdateScopeRequest.new(scope: scope, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_scope_client_stub.call_count + end + end + end + + def test_delete_scope + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_scope_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_delete_scope_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_scope_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_scope({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_scope name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_scope ::Google::Cloud::GkeHub::V1::DeleteScopeRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_scope({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_scope(::Google::Cloud::GkeHub::V1::DeleteScopeRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_scope_client_stub.call_count + end + end + end + + def test_list_scopes + # Create test objects. + client_result = ::Google::Cloud::GkeHub::V1::ListScopesResponse.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_scopes_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_list_scopes_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_scopes_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_scopes({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_scopes parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_scopes ::Google::Cloud::GkeHub::V1::ListScopesRequest.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 + client.list_scopes({ 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 + client.list_scopes(::Google::Cloud::GkeHub::V1::ListScopesRequest.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_scopes_client_stub.call_count + end + end + end + + def test_list_permitted_scopes + # Create test objects. + client_result = ::Google::Cloud::GkeHub::V1::ListPermittedScopesResponse.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_permitted_scopes_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_list_permitted_scopes_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_permitted_scopes_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_permitted_scopes({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_permitted_scopes parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_permitted_scopes ::Google::Cloud::GkeHub::V1::ListPermittedScopesRequest.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 + client.list_permitted_scopes({ 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 + client.list_permitted_scopes(::Google::Cloud::GkeHub::V1::ListPermittedScopesRequest.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_permitted_scopes_client_stub.call_count + end + end + end + + def test_get_membership_binding + # Create test objects. + client_result = ::Google::Cloud::GkeHub::V1::MembershipBinding.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_membership_binding_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_get_membership_binding_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_membership_binding_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_membership_binding({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_membership_binding name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_membership_binding ::Google::Cloud::GkeHub::V1::GetMembershipBindingRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_membership_binding({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_membership_binding(::Google::Cloud::GkeHub::V1::GetMembershipBindingRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_membership_binding_client_stub.call_count + end + end + end + + def test_create_membership_binding + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + membership_binding = {} + membership_binding_id = "hello world" + + create_membership_binding_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_create_membership_binding_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_membership_binding_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_membership_binding({ parent: parent, membership_binding: membership_binding, membership_binding_id: membership_binding_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_membership_binding parent: parent, membership_binding: membership_binding, membership_binding_id: membership_binding_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_membership_binding ::Google::Cloud::GkeHub::V1::CreateMembershipBindingRequest.new(parent: parent, membership_binding: membership_binding, membership_binding_id: membership_binding_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_membership_binding({ parent: parent, membership_binding: membership_binding, membership_binding_id: membership_binding_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_membership_binding(::Google::Cloud::GkeHub::V1::CreateMembershipBindingRequest.new(parent: parent, membership_binding: membership_binding, membership_binding_id: membership_binding_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_membership_binding_client_stub.call_count + end + end + end + + def test_update_membership_binding + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + membership_binding = {} + update_mask = {} + + update_membership_binding_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_update_membership_binding_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_membership_binding_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_membership_binding({ membership_binding: membership_binding, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_membership_binding membership_binding: membership_binding, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_membership_binding ::Google::Cloud::GkeHub::V1::UpdateMembershipBindingRequest.new(membership_binding: membership_binding, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_membership_binding({ membership_binding: membership_binding, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_membership_binding(::Google::Cloud::GkeHub::V1::UpdateMembershipBindingRequest.new(membership_binding: membership_binding, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_membership_binding_client_stub.call_count + end + end + end + + def test_delete_membership_binding + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_membership_binding_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_delete_membership_binding_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_membership_binding_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_membership_binding({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_membership_binding name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_membership_binding ::Google::Cloud::GkeHub::V1::DeleteMembershipBindingRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_membership_binding({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_membership_binding(::Google::Cloud::GkeHub::V1::DeleteMembershipBindingRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_membership_binding_client_stub.call_count + end + end + end + + def test_list_membership_bindings + # Create test objects. + client_result = ::Google::Cloud::GkeHub::V1::ListMembershipBindingsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_membership_bindings_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_list_membership_bindings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_membership_bindings_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_membership_bindings({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_membership_bindings parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_membership_bindings ::Google::Cloud::GkeHub::V1::ListMembershipBindingsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_membership_bindings({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_membership_bindings(::Google::Cloud::GkeHub::V1::ListMembershipBindingsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_membership_bindings_client_stub.call_count + end + end + end + + def test_get_membership_rbac_role_binding + # Create test objects. + client_result = ::Google::Cloud::GkeHub::V1::RBACRoleBinding.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_membership_rbac_role_binding_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_get_membership_rbac_role_binding_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_membership_rbac_role_binding_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_membership_rbac_role_binding({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_membership_rbac_role_binding name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_membership_rbac_role_binding ::Google::Cloud::GkeHub::V1::GetMembershipRBACRoleBindingRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_membership_rbac_role_binding({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_membership_rbac_role_binding(::Google::Cloud::GkeHub::V1::GetMembershipRBACRoleBindingRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_membership_rbac_role_binding_client_stub.call_count + end + end + end + + def test_create_membership_rbac_role_binding + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + rbacrolebinding_id = "hello world" + rbacrolebinding = {} + + create_membership_rbac_role_binding_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_create_membership_rbac_role_binding_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_membership_rbac_role_binding_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_membership_rbac_role_binding({ parent: parent, rbacrolebinding_id: rbacrolebinding_id, rbacrolebinding: rbacrolebinding }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_membership_rbac_role_binding parent: parent, rbacrolebinding_id: rbacrolebinding_id, rbacrolebinding: rbacrolebinding do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_membership_rbac_role_binding ::Google::Cloud::GkeHub::V1::CreateMembershipRBACRoleBindingRequest.new(parent: parent, rbacrolebinding_id: rbacrolebinding_id, rbacrolebinding: rbacrolebinding) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_membership_rbac_role_binding({ parent: parent, rbacrolebinding_id: rbacrolebinding_id, rbacrolebinding: rbacrolebinding }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_membership_rbac_role_binding(::Google::Cloud::GkeHub::V1::CreateMembershipRBACRoleBindingRequest.new(parent: parent, rbacrolebinding_id: rbacrolebinding_id, rbacrolebinding: rbacrolebinding), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_membership_rbac_role_binding_client_stub.call_count + end + end + end + + def test_update_membership_rbac_role_binding + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + rbacrolebinding = {} + update_mask = {} + + update_membership_rbac_role_binding_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_update_membership_rbac_role_binding_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_membership_rbac_role_binding_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_membership_rbac_role_binding({ rbacrolebinding: rbacrolebinding, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_membership_rbac_role_binding rbacrolebinding: rbacrolebinding, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_membership_rbac_role_binding ::Google::Cloud::GkeHub::V1::UpdateMembershipRBACRoleBindingRequest.new(rbacrolebinding: rbacrolebinding, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_membership_rbac_role_binding({ rbacrolebinding: rbacrolebinding, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_membership_rbac_role_binding(::Google::Cloud::GkeHub::V1::UpdateMembershipRBACRoleBindingRequest.new(rbacrolebinding: rbacrolebinding, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_membership_rbac_role_binding_client_stub.call_count + end + end + end + + def test_delete_membership_rbac_role_binding + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_membership_rbac_role_binding_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_delete_membership_rbac_role_binding_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_membership_rbac_role_binding_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_membership_rbac_role_binding({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_membership_rbac_role_binding name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_membership_rbac_role_binding ::Google::Cloud::GkeHub::V1::DeleteMembershipRBACRoleBindingRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_membership_rbac_role_binding({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_membership_rbac_role_binding(::Google::Cloud::GkeHub::V1::DeleteMembershipRBACRoleBindingRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_membership_rbac_role_binding_client_stub.call_count + end + end + end + + def test_list_membership_rbac_role_bindings + # Create test objects. + client_result = ::Google::Cloud::GkeHub::V1::ListMembershipRBACRoleBindingsResponse.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_membership_rbac_role_bindings_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_list_membership_rbac_role_bindings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_membership_rbac_role_bindings_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_membership_rbac_role_bindings({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_membership_rbac_role_bindings parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_membership_rbac_role_bindings ::Google::Cloud::GkeHub::V1::ListMembershipRBACRoleBindingsRequest.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 + client.list_membership_rbac_role_bindings({ 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 + client.list_membership_rbac_role_bindings(::Google::Cloud::GkeHub::V1::ListMembershipRBACRoleBindingsRequest.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_membership_rbac_role_bindings_client_stub.call_count + end + end + end + + def test_generate_membership_rbac_role_binding_yaml + # Create test objects. + client_result = ::Google::Cloud::GkeHub::V1::GenerateMembershipRBACRoleBindingYAMLResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + rbacrolebinding_id = "hello world" + rbacrolebinding = {} + + generate_membership_rbac_role_binding_yaml_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_generate_membership_rbac_role_binding_yaml_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, generate_membership_rbac_role_binding_yaml_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.generate_membership_rbac_role_binding_yaml({ parent: parent, rbacrolebinding_id: rbacrolebinding_id, rbacrolebinding: rbacrolebinding }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.generate_membership_rbac_role_binding_yaml parent: parent, rbacrolebinding_id: rbacrolebinding_id, rbacrolebinding: rbacrolebinding do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.generate_membership_rbac_role_binding_yaml ::Google::Cloud::GkeHub::V1::GenerateMembershipRBACRoleBindingYAMLRequest.new(parent: parent, rbacrolebinding_id: rbacrolebinding_id, rbacrolebinding: rbacrolebinding) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.generate_membership_rbac_role_binding_yaml({ parent: parent, rbacrolebinding_id: rbacrolebinding_id, rbacrolebinding: rbacrolebinding }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.generate_membership_rbac_role_binding_yaml(::Google::Cloud::GkeHub::V1::GenerateMembershipRBACRoleBindingYAMLRequest.new(parent: parent, rbacrolebinding_id: rbacrolebinding_id, rbacrolebinding: rbacrolebinding), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, generate_membership_rbac_role_binding_yaml_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::GkeHub::V1::GkeHub::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::GkeHub::V1::GkeHub::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/test/google/cloud/gke_hub/v1/gke_hub_test.rb b/owl-bot-staging/google-cloud-gke_hub-v1/test/google/cloud/gke_hub/v1/gke_hub_test.rb new file mode 100644 index 000000000000..d30531394ca9 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/test/google/cloud/gke_hub/v1/gke_hub_test.rb @@ -0,0 +1,2978 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/gkehub/v1/service_pb" +require "google/cloud/gke_hub/v1/gke_hub" + +class ::Google::Cloud::GkeHub::V1::GkeHub::ClientTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_memberships + # Create GRPC objects. + grpc_response = ::Google::Cloud::GkeHub::V1::ListMembershipsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + + list_memberships_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_memberships, name + assert_kind_of ::Google::Cloud::GkeHub::V1::ListMembershipsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_memberships_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_memberships({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_memberships parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_memberships ::Google::Cloud::GkeHub::V1::ListMembershipsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_memberships({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_memberships(::Google::Cloud::GkeHub::V1::ListMembershipsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_memberships_client_stub.call_rpc_count + end + end + + def test_list_bound_memberships + # Create GRPC objects. + grpc_response = ::Google::Cloud::GkeHub::V1::ListBoundMembershipsResponse.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. + scope_name = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + + list_bound_memberships_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_bound_memberships, name + assert_kind_of ::Google::Cloud::GkeHub::V1::ListBoundMembershipsRequest, request + assert_equal "hello world", request["scope_name"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_bound_memberships_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_bound_memberships({ scope_name: scope_name, filter: filter, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_bound_memberships scope_name: scope_name, filter: filter, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_bound_memberships ::Google::Cloud::GkeHub::V1::ListBoundMembershipsRequest.new(scope_name: scope_name, filter: filter, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_bound_memberships({ scope_name: scope_name, filter: filter, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_bound_memberships(::Google::Cloud::GkeHub::V1::ListBoundMembershipsRequest.new(scope_name: scope_name, filter: filter, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_bound_memberships_client_stub.call_rpc_count + end + end + + def test_list_features + # Create GRPC objects. + grpc_response = ::Google::Cloud::GkeHub::V1::ListFeaturesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + order_by = "hello world" + return_partial_success = true + + list_features_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_features, name + assert_kind_of ::Google::Cloud::GkeHub::V1::ListFeaturesRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + assert_equal true, request["return_partial_success"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_features_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_features({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, return_partial_success: return_partial_success }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_features parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, return_partial_success: return_partial_success do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_features ::Google::Cloud::GkeHub::V1::ListFeaturesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, return_partial_success: return_partial_success) 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 + client.list_features({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, return_partial_success: return_partial_success }, 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 + client.list_features(::Google::Cloud::GkeHub::V1::ListFeaturesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, return_partial_success: return_partial_success), 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_features_client_stub.call_rpc_count + end + end + + def test_get_membership + # Create GRPC objects. + grpc_response = ::Google::Cloud::GkeHub::V1::Membership.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_membership_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_membership, name + assert_kind_of ::Google::Cloud::GkeHub::V1::GetMembershipRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_membership_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_membership({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_membership name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_membership ::Google::Cloud::GkeHub::V1::GetMembershipRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_membership({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_membership(::Google::Cloud::GkeHub::V1::GetMembershipRequest.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_membership_client_stub.call_rpc_count + end + end + + def test_get_feature + # Create GRPC objects. + grpc_response = ::Google::Cloud::GkeHub::V1::Feature.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" + return_partial_success = true + + get_feature_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_feature, name + assert_kind_of ::Google::Cloud::GkeHub::V1::GetFeatureRequest, request + assert_equal "hello world", request["name"] + assert_equal true, request["return_partial_success"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_feature_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_feature({ name: name, return_partial_success: return_partial_success }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_feature name: name, return_partial_success: return_partial_success do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_feature ::Google::Cloud::GkeHub::V1::GetFeatureRequest.new(name: name, return_partial_success: return_partial_success) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_feature({ name: name, return_partial_success: return_partial_success }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_feature(::Google::Cloud::GkeHub::V1::GetFeatureRequest.new(name: name, return_partial_success: return_partial_success), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_feature_client_stub.call_rpc_count + end + end + + def test_create_membership + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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" + membership_id = "hello world" + resource = {} + request_id = "hello world" + + create_membership_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_membership, name + assert_kind_of ::Google::Cloud::GkeHub::V1::CreateMembershipRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["membership_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GkeHub::V1::Membership), request["resource"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_membership_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_membership({ parent: parent, membership_id: membership_id, resource: resource, request_id: request_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_membership parent: parent, membership_id: membership_id, resource: resource, request_id: request_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_membership ::Google::Cloud::GkeHub::V1::CreateMembershipRequest.new(parent: parent, membership_id: membership_id, resource: resource, request_id: request_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_membership({ parent: parent, membership_id: membership_id, resource: resource, request_id: request_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_membership(::Google::Cloud::GkeHub::V1::CreateMembershipRequest.new(parent: parent, membership_id: membership_id, resource: resource, request_id: request_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_membership_client_stub.call_rpc_count + end + end + + def test_create_feature + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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" + feature_id = "hello world" + resource = {} + request_id = "hello world" + + create_feature_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_feature, name + assert_kind_of ::Google::Cloud::GkeHub::V1::CreateFeatureRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["feature_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GkeHub::V1::Feature), request["resource"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_feature_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_feature({ parent: parent, feature_id: feature_id, resource: resource, request_id: request_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_feature parent: parent, feature_id: feature_id, resource: resource, request_id: request_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_feature ::Google::Cloud::GkeHub::V1::CreateFeatureRequest.new(parent: parent, feature_id: feature_id, resource: resource, request_id: request_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_feature({ parent: parent, feature_id: feature_id, resource: resource, request_id: request_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_feature(::Google::Cloud::GkeHub::V1::CreateFeatureRequest.new(parent: parent, feature_id: feature_id, resource: resource, request_id: request_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_feature_client_stub.call_rpc_count + end + end + + def test_delete_membership + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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" + request_id = "hello world" + force = true + + delete_membership_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_membership, name + assert_kind_of ::Google::Cloud::GkeHub::V1::DeleteMembershipRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + assert_equal true, request["force"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_membership_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_membership({ name: name, request_id: request_id, force: force }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_membership name: name, request_id: request_id, force: force do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_membership ::Google::Cloud::GkeHub::V1::DeleteMembershipRequest.new(name: name, request_id: request_id, force: force) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_membership({ name: name, request_id: request_id, force: force }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_membership(::Google::Cloud::GkeHub::V1::DeleteMembershipRequest.new(name: name, request_id: request_id, force: force), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_membership_client_stub.call_rpc_count + end + end + + def test_delete_feature + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + force = true + request_id = "hello world" + + delete_feature_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_feature, name + assert_kind_of ::Google::Cloud::GkeHub::V1::DeleteFeatureRequest, request + assert_equal "hello world", request["name"] + assert_equal true, request["force"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_feature_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_feature({ name: name, force: force, request_id: request_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_feature name: name, force: force, request_id: request_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_feature ::Google::Cloud::GkeHub::V1::DeleteFeatureRequest.new(name: name, force: force, request_id: request_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_feature({ name: name, force: force, request_id: request_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_feature(::Google::Cloud::GkeHub::V1::DeleteFeatureRequest.new(name: name, force: force, request_id: request_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_feature_client_stub.call_rpc_count + end + end + + def test_update_membership + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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" + update_mask = {} + resource = {} + request_id = "hello world" + + update_membership_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_membership, name + assert_kind_of ::Google::Cloud::GkeHub::V1::UpdateMembershipRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GkeHub::V1::Membership), request["resource"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_membership_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_membership({ name: name, update_mask: update_mask, resource: resource, request_id: request_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_membership name: name, update_mask: update_mask, resource: resource, request_id: request_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_membership ::Google::Cloud::GkeHub::V1::UpdateMembershipRequest.new(name: name, update_mask: update_mask, resource: resource, request_id: request_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_membership({ name: name, update_mask: update_mask, resource: resource, request_id: request_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_membership(::Google::Cloud::GkeHub::V1::UpdateMembershipRequest.new(name: name, update_mask: update_mask, resource: resource, request_id: request_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_membership_client_stub.call_rpc_count + end + end + + def test_update_feature + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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" + update_mask = {} + resource = {} + request_id = "hello world" + + update_feature_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_feature, name + assert_kind_of ::Google::Cloud::GkeHub::V1::UpdateFeatureRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GkeHub::V1::Feature), request["resource"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_feature_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_feature({ name: name, update_mask: update_mask, resource: resource, request_id: request_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_feature name: name, update_mask: update_mask, resource: resource, request_id: request_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_feature ::Google::Cloud::GkeHub::V1::UpdateFeatureRequest.new(name: name, update_mask: update_mask, resource: resource, request_id: request_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_feature({ name: name, update_mask: update_mask, resource: resource, request_id: request_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_feature(::Google::Cloud::GkeHub::V1::UpdateFeatureRequest.new(name: name, update_mask: update_mask, resource: resource, request_id: request_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_feature_client_stub.call_rpc_count + end + end + + def test_generate_connect_manifest + # Create GRPC objects. + grpc_response = ::Google::Cloud::GkeHub::V1::GenerateConnectManifestResponse.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" + namespace = "hello world" + proxy = "hello world" + version = "hello world" + is_upgrade = true + registry = "hello world" + image_pull_secret_content = "hello world" + + generate_connect_manifest_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :generate_connect_manifest, name + assert_kind_of ::Google::Cloud::GkeHub::V1::GenerateConnectManifestRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["namespace"] + assert_equal "hello world", request["proxy"] + assert_equal "hello world", request["version"] + assert_equal true, request["is_upgrade"] + assert_equal "hello world", request["registry"] + assert_equal "hello world", request["image_pull_secret_content"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, generate_connect_manifest_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.generate_connect_manifest({ name: name, namespace: namespace, proxy: proxy, version: version, is_upgrade: is_upgrade, registry: registry, image_pull_secret_content: image_pull_secret_content }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.generate_connect_manifest name: name, namespace: namespace, proxy: proxy, version: version, is_upgrade: is_upgrade, registry: registry, image_pull_secret_content: image_pull_secret_content do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.generate_connect_manifest ::Google::Cloud::GkeHub::V1::GenerateConnectManifestRequest.new(name: name, namespace: namespace, proxy: proxy, version: version, is_upgrade: is_upgrade, registry: registry, image_pull_secret_content: image_pull_secret_content) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.generate_connect_manifest({ name: name, namespace: namespace, proxy: proxy, version: version, is_upgrade: is_upgrade, registry: registry, image_pull_secret_content: image_pull_secret_content }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.generate_connect_manifest(::Google::Cloud::GkeHub::V1::GenerateConnectManifestRequest.new(name: name, namespace: namespace, proxy: proxy, version: version, is_upgrade: is_upgrade, registry: registry, image_pull_secret_content: image_pull_secret_content), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, generate_connect_manifest_client_stub.call_rpc_count + end + end + + def test_create_fleet + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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" + fleet = {} + + create_fleet_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_fleet, name + assert_kind_of ::Google::Cloud::GkeHub::V1::CreateFleetRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GkeHub::V1::Fleet), request["fleet"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_fleet_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_fleet({ parent: parent, fleet: fleet }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_fleet parent: parent, fleet: fleet do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_fleet ::Google::Cloud::GkeHub::V1::CreateFleetRequest.new(parent: parent, fleet: fleet) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_fleet({ parent: parent, fleet: fleet }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_fleet(::Google::Cloud::GkeHub::V1::CreateFleetRequest.new(parent: parent, fleet: fleet), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_fleet_client_stub.call_rpc_count + end + end + + def test_get_fleet + # Create GRPC objects. + grpc_response = ::Google::Cloud::GkeHub::V1::Fleet.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_fleet_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_fleet, name + assert_kind_of ::Google::Cloud::GkeHub::V1::GetFleetRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_fleet_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_fleet({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_fleet name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_fleet ::Google::Cloud::GkeHub::V1::GetFleetRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_fleet({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_fleet(::Google::Cloud::GkeHub::V1::GetFleetRequest.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_fleet_client_stub.call_rpc_count + end + end + + def test_update_fleet + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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. + fleet = {} + update_mask = {} + + update_fleet_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_fleet, name + assert_kind_of ::Google::Cloud::GkeHub::V1::UpdateFleetRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GkeHub::V1::Fleet), request["fleet"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_fleet_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_fleet({ fleet: fleet, update_mask: update_mask }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_fleet fleet: fleet, update_mask: update_mask do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_fleet ::Google::Cloud::GkeHub::V1::UpdateFleetRequest.new(fleet: fleet, update_mask: update_mask) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_fleet({ fleet: fleet, update_mask: update_mask }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_fleet(::Google::Cloud::GkeHub::V1::UpdateFleetRequest.new(fleet: fleet, update_mask: update_mask), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_fleet_client_stub.call_rpc_count + end + end + + def test_delete_fleet + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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_fleet_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_fleet, name + assert_kind_of ::Google::Cloud::GkeHub::V1::DeleteFleetRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_fleet_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_fleet({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_fleet name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_fleet ::Google::Cloud::GkeHub::V1::DeleteFleetRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_fleet({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_fleet(::Google::Cloud::GkeHub::V1::DeleteFleetRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_fleet_client_stub.call_rpc_count + end + end + + def test_list_fleets + # Create GRPC objects. + grpc_response = ::Google::Cloud::GkeHub::V1::ListFleetsResponse.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_token = "hello world" + page_size = 42 + + list_fleets_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_fleets, name + assert_kind_of ::Google::Cloud::GkeHub::V1::ListFleetsRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["page_token"] + assert_equal 42, request["page_size"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_fleets_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_fleets({ parent: parent, page_token: page_token, page_size: page_size }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_fleets parent: parent, page_token: page_token, page_size: page_size do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_fleets ::Google::Cloud::GkeHub::V1::ListFleetsRequest.new(parent: parent, page_token: page_token, page_size: page_size) 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 + client.list_fleets({ parent: parent, page_token: page_token, page_size: page_size }, 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 + client.list_fleets(::Google::Cloud::GkeHub::V1::ListFleetsRequest.new(parent: parent, page_token: page_token, page_size: page_size), 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_fleets_client_stub.call_rpc_count + end + end + + def test_get_scope_namespace + # Create GRPC objects. + grpc_response = ::Google::Cloud::GkeHub::V1::Namespace.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_scope_namespace_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_scope_namespace, name + assert_kind_of ::Google::Cloud::GkeHub::V1::GetScopeNamespaceRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_scope_namespace_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_scope_namespace({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_scope_namespace name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_scope_namespace ::Google::Cloud::GkeHub::V1::GetScopeNamespaceRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_scope_namespace({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_scope_namespace(::Google::Cloud::GkeHub::V1::GetScopeNamespaceRequest.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_scope_namespace_client_stub.call_rpc_count + end + end + + def test_create_scope_namespace + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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" + scope_namespace_id = "hello world" + scope_namespace = {} + + create_scope_namespace_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_scope_namespace, name + assert_kind_of ::Google::Cloud::GkeHub::V1::CreateScopeNamespaceRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["scope_namespace_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GkeHub::V1::Namespace), request["scope_namespace"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_scope_namespace_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_scope_namespace({ parent: parent, scope_namespace_id: scope_namespace_id, scope_namespace: scope_namespace }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_scope_namespace parent: parent, scope_namespace_id: scope_namespace_id, scope_namespace: scope_namespace do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_scope_namespace ::Google::Cloud::GkeHub::V1::CreateScopeNamespaceRequest.new(parent: parent, scope_namespace_id: scope_namespace_id, scope_namespace: scope_namespace) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_scope_namespace({ parent: parent, scope_namespace_id: scope_namespace_id, scope_namespace: scope_namespace }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_scope_namespace(::Google::Cloud::GkeHub::V1::CreateScopeNamespaceRequest.new(parent: parent, scope_namespace_id: scope_namespace_id, scope_namespace: scope_namespace), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_scope_namespace_client_stub.call_rpc_count + end + end + + def test_update_scope_namespace + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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. + scope_namespace = {} + update_mask = {} + + update_scope_namespace_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_scope_namespace, name + assert_kind_of ::Google::Cloud::GkeHub::V1::UpdateScopeNamespaceRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GkeHub::V1::Namespace), request["scope_namespace"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_scope_namespace_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_scope_namespace({ scope_namespace: scope_namespace, update_mask: update_mask }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_scope_namespace scope_namespace: scope_namespace, update_mask: update_mask do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_scope_namespace ::Google::Cloud::GkeHub::V1::UpdateScopeNamespaceRequest.new(scope_namespace: scope_namespace, update_mask: update_mask) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_scope_namespace({ scope_namespace: scope_namespace, update_mask: update_mask }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_scope_namespace(::Google::Cloud::GkeHub::V1::UpdateScopeNamespaceRequest.new(scope_namespace: scope_namespace, update_mask: update_mask), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_scope_namespace_client_stub.call_rpc_count + end + end + + def test_delete_scope_namespace + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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_scope_namespace_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_scope_namespace, name + assert_kind_of ::Google::Cloud::GkeHub::V1::DeleteScopeNamespaceRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_scope_namespace_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_scope_namespace({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_scope_namespace name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_scope_namespace ::Google::Cloud::GkeHub::V1::DeleteScopeNamespaceRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_scope_namespace({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_scope_namespace(::Google::Cloud::GkeHub::V1::DeleteScopeNamespaceRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_scope_namespace_client_stub.call_rpc_count + end + end + + def test_list_scope_namespaces + # Create GRPC objects. + grpc_response = ::Google::Cloud::GkeHub::V1::ListScopeNamespacesResponse.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_scope_namespaces_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_scope_namespaces, name + assert_kind_of ::Google::Cloud::GkeHub::V1::ListScopeNamespacesRequest, 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_scope_namespaces_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_scope_namespaces({ 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 + client.list_scope_namespaces 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 + client.list_scope_namespaces ::Google::Cloud::GkeHub::V1::ListScopeNamespacesRequest.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 + client.list_scope_namespaces({ 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 + client.list_scope_namespaces(::Google::Cloud::GkeHub::V1::ListScopeNamespacesRequest.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_scope_namespaces_client_stub.call_rpc_count + end + end + + def test_get_scope_rbac_role_binding + # Create GRPC objects. + grpc_response = ::Google::Cloud::GkeHub::V1::RBACRoleBinding.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_scope_rbac_role_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_scope_rbac_role_binding, name + assert_kind_of ::Google::Cloud::GkeHub::V1::GetScopeRBACRoleBindingRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_scope_rbac_role_binding_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_scope_rbac_role_binding({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_scope_rbac_role_binding name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_scope_rbac_role_binding ::Google::Cloud::GkeHub::V1::GetScopeRBACRoleBindingRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_scope_rbac_role_binding({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_scope_rbac_role_binding(::Google::Cloud::GkeHub::V1::GetScopeRBACRoleBindingRequest.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_scope_rbac_role_binding_client_stub.call_rpc_count + end + end + + def test_create_scope_rbac_role_binding + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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" + rbacrolebinding_id = "hello world" + rbacrolebinding = {} + + create_scope_rbac_role_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_scope_rbac_role_binding, name + assert_kind_of ::Google::Cloud::GkeHub::V1::CreateScopeRBACRoleBindingRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["rbacrolebinding_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GkeHub::V1::RBACRoleBinding), request["rbacrolebinding"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_scope_rbac_role_binding_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_scope_rbac_role_binding({ parent: parent, rbacrolebinding_id: rbacrolebinding_id, rbacrolebinding: rbacrolebinding }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_scope_rbac_role_binding parent: parent, rbacrolebinding_id: rbacrolebinding_id, rbacrolebinding: rbacrolebinding do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_scope_rbac_role_binding ::Google::Cloud::GkeHub::V1::CreateScopeRBACRoleBindingRequest.new(parent: parent, rbacrolebinding_id: rbacrolebinding_id, rbacrolebinding: rbacrolebinding) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_scope_rbac_role_binding({ parent: parent, rbacrolebinding_id: rbacrolebinding_id, rbacrolebinding: rbacrolebinding }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_scope_rbac_role_binding(::Google::Cloud::GkeHub::V1::CreateScopeRBACRoleBindingRequest.new(parent: parent, rbacrolebinding_id: rbacrolebinding_id, rbacrolebinding: rbacrolebinding), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_scope_rbac_role_binding_client_stub.call_rpc_count + end + end + + def test_update_scope_rbac_role_binding + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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. + rbacrolebinding = {} + update_mask = {} + + update_scope_rbac_role_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_scope_rbac_role_binding, name + assert_kind_of ::Google::Cloud::GkeHub::V1::UpdateScopeRBACRoleBindingRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GkeHub::V1::RBACRoleBinding), request["rbacrolebinding"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_scope_rbac_role_binding_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_scope_rbac_role_binding({ rbacrolebinding: rbacrolebinding, update_mask: update_mask }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_scope_rbac_role_binding rbacrolebinding: rbacrolebinding, update_mask: update_mask do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_scope_rbac_role_binding ::Google::Cloud::GkeHub::V1::UpdateScopeRBACRoleBindingRequest.new(rbacrolebinding: rbacrolebinding, update_mask: update_mask) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_scope_rbac_role_binding({ rbacrolebinding: rbacrolebinding, update_mask: update_mask }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_scope_rbac_role_binding(::Google::Cloud::GkeHub::V1::UpdateScopeRBACRoleBindingRequest.new(rbacrolebinding: rbacrolebinding, update_mask: update_mask), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_scope_rbac_role_binding_client_stub.call_rpc_count + end + end + + def test_delete_scope_rbac_role_binding + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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_scope_rbac_role_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_scope_rbac_role_binding, name + assert_kind_of ::Google::Cloud::GkeHub::V1::DeleteScopeRBACRoleBindingRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_scope_rbac_role_binding_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_scope_rbac_role_binding({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_scope_rbac_role_binding name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_scope_rbac_role_binding ::Google::Cloud::GkeHub::V1::DeleteScopeRBACRoleBindingRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_scope_rbac_role_binding({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_scope_rbac_role_binding(::Google::Cloud::GkeHub::V1::DeleteScopeRBACRoleBindingRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_scope_rbac_role_binding_client_stub.call_rpc_count + end + end + + def test_list_scope_rbac_role_bindings + # Create GRPC objects. + grpc_response = ::Google::Cloud::GkeHub::V1::ListScopeRBACRoleBindingsResponse.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_scope_rbac_role_bindings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_scope_rbac_role_bindings, name + assert_kind_of ::Google::Cloud::GkeHub::V1::ListScopeRBACRoleBindingsRequest, 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_scope_rbac_role_bindings_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_scope_rbac_role_bindings({ 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 + client.list_scope_rbac_role_bindings 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 + client.list_scope_rbac_role_bindings ::Google::Cloud::GkeHub::V1::ListScopeRBACRoleBindingsRequest.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 + client.list_scope_rbac_role_bindings({ 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 + client.list_scope_rbac_role_bindings(::Google::Cloud::GkeHub::V1::ListScopeRBACRoleBindingsRequest.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_scope_rbac_role_bindings_client_stub.call_rpc_count + end + end + + def test_get_scope + # Create GRPC objects. + grpc_response = ::Google::Cloud::GkeHub::V1::Scope.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_scope_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_scope, name + assert_kind_of ::Google::Cloud::GkeHub::V1::GetScopeRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_scope_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_scope({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_scope name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_scope ::Google::Cloud::GkeHub::V1::GetScopeRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_scope({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_scope(::Google::Cloud::GkeHub::V1::GetScopeRequest.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_scope_client_stub.call_rpc_count + end + end + + def test_create_scope + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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" + scope_id = "hello world" + scope = {} + + create_scope_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_scope, name + assert_kind_of ::Google::Cloud::GkeHub::V1::CreateScopeRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["scope_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GkeHub::V1::Scope), request["scope"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_scope_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_scope({ parent: parent, scope_id: scope_id, scope: scope }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_scope parent: parent, scope_id: scope_id, scope: scope do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_scope ::Google::Cloud::GkeHub::V1::CreateScopeRequest.new(parent: parent, scope_id: scope_id, scope: scope) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_scope({ parent: parent, scope_id: scope_id, scope: scope }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_scope(::Google::Cloud::GkeHub::V1::CreateScopeRequest.new(parent: parent, scope_id: scope_id, scope: scope), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_scope_client_stub.call_rpc_count + end + end + + def test_update_scope + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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. + scope = {} + update_mask = {} + + update_scope_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_scope, name + assert_kind_of ::Google::Cloud::GkeHub::V1::UpdateScopeRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GkeHub::V1::Scope), request["scope"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_scope_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_scope({ scope: scope, update_mask: update_mask }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_scope scope: scope, update_mask: update_mask do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_scope ::Google::Cloud::GkeHub::V1::UpdateScopeRequest.new(scope: scope, update_mask: update_mask) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_scope({ scope: scope, update_mask: update_mask }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_scope(::Google::Cloud::GkeHub::V1::UpdateScopeRequest.new(scope: scope, update_mask: update_mask), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_scope_client_stub.call_rpc_count + end + end + + def test_delete_scope + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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_scope_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_scope, name + assert_kind_of ::Google::Cloud::GkeHub::V1::DeleteScopeRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_scope_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_scope({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_scope name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_scope ::Google::Cloud::GkeHub::V1::DeleteScopeRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_scope({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_scope(::Google::Cloud::GkeHub::V1::DeleteScopeRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_scope_client_stub.call_rpc_count + end + end + + def test_list_scopes + # Create GRPC objects. + grpc_response = ::Google::Cloud::GkeHub::V1::ListScopesResponse.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_scopes_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_scopes, name + assert_kind_of ::Google::Cloud::GkeHub::V1::ListScopesRequest, 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_scopes_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_scopes({ 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 + client.list_scopes 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 + client.list_scopes ::Google::Cloud::GkeHub::V1::ListScopesRequest.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 + client.list_scopes({ 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 + client.list_scopes(::Google::Cloud::GkeHub::V1::ListScopesRequest.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_scopes_client_stub.call_rpc_count + end + end + + def test_list_permitted_scopes + # Create GRPC objects. + grpc_response = ::Google::Cloud::GkeHub::V1::ListPermittedScopesResponse.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_permitted_scopes_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_permitted_scopes, name + assert_kind_of ::Google::Cloud::GkeHub::V1::ListPermittedScopesRequest, 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_permitted_scopes_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_permitted_scopes({ 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 + client.list_permitted_scopes 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 + client.list_permitted_scopes ::Google::Cloud::GkeHub::V1::ListPermittedScopesRequest.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 + client.list_permitted_scopes({ 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 + client.list_permitted_scopes(::Google::Cloud::GkeHub::V1::ListPermittedScopesRequest.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_permitted_scopes_client_stub.call_rpc_count + end + end + + def test_get_membership_binding + # Create GRPC objects. + grpc_response = ::Google::Cloud::GkeHub::V1::MembershipBinding.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_membership_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_membership_binding, name + assert_kind_of ::Google::Cloud::GkeHub::V1::GetMembershipBindingRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_membership_binding_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_membership_binding({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_membership_binding name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_membership_binding ::Google::Cloud::GkeHub::V1::GetMembershipBindingRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_membership_binding({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_membership_binding(::Google::Cloud::GkeHub::V1::GetMembershipBindingRequest.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_membership_binding_client_stub.call_rpc_count + end + end + + def test_create_membership_binding + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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" + membership_binding = {} + membership_binding_id = "hello world" + + create_membership_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_membership_binding, name + assert_kind_of ::Google::Cloud::GkeHub::V1::CreateMembershipBindingRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GkeHub::V1::MembershipBinding), request["membership_binding"] + assert_equal "hello world", request["membership_binding_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_membership_binding_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_membership_binding({ parent: parent, membership_binding: membership_binding, membership_binding_id: membership_binding_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_membership_binding parent: parent, membership_binding: membership_binding, membership_binding_id: membership_binding_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_membership_binding ::Google::Cloud::GkeHub::V1::CreateMembershipBindingRequest.new(parent: parent, membership_binding: membership_binding, membership_binding_id: membership_binding_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_membership_binding({ parent: parent, membership_binding: membership_binding, membership_binding_id: membership_binding_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_membership_binding(::Google::Cloud::GkeHub::V1::CreateMembershipBindingRequest.new(parent: parent, membership_binding: membership_binding, membership_binding_id: membership_binding_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_membership_binding_client_stub.call_rpc_count + end + end + + def test_update_membership_binding + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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. + membership_binding = {} + update_mask = {} + + update_membership_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_membership_binding, name + assert_kind_of ::Google::Cloud::GkeHub::V1::UpdateMembershipBindingRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GkeHub::V1::MembershipBinding), request["membership_binding"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_membership_binding_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_membership_binding({ membership_binding: membership_binding, update_mask: update_mask }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_membership_binding membership_binding: membership_binding, update_mask: update_mask do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_membership_binding ::Google::Cloud::GkeHub::V1::UpdateMembershipBindingRequest.new(membership_binding: membership_binding, update_mask: update_mask) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_membership_binding({ membership_binding: membership_binding, update_mask: update_mask }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_membership_binding(::Google::Cloud::GkeHub::V1::UpdateMembershipBindingRequest.new(membership_binding: membership_binding, update_mask: update_mask), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_membership_binding_client_stub.call_rpc_count + end + end + + def test_delete_membership_binding + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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_membership_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_membership_binding, name + assert_kind_of ::Google::Cloud::GkeHub::V1::DeleteMembershipBindingRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_membership_binding_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_membership_binding({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_membership_binding name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_membership_binding ::Google::Cloud::GkeHub::V1::DeleteMembershipBindingRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_membership_binding({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_membership_binding(::Google::Cloud::GkeHub::V1::DeleteMembershipBindingRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_membership_binding_client_stub.call_rpc_count + end + end + + def test_list_membership_bindings + # Create GRPC objects. + grpc_response = ::Google::Cloud::GkeHub::V1::ListMembershipBindingsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_membership_bindings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_membership_bindings, name + assert_kind_of ::Google::Cloud::GkeHub::V1::ListMembershipBindingsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_membership_bindings_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_membership_bindings({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_membership_bindings parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_membership_bindings ::Google::Cloud::GkeHub::V1::ListMembershipBindingsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) 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 + client.list_membership_bindings({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, 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 + client.list_membership_bindings(::Google::Cloud::GkeHub::V1::ListMembershipBindingsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), 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_membership_bindings_client_stub.call_rpc_count + end + end + + def test_get_membership_rbac_role_binding + # Create GRPC objects. + grpc_response = ::Google::Cloud::GkeHub::V1::RBACRoleBinding.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_membership_rbac_role_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_membership_rbac_role_binding, name + assert_kind_of ::Google::Cloud::GkeHub::V1::GetMembershipRBACRoleBindingRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_membership_rbac_role_binding_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_membership_rbac_role_binding({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_membership_rbac_role_binding name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_membership_rbac_role_binding ::Google::Cloud::GkeHub::V1::GetMembershipRBACRoleBindingRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_membership_rbac_role_binding({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_membership_rbac_role_binding(::Google::Cloud::GkeHub::V1::GetMembershipRBACRoleBindingRequest.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_membership_rbac_role_binding_client_stub.call_rpc_count + end + end + + def test_create_membership_rbac_role_binding + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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" + rbacrolebinding_id = "hello world" + rbacrolebinding = {} + + create_membership_rbac_role_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_membership_rbac_role_binding, name + assert_kind_of ::Google::Cloud::GkeHub::V1::CreateMembershipRBACRoleBindingRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["rbacrolebinding_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GkeHub::V1::RBACRoleBinding), request["rbacrolebinding"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_membership_rbac_role_binding_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_membership_rbac_role_binding({ parent: parent, rbacrolebinding_id: rbacrolebinding_id, rbacrolebinding: rbacrolebinding }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_membership_rbac_role_binding parent: parent, rbacrolebinding_id: rbacrolebinding_id, rbacrolebinding: rbacrolebinding do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_membership_rbac_role_binding ::Google::Cloud::GkeHub::V1::CreateMembershipRBACRoleBindingRequest.new(parent: parent, rbacrolebinding_id: rbacrolebinding_id, rbacrolebinding: rbacrolebinding) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_membership_rbac_role_binding({ parent: parent, rbacrolebinding_id: rbacrolebinding_id, rbacrolebinding: rbacrolebinding }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_membership_rbac_role_binding(::Google::Cloud::GkeHub::V1::CreateMembershipRBACRoleBindingRequest.new(parent: parent, rbacrolebinding_id: rbacrolebinding_id, rbacrolebinding: rbacrolebinding), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_membership_rbac_role_binding_client_stub.call_rpc_count + end + end + + def test_update_membership_rbac_role_binding + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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. + rbacrolebinding = {} + update_mask = {} + + update_membership_rbac_role_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_membership_rbac_role_binding, name + assert_kind_of ::Google::Cloud::GkeHub::V1::UpdateMembershipRBACRoleBindingRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GkeHub::V1::RBACRoleBinding), request["rbacrolebinding"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_membership_rbac_role_binding_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_membership_rbac_role_binding({ rbacrolebinding: rbacrolebinding, update_mask: update_mask }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_membership_rbac_role_binding rbacrolebinding: rbacrolebinding, update_mask: update_mask do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_membership_rbac_role_binding ::Google::Cloud::GkeHub::V1::UpdateMembershipRBACRoleBindingRequest.new(rbacrolebinding: rbacrolebinding, update_mask: update_mask) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_membership_rbac_role_binding({ rbacrolebinding: rbacrolebinding, update_mask: update_mask }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_membership_rbac_role_binding(::Google::Cloud::GkeHub::V1::UpdateMembershipRBACRoleBindingRequest.new(rbacrolebinding: rbacrolebinding, update_mask: update_mask), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_membership_rbac_role_binding_client_stub.call_rpc_count + end + end + + def test_delete_membership_rbac_role_binding + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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_membership_rbac_role_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_membership_rbac_role_binding, name + assert_kind_of ::Google::Cloud::GkeHub::V1::DeleteMembershipRBACRoleBindingRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_membership_rbac_role_binding_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_membership_rbac_role_binding({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_membership_rbac_role_binding name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_membership_rbac_role_binding ::Google::Cloud::GkeHub::V1::DeleteMembershipRBACRoleBindingRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_membership_rbac_role_binding({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_membership_rbac_role_binding(::Google::Cloud::GkeHub::V1::DeleteMembershipRBACRoleBindingRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_membership_rbac_role_binding_client_stub.call_rpc_count + end + end + + def test_list_membership_rbac_role_bindings + # Create GRPC objects. + grpc_response = ::Google::Cloud::GkeHub::V1::ListMembershipRBACRoleBindingsResponse.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_membership_rbac_role_bindings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_membership_rbac_role_bindings, name + assert_kind_of ::Google::Cloud::GkeHub::V1::ListMembershipRBACRoleBindingsRequest, 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_membership_rbac_role_bindings_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_membership_rbac_role_bindings({ 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 + client.list_membership_rbac_role_bindings 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 + client.list_membership_rbac_role_bindings ::Google::Cloud::GkeHub::V1::ListMembershipRBACRoleBindingsRequest.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 + client.list_membership_rbac_role_bindings({ 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 + client.list_membership_rbac_role_bindings(::Google::Cloud::GkeHub::V1::ListMembershipRBACRoleBindingsRequest.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_membership_rbac_role_bindings_client_stub.call_rpc_count + end + end + + def test_generate_membership_rbac_role_binding_yaml + # Create GRPC objects. + grpc_response = ::Google::Cloud::GkeHub::V1::GenerateMembershipRBACRoleBindingYAMLResponse.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" + rbacrolebinding_id = "hello world" + rbacrolebinding = {} + + generate_membership_rbac_role_binding_yaml_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :generate_membership_rbac_role_binding_yaml, name + assert_kind_of ::Google::Cloud::GkeHub::V1::GenerateMembershipRBACRoleBindingYAMLRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["rbacrolebinding_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GkeHub::V1::RBACRoleBinding), request["rbacrolebinding"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, generate_membership_rbac_role_binding_yaml_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.generate_membership_rbac_role_binding_yaml({ parent: parent, rbacrolebinding_id: rbacrolebinding_id, rbacrolebinding: rbacrolebinding }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.generate_membership_rbac_role_binding_yaml parent: parent, rbacrolebinding_id: rbacrolebinding_id, rbacrolebinding: rbacrolebinding do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.generate_membership_rbac_role_binding_yaml ::Google::Cloud::GkeHub::V1::GenerateMembershipRBACRoleBindingYAMLRequest.new(parent: parent, rbacrolebinding_id: rbacrolebinding_id, rbacrolebinding: rbacrolebinding) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.generate_membership_rbac_role_binding_yaml({ parent: parent, rbacrolebinding_id: rbacrolebinding_id, rbacrolebinding: rbacrolebinding }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.generate_membership_rbac_role_binding_yaml(::Google::Cloud::GkeHub::V1::GenerateMembershipRBACRoleBindingYAMLRequest.new(parent: parent, rbacrolebinding_id: rbacrolebinding_id, rbacrolebinding: rbacrolebinding), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, generate_membership_rbac_role_binding_yaml_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::GkeHub::V1::GkeHub::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::GkeHub::V1::GkeHub::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::GkeHub::V1::GkeHub::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::GkeHub::V1::GkeHub::Client, client + assert_equal creds, client.configure.credentials + end + end + + def test_operations_client + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::GkeHub::V1::GkeHub::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/test/helper.rb b/owl-bot-staging/google-cloud-gke_hub-v1/test/helper.rb new file mode 100644 index 000000000000..f0e715458fa2 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_hub-v1/test/helper.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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/rg" + +require "grpc" + +require "ostruct" From 9399c76f6f565c7d6d06096d3572f0dcf09a51f8 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Wed, 4 Feb 2026 04:08:43 +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 --- google-cloud-gke_hub-v1/.owlbot-manifest.json | 38 +- google-cloud-gke_hub-v1/gapic_metadata.json | 165 + .../google/cloud/gke_hub/v1/gke_hub/client.rb | 3721 +++++++++++- .../google/cloud/gke_hub/v1/gke_hub/paths.rb | 151 + .../cloud/gke_hub/v1/gke_hub/rest/client.rb | 3470 ++++++++++- .../gke_hub/v1/gke_hub/rest/service_stub.rb | 2295 +++++++- .../configmanagement/configmanagement_pb.rb | 74 - .../lib/google/cloud/gkehub/v1/feature_pb.rb | 6 +- .../lib/google/cloud/gkehub/v1/fleet_pb.rb | 0 .../multiclusteringress_pb.rb | 44 - .../lib/google/cloud/gkehub/v1/service_pb.rb | 48 +- .../cloud/gkehub/v1/service_services_pb.rb | 69 + .../google/cloud/gkehub/v1/feature.rb | 100 +- .../google/cloud/gkehub/v1/fleet.rb | 0 .../rbacrolebindingactuation.rb | 0 .../google/cloud/gkehub/v1/service.rb | 670 ++- .../snippets/gke_hub/create_fleet.rb | 0 .../gke_hub/create_membership_binding.rb | 0 .../create_membership_rbac_role_binding.rb | 0 .../snippets/gke_hub/create_scope.rb | 0 .../gke_hub/create_scope_namespace.rb | 0 .../gke_hub/create_scope_rbac_role_binding.rb | 0 .../snippets/gke_hub/delete_fleet.rb | 0 .../gke_hub/delete_membership_binding.rb | 0 .../delete_membership_rbac_role_binding.rb | 0 .../snippets/gke_hub/delete_scope.rb | 0 .../gke_hub/delete_scope_namespace.rb | 0 .../gke_hub/delete_scope_rbac_role_binding.rb | 0 ...erate_membership_rbac_role_binding_yaml.rb | 0 .../snippets/gke_hub/get_fleet.rb | 0 .../gke_hub/get_membership_binding.rb | 0 .../get_membership_rbac_role_binding.rb | 0 .../snippets/gke_hub/get_scope.rb | 0 .../snippets/gke_hub/get_scope_namespace.rb | 0 .../gke_hub/get_scope_rbac_role_binding.rb | 0 .../gke_hub/list_bound_memberships.rb | 0 .../snippets/gke_hub/list_fleets.rb | 0 .../gke_hub/list_membership_bindings.rb | 0 .../list_membership_rbac_role_bindings.rb | 0 .../snippets/gke_hub/list_permitted_scopes.rb | 0 .../snippets/gke_hub/list_scope_namespaces.rb | 0 .../gke_hub/list_scope_rbac_role_bindings.rb | 0 .../snippets/gke_hub/list_scopes.rb | 0 .../snippets/gke_hub/update_fleet.rb | 0 .../gke_hub/update_membership_binding.rb | 0 .../update_membership_rbac_role_binding.rb | 0 .../snippets/gke_hub/update_scope.rb | 0 .../gke_hub/update_scope_namespace.rb | 0 .../gke_hub/update_scope_rbac_role_binding.rb | 0 ...ippet_metadata_google.cloud.gkehub.v1.json | 1320 +++++ .../cloud/gke_hub/v1/gke_hub_paths_test.rb | 66 + .../cloud/gke_hub/v1/gke_hub_rest_test.rb | 1841 +++++- .../google/cloud/gke_hub/v1/gke_hub_test.rb | 2142 ++++++- .../google-cloud-gke_hub-v1/.gitignore | 22 - .../.repo-metadata.json | 18 - .../google-cloud-gke_hub-v1/.rubocop.yml | 33 - .../google-cloud-gke_hub-v1/.toys.rb | 28 - .../google-cloud-gke_hub-v1/.yardopts | 12 - .../google-cloud-gke_hub-v1/AUTHENTICATION.md | 122 - .../google-cloud-gke_hub-v1/CHANGELOG.md | 2 - .../google-cloud-gke_hub-v1/Gemfile | 11 - .../google-cloud-gke_hub-v1/LICENSE.md | 201 - .../google-cloud-gke_hub-v1/README.md | 154 - .../google-cloud-gke_hub-v1/Rakefile | 169 - .../gapic_metadata.json | 238 - .../google-cloud-gke_hub-v1.gemspec | 28 - .../lib/google-cloud-gke_hub-v1.rb | 21 - .../lib/google/cloud/gke_hub/v1.rb | 45 - .../lib/google/cloud/gke_hub/v1/gke_hub.rb | 72 - .../google/cloud/gke_hub/v1/gke_hub/client.rb | 5173 ----------------- .../cloud/gke_hub/v1/gke_hub/credentials.rb | 51 - .../cloud/gke_hub/v1/gke_hub/operations.rb | 841 --- .../google/cloud/gke_hub/v1/gke_hub/paths.rb | 239 - .../google/cloud/gke_hub/v1/gke_hub/rest.rb | 69 - .../cloud/gke_hub/v1/gke_hub/rest/client.rb | 4822 --------------- .../gke_hub/v1/gke_hub/rest/operations.rb | 925 --- .../gke_hub/v1/gke_hub/rest/service_stub.rb | 2789 --------- .../lib/google/cloud/gke_hub/v1/rest.rb | 37 - .../lib/google/cloud/gke_hub/v1/version.rb | 28 - .../lib/google/cloud/gkehub/v1/feature_pb.rb | 63 - .../google/cloud/gkehub/v1/membership_pb.rb | 57 - .../lib/google/cloud/gkehub/v1/service_pb.rb | 116 - .../cloud/gkehub/v1/service_services_pb.rb | 161 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 473 -- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 - .../v1/configmanagement/configmanagement.rb | 584 -- .../google/cloud/gkehub/v1/feature.rb | 300 - .../google/cloud/gkehub/v1/membership.rb | 370 -- .../multiclusteringress.rb | 39 - .../google/cloud/gkehub/v1/service.rb | 1142 ---- .../google/longrunning/operations.rb | 191 - .../proto_docs/google/protobuf/any.rb | 145 - .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/field_mask.rb | 229 - .../proto_docs/google/protobuf/timestamp.rb | 127 - .../proto_docs/google/rpc/status.rb | 48 - .../google-cloud-gke_hub-v1/snippets/Gemfile | 32 - .../snippets/gke_hub/create_feature.rb | 54 - .../snippets/gke_hub/create_membership.rb | 54 - .../snippets/gke_hub/delete_feature.rb | 54 - .../snippets/gke_hub/delete_membership.rb | 54 - .../gke_hub/generate_connect_manifest.rb | 47 - .../snippets/gke_hub/get_feature.rb | 47 - .../snippets/gke_hub/get_membership.rb | 47 - .../snippets/gke_hub/list_features.rb | 51 - .../snippets/gke_hub/list_memberships.rb | 51 - .../snippets/gke_hub/update_feature.rb | 54 - .../snippets/gke_hub/update_membership.rb | 54 - ...ippet_metadata_google.cloud.gkehub.v1.json | 1775 ------ .../gke_hub/v1/gke_hub_operations_test.rb | 400 -- .../cloud/gke_hub/v1/gke_hub_paths_test.rb | 145 - .../cloud/gke_hub/v1/gke_hub_rest_test.rb | 2544 -------- .../google/cloud/gke_hub/v1/gke_hub_test.rb | 2978 ---------- .../google-cloud-gke_hub-v1/test/helper.rb | 25 - 118 files changed, 15656 insertions(+), 29744 deletions(-) delete mode 100644 google-cloud-gke_hub-v1/lib/google/cloud/gkehub/v1/configmanagement/configmanagement_pb.rb rename {owl-bot-staging/google-cloud-gke_hub-v1 => google-cloud-gke_hub-v1}/lib/google/cloud/gkehub/v1/fleet_pb.rb (100%) delete mode 100644 google-cloud-gke_hub-v1/lib/google/cloud/gkehub/v1/multiclusteringress/multiclusteringress_pb.rb rename {owl-bot-staging/google-cloud-gke_hub-v1 => google-cloud-gke_hub-v1}/proto_docs/google/cloud/gkehub/v1/fleet.rb (100%) rename {owl-bot-staging/google-cloud-gke_hub-v1 => google-cloud-gke_hub-v1}/proto_docs/google/cloud/gkehub/v1/rbacrolebindingactuation/rbacrolebindingactuation.rb (100%) rename {owl-bot-staging/google-cloud-gke_hub-v1 => google-cloud-gke_hub-v1}/snippets/gke_hub/create_fleet.rb (100%) rename {owl-bot-staging/google-cloud-gke_hub-v1 => google-cloud-gke_hub-v1}/snippets/gke_hub/create_membership_binding.rb (100%) rename {owl-bot-staging/google-cloud-gke_hub-v1 => google-cloud-gke_hub-v1}/snippets/gke_hub/create_membership_rbac_role_binding.rb (100%) rename {owl-bot-staging/google-cloud-gke_hub-v1 => google-cloud-gke_hub-v1}/snippets/gke_hub/create_scope.rb (100%) rename {owl-bot-staging/google-cloud-gke_hub-v1 => google-cloud-gke_hub-v1}/snippets/gke_hub/create_scope_namespace.rb (100%) rename {owl-bot-staging/google-cloud-gke_hub-v1 => google-cloud-gke_hub-v1}/snippets/gke_hub/create_scope_rbac_role_binding.rb (100%) rename {owl-bot-staging/google-cloud-gke_hub-v1 => google-cloud-gke_hub-v1}/snippets/gke_hub/delete_fleet.rb (100%) rename {owl-bot-staging/google-cloud-gke_hub-v1 => google-cloud-gke_hub-v1}/snippets/gke_hub/delete_membership_binding.rb (100%) rename {owl-bot-staging/google-cloud-gke_hub-v1 => google-cloud-gke_hub-v1}/snippets/gke_hub/delete_membership_rbac_role_binding.rb (100%) rename {owl-bot-staging/google-cloud-gke_hub-v1 => google-cloud-gke_hub-v1}/snippets/gke_hub/delete_scope.rb (100%) rename {owl-bot-staging/google-cloud-gke_hub-v1 => google-cloud-gke_hub-v1}/snippets/gke_hub/delete_scope_namespace.rb (100%) rename {owl-bot-staging/google-cloud-gke_hub-v1 => google-cloud-gke_hub-v1}/snippets/gke_hub/delete_scope_rbac_role_binding.rb (100%) rename {owl-bot-staging/google-cloud-gke_hub-v1 => google-cloud-gke_hub-v1}/snippets/gke_hub/generate_membership_rbac_role_binding_yaml.rb (100%) rename {owl-bot-staging/google-cloud-gke_hub-v1 => google-cloud-gke_hub-v1}/snippets/gke_hub/get_fleet.rb (100%) rename {owl-bot-staging/google-cloud-gke_hub-v1 => google-cloud-gke_hub-v1}/snippets/gke_hub/get_membership_binding.rb (100%) rename {owl-bot-staging/google-cloud-gke_hub-v1 => google-cloud-gke_hub-v1}/snippets/gke_hub/get_membership_rbac_role_binding.rb (100%) rename {owl-bot-staging/google-cloud-gke_hub-v1 => google-cloud-gke_hub-v1}/snippets/gke_hub/get_scope.rb (100%) rename {owl-bot-staging/google-cloud-gke_hub-v1 => google-cloud-gke_hub-v1}/snippets/gke_hub/get_scope_namespace.rb (100%) rename {owl-bot-staging/google-cloud-gke_hub-v1 => google-cloud-gke_hub-v1}/snippets/gke_hub/get_scope_rbac_role_binding.rb (100%) rename {owl-bot-staging/google-cloud-gke_hub-v1 => google-cloud-gke_hub-v1}/snippets/gke_hub/list_bound_memberships.rb (100%) rename {owl-bot-staging/google-cloud-gke_hub-v1 => google-cloud-gke_hub-v1}/snippets/gke_hub/list_fleets.rb (100%) rename {owl-bot-staging/google-cloud-gke_hub-v1 => google-cloud-gke_hub-v1}/snippets/gke_hub/list_membership_bindings.rb (100%) rename {owl-bot-staging/google-cloud-gke_hub-v1 => google-cloud-gke_hub-v1}/snippets/gke_hub/list_membership_rbac_role_bindings.rb (100%) rename {owl-bot-staging/google-cloud-gke_hub-v1 => google-cloud-gke_hub-v1}/snippets/gke_hub/list_permitted_scopes.rb (100%) rename {owl-bot-staging/google-cloud-gke_hub-v1 => google-cloud-gke_hub-v1}/snippets/gke_hub/list_scope_namespaces.rb (100%) rename {owl-bot-staging/google-cloud-gke_hub-v1 => google-cloud-gke_hub-v1}/snippets/gke_hub/list_scope_rbac_role_bindings.rb (100%) rename {owl-bot-staging/google-cloud-gke_hub-v1 => google-cloud-gke_hub-v1}/snippets/gke_hub/list_scopes.rb (100%) rename {owl-bot-staging/google-cloud-gke_hub-v1 => google-cloud-gke_hub-v1}/snippets/gke_hub/update_fleet.rb (100%) rename {owl-bot-staging/google-cloud-gke_hub-v1 => google-cloud-gke_hub-v1}/snippets/gke_hub/update_membership_binding.rb (100%) rename {owl-bot-staging/google-cloud-gke_hub-v1 => google-cloud-gke_hub-v1}/snippets/gke_hub/update_membership_rbac_role_binding.rb (100%) rename {owl-bot-staging/google-cloud-gke_hub-v1 => google-cloud-gke_hub-v1}/snippets/gke_hub/update_scope.rb (100%) rename {owl-bot-staging/google-cloud-gke_hub-v1 => google-cloud-gke_hub-v1}/snippets/gke_hub/update_scope_namespace.rb (100%) rename {owl-bot-staging/google-cloud-gke_hub-v1 => google-cloud-gke_hub-v1}/snippets/gke_hub/update_scope_rbac_role_binding.rb (100%) delete mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/google-cloud-gke_hub-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/lib/google-cloud-gke_hub-v1.rb delete mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1.rb delete mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub.rb delete mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub/client.rb delete mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub/operations.rb delete mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub/paths.rb delete mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub/rest.rb delete mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gkehub/v1/feature_pb.rb delete mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gkehub/v1/membership_pb.rb delete mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gkehub/v1/service_pb.rb delete mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gkehub/v1/service_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/cloud/gkehub/v1/configmanagement/configmanagement.rb delete mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/cloud/gkehub/v1/feature.rb delete mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/cloud/gkehub/v1/membership.rb delete mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/cloud/gkehub/v1/multiclusteringress/multiclusteringress.rb delete mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/cloud/gkehub/v1/service.rb delete mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/create_feature.rb delete mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/create_membership.rb delete mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/delete_feature.rb delete mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/delete_membership.rb delete mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/generate_connect_manifest.rb delete mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/get_feature.rb delete mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/get_membership.rb delete mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/list_features.rb delete mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/list_memberships.rb delete mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/update_feature.rb delete mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/update_membership.rb delete mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/snippets/snippet_metadata_google.cloud.gkehub.v1.json delete mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/test/google/cloud/gke_hub/v1/gke_hub_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/test/google/cloud/gke_hub/v1/gke_hub_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/test/google/cloud/gke_hub/v1/gke_hub_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/test/google/cloud/gke_hub/v1/gke_hub_test.rb delete mode 100644 owl-bot-staging/google-cloud-gke_hub-v1/test/helper.rb diff --git a/google-cloud-gke_hub-v1/.owlbot-manifest.json b/google-cloud-gke_hub-v1/.owlbot-manifest.json index 37612b16179f..c108dedb77e6 100644 --- a/google-cloud-gke_hub-v1/.owlbot-manifest.json +++ b/google-cloud-gke_hub-v1/.owlbot-manifest.json @@ -26,10 +26,9 @@ "lib/google/cloud/gke_hub/v1/gke_hub/rest/service_stub.rb", "lib/google/cloud/gke_hub/v1/rest.rb", "lib/google/cloud/gke_hub/v1/version.rb", - "lib/google/cloud/gkehub/v1/configmanagement/configmanagement_pb.rb", "lib/google/cloud/gkehub/v1/feature_pb.rb", + "lib/google/cloud/gkehub/v1/fleet_pb.rb", "lib/google/cloud/gkehub/v1/membership_pb.rb", - "lib/google/cloud/gkehub/v1/multiclusteringress/multiclusteringress_pb.rb", "lib/google/cloud/gkehub/v1/service_pb.rb", "lib/google/cloud/gkehub/v1/service_services_pb.rb", "proto_docs/README.md", @@ -39,8 +38,10 @@ "proto_docs/google/api/resource.rb", "proto_docs/google/cloud/gkehub/v1/configmanagement/configmanagement.rb", "proto_docs/google/cloud/gkehub/v1/feature.rb", + "proto_docs/google/cloud/gkehub/v1/fleet.rb", "proto_docs/google/cloud/gkehub/v1/membership.rb", "proto_docs/google/cloud/gkehub/v1/multiclusteringress/multiclusteringress.rb", + "proto_docs/google/cloud/gkehub/v1/rbacrolebindingactuation/rbacrolebindingactuation.rb", "proto_docs/google/cloud/gkehub/v1/service.rb", "proto_docs/google/longrunning/operations.rb", "proto_docs/google/protobuf/any.rb", @@ -51,16 +52,49 @@ "proto_docs/google/rpc/status.rb", "snippets/Gemfile", "snippets/gke_hub/create_feature.rb", + "snippets/gke_hub/create_fleet.rb", "snippets/gke_hub/create_membership.rb", + "snippets/gke_hub/create_membership_binding.rb", + "snippets/gke_hub/create_membership_rbac_role_binding.rb", + "snippets/gke_hub/create_scope.rb", + "snippets/gke_hub/create_scope_namespace.rb", + "snippets/gke_hub/create_scope_rbac_role_binding.rb", "snippets/gke_hub/delete_feature.rb", + "snippets/gke_hub/delete_fleet.rb", "snippets/gke_hub/delete_membership.rb", + "snippets/gke_hub/delete_membership_binding.rb", + "snippets/gke_hub/delete_membership_rbac_role_binding.rb", + "snippets/gke_hub/delete_scope.rb", + "snippets/gke_hub/delete_scope_namespace.rb", + "snippets/gke_hub/delete_scope_rbac_role_binding.rb", "snippets/gke_hub/generate_connect_manifest.rb", + "snippets/gke_hub/generate_membership_rbac_role_binding_yaml.rb", "snippets/gke_hub/get_feature.rb", + "snippets/gke_hub/get_fleet.rb", "snippets/gke_hub/get_membership.rb", + "snippets/gke_hub/get_membership_binding.rb", + "snippets/gke_hub/get_membership_rbac_role_binding.rb", + "snippets/gke_hub/get_scope.rb", + "snippets/gke_hub/get_scope_namespace.rb", + "snippets/gke_hub/get_scope_rbac_role_binding.rb", + "snippets/gke_hub/list_bound_memberships.rb", "snippets/gke_hub/list_features.rb", + "snippets/gke_hub/list_fleets.rb", + "snippets/gke_hub/list_membership_bindings.rb", + "snippets/gke_hub/list_membership_rbac_role_bindings.rb", "snippets/gke_hub/list_memberships.rb", + "snippets/gke_hub/list_permitted_scopes.rb", + "snippets/gke_hub/list_scope_namespaces.rb", + "snippets/gke_hub/list_scope_rbac_role_bindings.rb", + "snippets/gke_hub/list_scopes.rb", "snippets/gke_hub/update_feature.rb", + "snippets/gke_hub/update_fleet.rb", "snippets/gke_hub/update_membership.rb", + "snippets/gke_hub/update_membership_binding.rb", + "snippets/gke_hub/update_membership_rbac_role_binding.rb", + "snippets/gke_hub/update_scope.rb", + "snippets/gke_hub/update_scope_namespace.rb", + "snippets/gke_hub/update_scope_rbac_role_binding.rb", "snippets/snippet_metadata_google.cloud.gkehub.v1.json", "test/google/cloud/gke_hub/v1/gke_hub_operations_test.rb", "test/google/cloud/gke_hub/v1/gke_hub_paths_test.rb", diff --git a/google-cloud-gke_hub-v1/gapic_metadata.json b/google-cloud-gke_hub-v1/gapic_metadata.json index a08fd656a3eb..60141aebea27 100644 --- a/google-cloud-gke_hub-v1/gapic_metadata.json +++ b/google-cloud-gke_hub-v1/gapic_metadata.json @@ -15,6 +15,11 @@ "list_memberships" ] }, + "ListBoundMemberships": { + "methods": [ + "list_bound_memberships" + ] + }, "ListFeatures": { "methods": [ "list_features" @@ -64,6 +69,166 @@ "methods": [ "generate_connect_manifest" ] + }, + "CreateFleet": { + "methods": [ + "create_fleet" + ] + }, + "GetFleet": { + "methods": [ + "get_fleet" + ] + }, + "UpdateFleet": { + "methods": [ + "update_fleet" + ] + }, + "DeleteFleet": { + "methods": [ + "delete_fleet" + ] + }, + "ListFleets": { + "methods": [ + "list_fleets" + ] + }, + "GetScopeNamespace": { + "methods": [ + "get_scope_namespace" + ] + }, + "CreateScopeNamespace": { + "methods": [ + "create_scope_namespace" + ] + }, + "UpdateScopeNamespace": { + "methods": [ + "update_scope_namespace" + ] + }, + "DeleteScopeNamespace": { + "methods": [ + "delete_scope_namespace" + ] + }, + "ListScopeNamespaces": { + "methods": [ + "list_scope_namespaces" + ] + }, + "GetScopeRBACRoleBinding": { + "methods": [ + "get_scope_rbac_role_binding" + ] + }, + "CreateScopeRBACRoleBinding": { + "methods": [ + "create_scope_rbac_role_binding" + ] + }, + "UpdateScopeRBACRoleBinding": { + "methods": [ + "update_scope_rbac_role_binding" + ] + }, + "DeleteScopeRBACRoleBinding": { + "methods": [ + "delete_scope_rbac_role_binding" + ] + }, + "ListScopeRBACRoleBindings": { + "methods": [ + "list_scope_rbac_role_bindings" + ] + }, + "GetScope": { + "methods": [ + "get_scope" + ] + }, + "CreateScope": { + "methods": [ + "create_scope" + ] + }, + "UpdateScope": { + "methods": [ + "update_scope" + ] + }, + "DeleteScope": { + "methods": [ + "delete_scope" + ] + }, + "ListScopes": { + "methods": [ + "list_scopes" + ] + }, + "ListPermittedScopes": { + "methods": [ + "list_permitted_scopes" + ] + }, + "GetMembershipBinding": { + "methods": [ + "get_membership_binding" + ] + }, + "CreateMembershipBinding": { + "methods": [ + "create_membership_binding" + ] + }, + "UpdateMembershipBinding": { + "methods": [ + "update_membership_binding" + ] + }, + "DeleteMembershipBinding": { + "methods": [ + "delete_membership_binding" + ] + }, + "ListMembershipBindings": { + "methods": [ + "list_membership_bindings" + ] + }, + "GetMembershipRBACRoleBinding": { + "methods": [ + "get_membership_rbac_role_binding" + ] + }, + "CreateMembershipRBACRoleBinding": { + "methods": [ + "create_membership_rbac_role_binding" + ] + }, + "UpdateMembershipRBACRoleBinding": { + "methods": [ + "update_membership_rbac_role_binding" + ] + }, + "DeleteMembershipRBACRoleBinding": { + "methods": [ + "delete_membership_rbac_role_binding" + ] + }, + "ListMembershipRBACRoleBindings": { + "methods": [ + "list_membership_rbac_role_bindings" + ] + }, + "GenerateMembershipRBACRoleBindingYAML": { + "methods": [ + "generate_membership_rbac_role_binding_yaml" + ] } } } diff --git a/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub/client.rb b/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub/client.rb index 00a5af98d9e8..182580814413 100644 --- a/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub/client.rb +++ b/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub/client.rb @@ -343,6 +343,113 @@ def list_memberships request, options = nil raise ::Google::Cloud::Error.from_error(e) end + ## + # Lists Memberships bound to a Scope. The response includes relevant + # Memberships from all regions. + # + # @overload list_bound_memberships(request, options = nil) + # Pass arguments to `list_bound_memberships` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::ListBoundMembershipsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::ListBoundMembershipsRequest, ::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_bound_memberships(scope_name: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_bound_memberships` 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 scope_name [::String] + # Required. Name of the Scope, in the format + # `projects/*/locations/global/scopes/*`, to which the Memberships are bound. + # @param filter [::String] + # Optional. Lists Memberships that match the filter expression, following the + # syntax outlined in https://google.aip.dev/160. Currently, filtering + # can be done only based on Memberships's `name`, `labels`, `create_time`, + # `update_time`, and `unique_id`. + # @param page_size [::Integer] + # Optional. When requesting a 'page' of resources, `page_size` specifies + # number of resources to return. If unspecified or set to 0, all resources + # will be returned. Pagination is currently not supported; therefore, setting + # this field does not have any impact for now. + # @param page_token [::String] + # Optional. Token returned by previous call to `ListBoundMemberships` which + # specifies the position in the list from where to continue listing the + # resources. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GkeHub::V1::Membership>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::GkeHub::V1::Membership>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::ListBoundMembershipsRequest.new + # + # # Call the list_bound_memberships method. + # result = client.list_bound_memberships 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::GkeHub::V1::Membership. + # p item + # end + # + def list_bound_memberships request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::ListBoundMembershipsRequest + + # 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_bound_memberships.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::GkeHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.scope_name + header_params["scope_name"] = request.scope_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.list_bound_memberships.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_bound_memberships.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.call_rpc :list_bound_memberships, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @gke_hub_stub, :list_bound_memberships, 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 + ## # Lists Features in a given project and location. # @@ -356,7 +463,7 @@ def list_memberships request, options = nil # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # - # @overload list_features(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # @overload list_features(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, return_partial_success: nil) # Pass arguments to `list_features` 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). @@ -392,6 +499,11 @@ def list_memberships request, options = nil # @param order_by [::String] # One or more fields to compare and use to sort the output. # See https://google.aip.dev/132#ordering. + # @param return_partial_success [::Boolean] + # Optional. If set to true, the response will return partial results when + # some regions are unreachable and the unreachable field in Feature proto + # will be populated. If set to false, the request will fail when some regions + # are unreachable. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GkeHub::V1::Feature>] @@ -562,7 +674,7 @@ def get_membership request, options = nil # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # - # @overload get_feature(name: nil) + # @overload get_feature(name: nil, return_partial_success: nil) # Pass arguments to `get_feature` 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). @@ -570,6 +682,11 @@ def get_membership request, options = nil # @param name [::String] # Required. The Feature resource name in the format # `projects/*/locations/*/features/*` + # @param return_partial_success [::Boolean] + # Optional. If set to true, the response will return partial results when + # some regions are unreachable and the unreachable field in Feature proto + # will be populated. If set to false, the request will fail when some regions + # are unreachable. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Google::Cloud::GkeHub::V1::Feature] @@ -786,7 +903,7 @@ def create_membership request, options = nil # @param resource [::Google::Cloud::GkeHub::V1::Feature, ::Hash] # The Feature resource to create. # @param request_id [::String] - # Optional. A request ID to identify requests. Specify a unique request ID + # A request ID to identify requests. Specify a unique request ID # so that if you must retry your request, the server will know to ignore # the request if it has already been completed. The server will guarantee # that for at least 60 minutes after the first request. @@ -1256,7 +1373,7 @@ def update_membership request, options = nil # If you specify the update_mask to be a special path "*", fully replaces all # user-modifiable fields to match `resource`. # @param request_id [::String] - # Optional. A request ID to identify requests. Specify a unique request ID + # A request ID to identify requests. Specify a unique request ID # so that if you must retry your request, the server will know to ignore # the request if it has already been completed. The server will guarantee # that for at least 60 minutes after the first request. @@ -1457,160 +1574,3253 @@ def generate_connect_manifest request, options = nil end ## - # Configuration class for the GkeHub API. - # - # This class represents the configuration for GkeHub, - # 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::GkeHub::V1::GkeHub::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. + # Creates a fleet. # - # Configuration can be applied globally to all clients, or to a single client - # on construction. + # @overload create_fleet(request, options = nil) + # Pass arguments to `create_fleet` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::CreateFleetRequest} or an equivalent Hash. # - # @example + # @param request [::Google::Cloud::GkeHub::V1::CreateFleetRequest, ::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. # - # # Modify the global config, setting the timeout for - # # list_memberships to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::GkeHub::V1::GkeHub::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_memberships.timeout = 20.0 - # end + # @overload create_fleet(parent: nil, fleet: nil) + # Pass arguments to `create_fleet` 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). # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_memberships.timeout = 20.0 - # end + # @param parent [::String] + # Required. The parent (project and location) where the Fleet will be + # created. Specified in the format `projects/*/locations/*`. + # @param fleet [::Google::Cloud::GkeHub::V1::Fleet, ::Hash] + # Required. The fleet to create. # - # @!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 + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] # - # @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. + # @return [::Gapic::Operation] # - # @example + # @raise [::Google::Cloud::Error] if the RPC is aborted. # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. + # @example Basic example + # require "google/cloud/gke_hub/v1" # - # require "googleauth" + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::CreateFleetRequest.new # - # client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| - # config.credentials = credentials - # end + # # Call the create_fleet method. + # result = client.create_fleet request # - # @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. - # * `: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] + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end # - class Configuration - extend ::Gapic::Config + def create_fleet request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "gkehub.googleapis.com" + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::CreateFleetRequest - 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 + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? + # Customize the options with defaults + metadata = @config.rpcs.create_fleet.metadata.to_h - yield self if block_given? - end + # 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::GkeHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - ## - # 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 + 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_fleet.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_fleet.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.call_rpc :create_fleet, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns the details of a fleet. + # + # @overload get_fleet(request, options = nil) + # Pass arguments to `get_fleet` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::GetFleetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::GetFleetRequest, ::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_fleet(name: nil) + # Pass arguments to `get_fleet` 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 Fleet resource name in the format + # `projects/*/locations/*/fleets/*`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::GkeHub::V1::Fleet] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::GkeHub::V1::Fleet] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::GetFleetRequest.new + # + # # Call the get_fleet method. + # result = client.get_fleet request + # + # # The returned object is of type Google::Cloud::GkeHub::V1::Fleet. + # p result + # + def get_fleet request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::GetFleetRequest + + # 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_fleet.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::GkeHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_fleet.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_fleet.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.call_rpc :get_fleet, 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 a fleet. + # + # @overload update_fleet(request, options = nil) + # Pass arguments to `update_fleet` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::UpdateFleetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::UpdateFleetRequest, ::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_fleet(fleet: nil, update_mask: nil) + # Pass arguments to `update_fleet` 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 fleet [::Google::Cloud::GkeHub::V1::Fleet, ::Hash] + # Required. The Fleet to update. + # + # The `name` field of the Fleet object identifies which fleet will be + # updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The fields to be updated; + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::UpdateFleetRequest.new + # + # # Call the update_fleet method. + # result = client.update_fleet request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_fleet request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::UpdateFleetRequest + + # 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_fleet.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::GkeHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.fleet&.name + header_params["fleet.name"] = request.fleet.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_fleet.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_fleet.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.call_rpc :update_fleet, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Removes a Fleet. There must be no memberships remaining in the Fleet. + # + # @overload delete_fleet(request, options = nil) + # Pass arguments to `delete_fleet` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::DeleteFleetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::DeleteFleetRequest, ::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_fleet(name: nil) + # Pass arguments to `delete_fleet` 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 Fleet resource name in the format + # `projects/*/locations/*/fleets/*`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::DeleteFleetRequest.new + # + # # Call the delete_fleet method. + # result = client.delete_fleet request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_fleet request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::DeleteFleetRequest + + # 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_fleet.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::GkeHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_fleet.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_fleet.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.call_rpc :delete_fleet, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns all fleets within an organization or a project that the caller has + # access to. + # + # @overload list_fleets(request, options = nil) + # Pass arguments to `list_fleets` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::ListFleetsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::ListFleetsRequest, ::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_fleets(parent: nil, page_token: nil, page_size: nil) + # Pass arguments to `list_fleets` 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 organization or project to list for Fleets under, in the + # format `organizations/*/locations/*` or `projects/*/locations/*`. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListFleets` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListFleets` must match + # the call that provided the page token. + # @param page_size [::Integer] + # Optional. The maximum number of fleets to return. The service may return + # fewer than this value. If unspecified, at most 200 fleets will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GkeHub::V1::Fleet>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::GkeHub::V1::Fleet>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::ListFleetsRequest.new + # + # # Call the list_fleets method. + # result = client.list_fleets 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::GkeHub::V1::Fleet. + # p item + # end + # + def list_fleets request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::ListFleetsRequest + + # 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_fleets.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::GkeHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_fleets.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_fleets.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.call_rpc :list_fleets, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @gke_hub_stub, :list_fleets, 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 + + ## + # Returns the details of a fleet namespace. + # + # @overload get_scope_namespace(request, options = nil) + # Pass arguments to `get_scope_namespace` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::GetScopeNamespaceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::GetScopeNamespaceRequest, ::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_scope_namespace(name: nil) + # Pass arguments to `get_scope_namespace` 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 Namespace resource name in the format + # `projects/*/locations/*/scopes/*/namespaces/*`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::GkeHub::V1::Namespace] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::GkeHub::V1::Namespace] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::GetScopeNamespaceRequest.new + # + # # Call the get_scope_namespace method. + # result = client.get_scope_namespace request + # + # # The returned object is of type Google::Cloud::GkeHub::V1::Namespace. + # p result + # + def get_scope_namespace request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::GetScopeNamespaceRequest + + # 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_scope_namespace.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::GkeHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_scope_namespace.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_scope_namespace.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.call_rpc :get_scope_namespace, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a fleet namespace. + # + # @overload create_scope_namespace(request, options = nil) + # Pass arguments to `create_scope_namespace` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::CreateScopeNamespaceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::CreateScopeNamespaceRequest, ::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_scope_namespace(parent: nil, scope_namespace_id: nil, scope_namespace: nil) + # Pass arguments to `create_scope_namespace` 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 (project and location) where the Namespace will be + # created. Specified in the format `projects/*/locations/*/scopes/*`. + # @param scope_namespace_id [::String] + # Required. Client chosen ID for the Namespace. `namespace_id` must be a + # valid RFC 1123 compliant DNS label: + # + # 1. At most 63 characters in length + # 2. It must consist of lower case alphanumeric characters or `-` + # 3. It must start and end with an alphanumeric character + # + # Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, + # with a maximum length of 63 characters. + # @param scope_namespace [::Google::Cloud::GkeHub::V1::Namespace, ::Hash] + # Required. The fleet namespace to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::CreateScopeNamespaceRequest.new + # + # # Call the create_scope_namespace method. + # result = client.create_scope_namespace request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_scope_namespace request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::CreateScopeNamespaceRequest + + # 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_scope_namespace.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::GkeHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_scope_namespace.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_scope_namespace.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.call_rpc :create_scope_namespace, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a fleet namespace. + # + # @overload update_scope_namespace(request, options = nil) + # Pass arguments to `update_scope_namespace` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::UpdateScopeNamespaceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::UpdateScopeNamespaceRequest, ::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_scope_namespace(scope_namespace: nil, update_mask: nil) + # Pass arguments to `update_scope_namespace` 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 scope_namespace [::Google::Cloud::GkeHub::V1::Namespace, ::Hash] + # Required. A namespace with fields updated. The 'name' field in this + # namespace is used to identify the resource to update. Given 'updated' + # prefix to follow go/proto-best-practices-checkers#keyword_conflict + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The fields to be updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::UpdateScopeNamespaceRequest.new + # + # # Call the update_scope_namespace method. + # result = client.update_scope_namespace request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_scope_namespace request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::UpdateScopeNamespaceRequest + + # 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_scope_namespace.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::GkeHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.scope_namespace&.name + header_params["scope_namespace.name"] = request.scope_namespace.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_scope_namespace.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_scope_namespace.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.call_rpc :update_scope_namespace, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a fleet namespace. + # + # @overload delete_scope_namespace(request, options = nil) + # Pass arguments to `delete_scope_namespace` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::DeleteScopeNamespaceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::DeleteScopeNamespaceRequest, ::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_scope_namespace(name: nil) + # Pass arguments to `delete_scope_namespace` 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 Namespace resource name in the format + # `projects/*/locations/*/scopes/*/namespaces/*`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::DeleteScopeNamespaceRequest.new + # + # # Call the delete_scope_namespace method. + # result = client.delete_scope_namespace request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_scope_namespace request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::DeleteScopeNamespaceRequest + + # 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_scope_namespace.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::GkeHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_scope_namespace.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_scope_namespace.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.call_rpc :delete_scope_namespace, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists fleet namespaces. + # + # @overload list_scope_namespaces(request, options = nil) + # Pass arguments to `list_scope_namespaces` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::ListScopeNamespacesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::ListScopeNamespacesRequest, ::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_scope_namespaces(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_scope_namespaces` 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 (project and location) where the Features will be + # listed. Specified in the format `projects/*/locations/*/scopes/*`. + # @param page_size [::Integer] + # Optional. When requesting a 'page' of resources, `page_size` specifies + # number of resources to return. If unspecified or set to 0, all resources + # will be returned. + # @param page_token [::String] + # Optional. Token returned by previous call to `ListFeatures` which + # specifies the position in the list from where to continue listing the + # resources. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GkeHub::V1::Namespace>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::GkeHub::V1::Namespace>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::ListScopeNamespacesRequest.new + # + # # Call the list_scope_namespaces method. + # result = client.list_scope_namespaces 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::GkeHub::V1::Namespace. + # p item + # end + # + def list_scope_namespaces request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::ListScopeNamespacesRequest + + # 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_scope_namespaces.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::GkeHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_scope_namespaces.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_scope_namespaces.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.call_rpc :list_scope_namespaces, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @gke_hub_stub, :list_scope_namespaces, 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 + + ## + # Returns the details of a Scope RBACRoleBinding. + # + # @overload get_scope_rbac_role_binding(request, options = nil) + # Pass arguments to `get_scope_rbac_role_binding` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::GetScopeRBACRoleBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::GetScopeRBACRoleBindingRequest, ::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_scope_rbac_role_binding(name: nil) + # Pass arguments to `get_scope_rbac_role_binding` 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 RBACRoleBinding resource name in the format + # `projects/*/locations/*/scopes/*/rbacrolebindings/*`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::GkeHub::V1::RBACRoleBinding] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::GkeHub::V1::RBACRoleBinding] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::GetScopeRBACRoleBindingRequest.new + # + # # Call the get_scope_rbac_role_binding method. + # result = client.get_scope_rbac_role_binding request + # + # # The returned object is of type Google::Cloud::GkeHub::V1::RBACRoleBinding. + # p result + # + def get_scope_rbac_role_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::GetScopeRBACRoleBindingRequest + + # 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_scope_rbac_role_binding.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::GkeHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_scope_rbac_role_binding.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_scope_rbac_role_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.call_rpc :get_scope_rbac_role_binding, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a Scope RBACRoleBinding. + # + # @overload create_scope_rbac_role_binding(request, options = nil) + # Pass arguments to `create_scope_rbac_role_binding` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::CreateScopeRBACRoleBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::CreateScopeRBACRoleBindingRequest, ::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_scope_rbac_role_binding(parent: nil, rbacrolebinding_id: nil, rbacrolebinding: nil) + # Pass arguments to `create_scope_rbac_role_binding` 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 (project and location) where the RBACRoleBinding will + # be created. Specified in the format `projects/*/locations/*/scopes/*`. + # @param rbacrolebinding_id [::String] + # Required. Client chosen ID for the RBACRoleBinding. `rbacrolebinding_id` + # must be a valid RFC 1123 compliant DNS label: + # + # 1. At most 63 characters in length + # 2. It must consist of lower case alphanumeric characters or `-` + # 3. It must start and end with an alphanumeric character + # + # Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, + # with a maximum length of 63 characters. + # @param rbacrolebinding [::Google::Cloud::GkeHub::V1::RBACRoleBinding, ::Hash] + # Required. The rbacrolebindings to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::CreateScopeRBACRoleBindingRequest.new + # + # # Call the create_scope_rbac_role_binding method. + # result = client.create_scope_rbac_role_binding request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_scope_rbac_role_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::CreateScopeRBACRoleBindingRequest + + # 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_scope_rbac_role_binding.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::GkeHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_scope_rbac_role_binding.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_scope_rbac_role_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.call_rpc :create_scope_rbac_role_binding, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a Scope RBACRoleBinding. + # + # @overload update_scope_rbac_role_binding(request, options = nil) + # Pass arguments to `update_scope_rbac_role_binding` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::UpdateScopeRBACRoleBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::UpdateScopeRBACRoleBindingRequest, ::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_scope_rbac_role_binding(rbacrolebinding: nil, update_mask: nil) + # Pass arguments to `update_scope_rbac_role_binding` 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 rbacrolebinding [::Google::Cloud::GkeHub::V1::RBACRoleBinding, ::Hash] + # Required. A rbacrolebinding with fields updated. The 'name' field in this + # rbacrolebinding is used to identify the resource to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The fields to be updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::UpdateScopeRBACRoleBindingRequest.new + # + # # Call the update_scope_rbac_role_binding method. + # result = client.update_scope_rbac_role_binding request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_scope_rbac_role_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::UpdateScopeRBACRoleBindingRequest + + # 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_scope_rbac_role_binding.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::GkeHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.rbacrolebinding&.name + header_params["rbacrolebinding.name"] = request.rbacrolebinding.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_scope_rbac_role_binding.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_scope_rbac_role_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.call_rpc :update_scope_rbac_role_binding, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a Scope RBACRoleBinding. + # + # @overload delete_scope_rbac_role_binding(request, options = nil) + # Pass arguments to `delete_scope_rbac_role_binding` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::DeleteScopeRBACRoleBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::DeleteScopeRBACRoleBindingRequest, ::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_scope_rbac_role_binding(name: nil) + # Pass arguments to `delete_scope_rbac_role_binding` 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 RBACRoleBinding resource name in the format + # `projects/*/locations/*/scopes/*/rbacrolebindings/*`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::DeleteScopeRBACRoleBindingRequest.new + # + # # Call the delete_scope_rbac_role_binding method. + # result = client.delete_scope_rbac_role_binding request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_scope_rbac_role_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::DeleteScopeRBACRoleBindingRequest + + # 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_scope_rbac_role_binding.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::GkeHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_scope_rbac_role_binding.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_scope_rbac_role_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.call_rpc :delete_scope_rbac_role_binding, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all Scope RBACRoleBindings. + # + # @overload list_scope_rbac_role_bindings(request, options = nil) + # Pass arguments to `list_scope_rbac_role_bindings` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::ListScopeRBACRoleBindingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::ListScopeRBACRoleBindingsRequest, ::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_scope_rbac_role_bindings(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_scope_rbac_role_bindings` 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 (project and location) where the Features will be + # listed. Specified in the format `projects/*/locations/*/scopes/*`. + # @param page_size [::Integer] + # Optional. When requesting a 'page' of resources, `page_size` specifies + # number of resources to return. If unspecified or set to 0, all resources + # will be returned. + # @param page_token [::String] + # Optional. Token returned by previous call to `ListScopeRBACRoleBindings` + # which specifies the position in the list from where to continue listing the + # resources. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GkeHub::V1::RBACRoleBinding>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::GkeHub::V1::RBACRoleBinding>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::ListScopeRBACRoleBindingsRequest.new + # + # # Call the list_scope_rbac_role_bindings method. + # result = client.list_scope_rbac_role_bindings 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::GkeHub::V1::RBACRoleBinding. + # p item + # end + # + def list_scope_rbac_role_bindings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::ListScopeRBACRoleBindingsRequest + + # 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_scope_rbac_role_bindings.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::GkeHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_scope_rbac_role_bindings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_scope_rbac_role_bindings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.call_rpc :list_scope_rbac_role_bindings, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @gke_hub_stub, :list_scope_rbac_role_bindings, 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 + + ## + # Returns the details of a Scope. + # + # @overload get_scope(request, options = nil) + # Pass arguments to `get_scope` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::GetScopeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::GetScopeRequest, ::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_scope(name: nil) + # Pass arguments to `get_scope` 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 Scope resource name in the format + # `projects/*/locations/*/scopes/*`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::GkeHub::V1::Scope] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::GkeHub::V1::Scope] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::GetScopeRequest.new + # + # # Call the get_scope method. + # result = client.get_scope request + # + # # The returned object is of type Google::Cloud::GkeHub::V1::Scope. + # p result + # + def get_scope request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::GetScopeRequest + + # 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_scope.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::GkeHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_scope.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_scope.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.call_rpc :get_scope, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a Scope. + # + # @overload create_scope(request, options = nil) + # Pass arguments to `create_scope` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::CreateScopeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::CreateScopeRequest, ::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_scope(parent: nil, scope_id: nil, scope: nil) + # Pass arguments to `create_scope` 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 (project and location) where the Scope will be + # created. Specified in the format `projects/*/locations/*`. + # @param scope_id [::String] + # Required. Client chosen ID for the Scope. `scope_id` must be a + # ???? + # @param scope [::Google::Cloud::GkeHub::V1::Scope, ::Hash] + # Required. The Scope to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::CreateScopeRequest.new + # + # # Call the create_scope method. + # result = client.create_scope request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_scope request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::CreateScopeRequest + + # 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_scope.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::GkeHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_scope.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_scope.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.call_rpc :create_scope, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a scopes. + # + # @overload update_scope(request, options = nil) + # Pass arguments to `update_scope` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::UpdateScopeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::UpdateScopeRequest, ::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_scope(scope: nil, update_mask: nil) + # Pass arguments to `update_scope` 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 scope [::Google::Cloud::GkeHub::V1::Scope, ::Hash] + # Required. A Scope with fields updated. The 'name' field in this + # namespace is used to identify the resource to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The fields to be updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::UpdateScopeRequest.new + # + # # Call the update_scope method. + # result = client.update_scope request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_scope request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::UpdateScopeRequest + + # 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_scope.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::GkeHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.scope&.name + header_params["scope.name"] = request.scope.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_scope.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_scope.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.call_rpc :update_scope, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a Scope. + # + # @overload delete_scope(request, options = nil) + # Pass arguments to `delete_scope` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::DeleteScopeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::DeleteScopeRequest, ::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_scope(name: nil) + # Pass arguments to `delete_scope` 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 Scope resource name in the format + # `projects/*/locations/*/scopes/*`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::DeleteScopeRequest.new + # + # # Call the delete_scope method. + # result = client.delete_scope request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_scope request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::DeleteScopeRequest + + # 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_scope.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::GkeHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_scope.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_scope.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.call_rpc :delete_scope, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists Scopes. + # + # @overload list_scopes(request, options = nil) + # Pass arguments to `list_scopes` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::ListScopesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::ListScopesRequest, ::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_scopes(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_scopes` 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 (project and location) where the Scope will be listed. + # Specified in the format `projects/*/locations/*`. + # @param page_size [::Integer] + # Optional. When requesting a 'page' of resources, `page_size` specifies + # number of resources to return. If unspecified or set to 0, all resources + # will be returned. + # @param page_token [::String] + # Optional. Token returned by previous call to `ListScopes` which + # specifies the position in the list from where to continue listing the + # resources. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GkeHub::V1::Scope>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::GkeHub::V1::Scope>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::ListScopesRequest.new + # + # # Call the list_scopes method. + # result = client.list_scopes 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::GkeHub::V1::Scope. + # p item + # end + # + def list_scopes request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::ListScopesRequest + + # 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_scopes.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::GkeHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_scopes.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_scopes.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.call_rpc :list_scopes, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @gke_hub_stub, :list_scopes, 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 + + ## + # Lists permitted Scopes. + # + # @overload list_permitted_scopes(request, options = nil) + # Pass arguments to `list_permitted_scopes` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::ListPermittedScopesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::ListPermittedScopesRequest, ::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_permitted_scopes(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_permitted_scopes` 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 (project and location) where the Scope will be listed. + # Specified in the format `projects/*/locations/*`. + # @param page_size [::Integer] + # Optional. When requesting a 'page' of resources, `page_size` specifies + # number of resources to return. If unspecified or set to 0, all resources + # will be returned. + # @param page_token [::String] + # Optional. Token returned by previous call to `ListPermittedScopes` which + # specifies the position in the list from where to continue listing the + # resources. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GkeHub::V1::Scope>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::GkeHub::V1::Scope>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::ListPermittedScopesRequest.new + # + # # Call the list_permitted_scopes method. + # result = client.list_permitted_scopes 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::GkeHub::V1::Scope. + # p item + # end + # + def list_permitted_scopes request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::ListPermittedScopesRequest + + # 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_permitted_scopes.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::GkeHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_permitted_scopes.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_permitted_scopes.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.call_rpc :list_permitted_scopes, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @gke_hub_stub, :list_permitted_scopes, 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 + + ## + # Returns the details of a MembershipBinding. + # + # @overload get_membership_binding(request, options = nil) + # Pass arguments to `get_membership_binding` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::GetMembershipBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::GetMembershipBindingRequest, ::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_membership_binding(name: nil) + # Pass arguments to `get_membership_binding` 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 MembershipBinding resource name in the format + # `projects/*/locations/*/memberships/*/bindings/*`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::GkeHub::V1::MembershipBinding] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::GkeHub::V1::MembershipBinding] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::GetMembershipBindingRequest.new + # + # # Call the get_membership_binding method. + # result = client.get_membership_binding request + # + # # The returned object is of type Google::Cloud::GkeHub::V1::MembershipBinding. + # p result + # + def get_membership_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::GetMembershipBindingRequest + + # 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_membership_binding.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::GkeHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_membership_binding.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_membership_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.call_rpc :get_membership_binding, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a MembershipBinding. + # + # @overload create_membership_binding(request, options = nil) + # Pass arguments to `create_membership_binding` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::CreateMembershipBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::CreateMembershipBindingRequest, ::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_membership_binding(parent: nil, membership_binding: nil, membership_binding_id: nil) + # Pass arguments to `create_membership_binding` 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 (project and location) where the MembershipBinding + # will be created. Specified in the format + # `projects/*/locations/*/memberships/*`. + # @param membership_binding [::Google::Cloud::GkeHub::V1::MembershipBinding, ::Hash] + # Required. The MembershipBinding to create. + # @param membership_binding_id [::String] + # Required. The ID to use for the MembershipBinding. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::CreateMembershipBindingRequest.new + # + # # Call the create_membership_binding method. + # result = client.create_membership_binding request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_membership_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::CreateMembershipBindingRequest + + # 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_membership_binding.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::GkeHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_membership_binding.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_membership_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.call_rpc :create_membership_binding, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a MembershipBinding. + # + # @overload update_membership_binding(request, options = nil) + # Pass arguments to `update_membership_binding` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::UpdateMembershipBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::UpdateMembershipBindingRequest, ::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_membership_binding(membership_binding: nil, update_mask: nil) + # Pass arguments to `update_membership_binding` 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 membership_binding [::Google::Cloud::GkeHub::V1::MembershipBinding, ::Hash] + # Required. The MembershipBinding object with fields updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The fields to be updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::UpdateMembershipBindingRequest.new + # + # # Call the update_membership_binding method. + # result = client.update_membership_binding request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_membership_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::UpdateMembershipBindingRequest + + # 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_membership_binding.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::GkeHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.membership_binding&.name + header_params["membership_binding.name"] = request.membership_binding.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_membership_binding.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_membership_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.call_rpc :update_membership_binding, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a MembershipBinding. + # + # @overload delete_membership_binding(request, options = nil) + # Pass arguments to `delete_membership_binding` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::DeleteMembershipBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::DeleteMembershipBindingRequest, ::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_membership_binding(name: nil) + # Pass arguments to `delete_membership_binding` 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 MembershipBinding resource name in the format + # `projects/*/locations/*/memberships/*/bindings/*`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::DeleteMembershipBindingRequest.new + # + # # Call the delete_membership_binding method. + # result = client.delete_membership_binding request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_membership_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::DeleteMembershipBindingRequest + + # 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_membership_binding.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::GkeHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_membership_binding.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_membership_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.call_rpc :delete_membership_binding, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists MembershipBindings. + # + # @overload list_membership_bindings(request, options = nil) + # Pass arguments to `list_membership_bindings` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::ListMembershipBindingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::ListMembershipBindingsRequest, ::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_membership_bindings(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_membership_bindings` 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 Membership for which the MembershipBindings will be + # listed. Specified in the format `projects/*/locations/*/memberships/*`. + # @param page_size [::Integer] + # Optional. When requesting a 'page' of resources, `page_size` specifies + # number of resources to return. If unspecified or set to 0, all resources + # will be returned. + # @param page_token [::String] + # Optional. Token returned by previous call to `ListMembershipBindings` which + # specifies the position in the list from where to continue listing the + # resources. + # @param filter [::String] + # Optional. Lists MembershipBindings that match the filter expression, + # following the syntax outlined in https://google.aip.dev/160. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GkeHub::V1::MembershipBinding>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::GkeHub::V1::MembershipBinding>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::ListMembershipBindingsRequest.new + # + # # Call the list_membership_bindings method. + # result = client.list_membership_bindings 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::GkeHub::V1::MembershipBinding. + # p item + # end + # + def list_membership_bindings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::ListMembershipBindingsRequest + + # 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_membership_bindings.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::GkeHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_membership_bindings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_membership_bindings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.call_rpc :list_membership_bindings, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @gke_hub_stub, :list_membership_bindings, 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 + + ## + # Returns the details of a Membership RBACRoleBinding. + # + # @overload get_membership_rbac_role_binding(request, options = nil) + # Pass arguments to `get_membership_rbac_role_binding` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::GetMembershipRBACRoleBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::GetMembershipRBACRoleBindingRequest, ::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_membership_rbac_role_binding(name: nil) + # Pass arguments to `get_membership_rbac_role_binding` 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 RBACRoleBinding resource name in the format + # `projects/*/locations/*/memberships/*/rbacrolebindings/*`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::GkeHub::V1::RBACRoleBinding] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::GkeHub::V1::RBACRoleBinding] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::GetMembershipRBACRoleBindingRequest.new + # + # # Call the get_membership_rbac_role_binding method. + # result = client.get_membership_rbac_role_binding request + # + # # The returned object is of type Google::Cloud::GkeHub::V1::RBACRoleBinding. + # p result + # + def get_membership_rbac_role_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::GetMembershipRBACRoleBindingRequest + + # 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_membership_rbac_role_binding.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::GkeHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_membership_rbac_role_binding.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_membership_rbac_role_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.call_rpc :get_membership_rbac_role_binding, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a Membership RBACRoleBinding. + # + # @overload create_membership_rbac_role_binding(request, options = nil) + # Pass arguments to `create_membership_rbac_role_binding` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::CreateMembershipRBACRoleBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::CreateMembershipRBACRoleBindingRequest, ::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_membership_rbac_role_binding(parent: nil, rbacrolebinding_id: nil, rbacrolebinding: nil) + # Pass arguments to `create_membership_rbac_role_binding` 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 (project and location) where the RBACRoleBinding will + # be created. Specified in the format `projects/*/locations/*/memberships/*`. + # @param rbacrolebinding_id [::String] + # Required. Client chosen ID for the RBACRoleBinding. `rbacrolebinding_id` + # must be a valid RFC 1123 compliant DNS label: + # + # 1. At most 63 characters in length + # 2. It must consist of lower case alphanumeric characters or `-` + # 3. It must start and end with an alphanumeric character + # + # Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, + # with a maximum length of 63 characters. + # @param rbacrolebinding [::Google::Cloud::GkeHub::V1::RBACRoleBinding, ::Hash] + # Required. The rbacrolebindings to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::CreateMembershipRBACRoleBindingRequest.new + # + # # Call the create_membership_rbac_role_binding method. + # result = client.create_membership_rbac_role_binding request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_membership_rbac_role_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::CreateMembershipRBACRoleBindingRequest + + # 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_membership_rbac_role_binding.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::GkeHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_membership_rbac_role_binding.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_membership_rbac_role_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.call_rpc :create_membership_rbac_role_binding, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a Membership RBACRoleBinding. + # + # @overload update_membership_rbac_role_binding(request, options = nil) + # Pass arguments to `update_membership_rbac_role_binding` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::UpdateMembershipRBACRoleBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::UpdateMembershipRBACRoleBindingRequest, ::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_membership_rbac_role_binding(rbacrolebinding: nil, update_mask: nil) + # Pass arguments to `update_membership_rbac_role_binding` 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 rbacrolebinding [::Google::Cloud::GkeHub::V1::RBACRoleBinding, ::Hash] + # Required. A rbacrolebinding with fields updated. The 'name' field in this + # rbacrolebinding is used to identify the resource to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The fields to be updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::UpdateMembershipRBACRoleBindingRequest.new + # + # # Call the update_membership_rbac_role_binding method. + # result = client.update_membership_rbac_role_binding request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_membership_rbac_role_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::UpdateMembershipRBACRoleBindingRequest + + # 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_membership_rbac_role_binding.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::GkeHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.rbacrolebinding&.name + header_params["rbacrolebinding.name"] = request.rbacrolebinding.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_membership_rbac_role_binding.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_membership_rbac_role_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.call_rpc :update_membership_rbac_role_binding, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes a Membership RBACRoleBinding. + # + # @overload delete_membership_rbac_role_binding(request, options = nil) + # Pass arguments to `delete_membership_rbac_role_binding` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::DeleteMembershipRBACRoleBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::DeleteMembershipRBACRoleBindingRequest, ::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_membership_rbac_role_binding(name: nil) + # Pass arguments to `delete_membership_rbac_role_binding` 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 RBACRoleBinding resource name in the format + # `projects/*/locations/*/memberships/*/rbacrolebindings/*`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::DeleteMembershipRBACRoleBindingRequest.new + # + # # Call the delete_membership_rbac_role_binding method. + # result = client.delete_membership_rbac_role_binding request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_membership_rbac_role_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::DeleteMembershipRBACRoleBindingRequest + + # 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_membership_rbac_role_binding.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::GkeHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_membership_rbac_role_binding.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_membership_rbac_role_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.call_rpc :delete_membership_rbac_role_binding, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all Membership RBACRoleBindings. + # + # @overload list_membership_rbac_role_bindings(request, options = nil) + # Pass arguments to `list_membership_rbac_role_bindings` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::ListMembershipRBACRoleBindingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::ListMembershipRBACRoleBindingsRequest, ::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_membership_rbac_role_bindings(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_membership_rbac_role_bindings` 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 (project and location) where the Features will be + # listed. Specified in the format `projects/*/locations/*/memberships/*`. + # @param page_size [::Integer] + # Optional. When requesting a 'page' of resources, `page_size` specifies + # number of resources to return. If unspecified or set to 0, all resources + # will be returned. + # @param page_token [::String] + # Optional. Token returned by previous call to + # `ListMembershipRBACRoleBindings` which specifies the position in the list + # from where to continue listing the resources. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GkeHub::V1::RBACRoleBinding>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::GkeHub::V1::RBACRoleBinding>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::ListMembershipRBACRoleBindingsRequest.new + # + # # Call the list_membership_rbac_role_bindings method. + # result = client.list_membership_rbac_role_bindings 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::GkeHub::V1::RBACRoleBinding. + # p item + # end + # + def list_membership_rbac_role_bindings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::ListMembershipRBACRoleBindingsRequest + + # 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_membership_rbac_role_bindings.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::GkeHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_membership_rbac_role_bindings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_membership_rbac_role_bindings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.call_rpc :list_membership_rbac_role_bindings, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @gke_hub_stub, :list_membership_rbac_role_bindings, 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 + + ## + # Generates a YAML of the RBAC policies for the specified + # RoleBinding and its associated impersonation resources. + # + # @overload generate_membership_rbac_role_binding_yaml(request, options = nil) + # Pass arguments to `generate_membership_rbac_role_binding_yaml` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::GenerateMembershipRBACRoleBindingYAMLRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::GenerateMembershipRBACRoleBindingYAMLRequest, ::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 generate_membership_rbac_role_binding_yaml(parent: nil, rbacrolebinding_id: nil, rbacrolebinding: nil) + # Pass arguments to `generate_membership_rbac_role_binding_yaml` 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 (project and location) where the RBACRoleBinding will + # be created. Specified in the format `projects/*/locations/*/memberships/*`. + # @param rbacrolebinding_id [::String] + # Required. Client chosen ID for the RBACRoleBinding. `rbacrolebinding_id` + # must be a valid RFC 1123 compliant DNS label: + # + # 1. At most 63 characters in length + # 2. It must consist of lower case alphanumeric characters or `-` + # 3. It must start and end with an alphanumeric character + # + # Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, + # with a maximum length of 63 characters. + # @param rbacrolebinding [::Google::Cloud::GkeHub::V1::RBACRoleBinding, ::Hash] + # Required. The rbacrolebindings to generate the YAML for. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::GkeHub::V1::GenerateMembershipRBACRoleBindingYAMLResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::GkeHub::V1::GenerateMembershipRBACRoleBindingYAMLResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::GenerateMembershipRBACRoleBindingYAMLRequest.new + # + # # Call the generate_membership_rbac_role_binding_yaml method. + # result = client.generate_membership_rbac_role_binding_yaml request + # + # # The returned object is of type Google::Cloud::GkeHub::V1::GenerateMembershipRBACRoleBindingYAMLResponse. + # p result + # + def generate_membership_rbac_role_binding_yaml request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::GenerateMembershipRBACRoleBindingYAMLRequest + + # 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.generate_membership_rbac_role_binding_yaml.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::GkeHub::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.generate_membership_rbac_role_binding_yaml.timeout, + metadata: metadata, + retry_policy: @config.rpcs.generate_membership_rbac_role_binding_yaml.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.call_rpc :generate_membership_rbac_role_binding_yaml, 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 GkeHub API. + # + # This class represents the configuration for GkeHub, + # 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::GkeHub::V1::GkeHub::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_memberships to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::GkeHub::V1::GkeHub::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_memberships.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_memberships.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::GkeHub::V1::GkeHub::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. + # * `: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 = "gkehub.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 ## @@ -1645,6 +4855,11 @@ class Rpcs # attr_reader :list_memberships ## + # RPC-specific configuration for `list_bound_memberships` + # @return [::Gapic::Config::Method] + # + attr_reader :list_bound_memberships + ## # RPC-specific configuration for `list_features` # @return [::Gapic::Config::Method] # @@ -1694,11 +4909,173 @@ class Rpcs # @return [::Gapic::Config::Method] # attr_reader :generate_connect_manifest + ## + # RPC-specific configuration for `create_fleet` + # @return [::Gapic::Config::Method] + # + attr_reader :create_fleet + ## + # RPC-specific configuration for `get_fleet` + # @return [::Gapic::Config::Method] + # + attr_reader :get_fleet + ## + # RPC-specific configuration for `update_fleet` + # @return [::Gapic::Config::Method] + # + attr_reader :update_fleet + ## + # RPC-specific configuration for `delete_fleet` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_fleet + ## + # RPC-specific configuration for `list_fleets` + # @return [::Gapic::Config::Method] + # + attr_reader :list_fleets + ## + # RPC-specific configuration for `get_scope_namespace` + # @return [::Gapic::Config::Method] + # + attr_reader :get_scope_namespace + ## + # RPC-specific configuration for `create_scope_namespace` + # @return [::Gapic::Config::Method] + # + attr_reader :create_scope_namespace + ## + # RPC-specific configuration for `update_scope_namespace` + # @return [::Gapic::Config::Method] + # + attr_reader :update_scope_namespace + ## + # RPC-specific configuration for `delete_scope_namespace` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_scope_namespace + ## + # RPC-specific configuration for `list_scope_namespaces` + # @return [::Gapic::Config::Method] + # + attr_reader :list_scope_namespaces + ## + # RPC-specific configuration for `get_scope_rbac_role_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :get_scope_rbac_role_binding + ## + # RPC-specific configuration for `create_scope_rbac_role_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :create_scope_rbac_role_binding + ## + # RPC-specific configuration for `update_scope_rbac_role_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :update_scope_rbac_role_binding + ## + # RPC-specific configuration for `delete_scope_rbac_role_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_scope_rbac_role_binding + ## + # RPC-specific configuration for `list_scope_rbac_role_bindings` + # @return [::Gapic::Config::Method] + # + attr_reader :list_scope_rbac_role_bindings + ## + # RPC-specific configuration for `get_scope` + # @return [::Gapic::Config::Method] + # + attr_reader :get_scope + ## + # RPC-specific configuration for `create_scope` + # @return [::Gapic::Config::Method] + # + attr_reader :create_scope + ## + # RPC-specific configuration for `update_scope` + # @return [::Gapic::Config::Method] + # + attr_reader :update_scope + ## + # RPC-specific configuration for `delete_scope` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_scope + ## + # RPC-specific configuration for `list_scopes` + # @return [::Gapic::Config::Method] + # + attr_reader :list_scopes + ## + # RPC-specific configuration for `list_permitted_scopes` + # @return [::Gapic::Config::Method] + # + attr_reader :list_permitted_scopes + ## + # RPC-specific configuration for `get_membership_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :get_membership_binding + ## + # RPC-specific configuration for `create_membership_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :create_membership_binding + ## + # RPC-specific configuration for `update_membership_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :update_membership_binding + ## + # RPC-specific configuration for `delete_membership_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_membership_binding + ## + # RPC-specific configuration for `list_membership_bindings` + # @return [::Gapic::Config::Method] + # + attr_reader :list_membership_bindings + ## + # RPC-specific configuration for `get_membership_rbac_role_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :get_membership_rbac_role_binding + ## + # RPC-specific configuration for `create_membership_rbac_role_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :create_membership_rbac_role_binding + ## + # RPC-specific configuration for `update_membership_rbac_role_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :update_membership_rbac_role_binding + ## + # RPC-specific configuration for `delete_membership_rbac_role_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_membership_rbac_role_binding + ## + # RPC-specific configuration for `list_membership_rbac_role_bindings` + # @return [::Gapic::Config::Method] + # + attr_reader :list_membership_rbac_role_bindings + ## + # RPC-specific configuration for `generate_membership_rbac_role_binding_yaml` + # @return [::Gapic::Config::Method] + # + attr_reader :generate_membership_rbac_role_binding_yaml # @private def initialize parent_rpcs = nil list_memberships_config = parent_rpcs.list_memberships if parent_rpcs.respond_to? :list_memberships @list_memberships = ::Gapic::Config::Method.new list_memberships_config + list_bound_memberships_config = parent_rpcs.list_bound_memberships if parent_rpcs.respond_to? :list_bound_memberships + @list_bound_memberships = ::Gapic::Config::Method.new list_bound_memberships_config list_features_config = parent_rpcs.list_features if parent_rpcs.respond_to? :list_features @list_features = ::Gapic::Config::Method.new list_features_config get_membership_config = parent_rpcs.get_membership if parent_rpcs.respond_to? :get_membership @@ -1719,6 +5096,70 @@ def initialize parent_rpcs = nil @update_feature = ::Gapic::Config::Method.new update_feature_config generate_connect_manifest_config = parent_rpcs.generate_connect_manifest if parent_rpcs.respond_to? :generate_connect_manifest @generate_connect_manifest = ::Gapic::Config::Method.new generate_connect_manifest_config + create_fleet_config = parent_rpcs.create_fleet if parent_rpcs.respond_to? :create_fleet + @create_fleet = ::Gapic::Config::Method.new create_fleet_config + get_fleet_config = parent_rpcs.get_fleet if parent_rpcs.respond_to? :get_fleet + @get_fleet = ::Gapic::Config::Method.new get_fleet_config + update_fleet_config = parent_rpcs.update_fleet if parent_rpcs.respond_to? :update_fleet + @update_fleet = ::Gapic::Config::Method.new update_fleet_config + delete_fleet_config = parent_rpcs.delete_fleet if parent_rpcs.respond_to? :delete_fleet + @delete_fleet = ::Gapic::Config::Method.new delete_fleet_config + list_fleets_config = parent_rpcs.list_fleets if parent_rpcs.respond_to? :list_fleets + @list_fleets = ::Gapic::Config::Method.new list_fleets_config + get_scope_namespace_config = parent_rpcs.get_scope_namespace if parent_rpcs.respond_to? :get_scope_namespace + @get_scope_namespace = ::Gapic::Config::Method.new get_scope_namespace_config + create_scope_namespace_config = parent_rpcs.create_scope_namespace if parent_rpcs.respond_to? :create_scope_namespace + @create_scope_namespace = ::Gapic::Config::Method.new create_scope_namespace_config + update_scope_namespace_config = parent_rpcs.update_scope_namespace if parent_rpcs.respond_to? :update_scope_namespace + @update_scope_namespace = ::Gapic::Config::Method.new update_scope_namespace_config + delete_scope_namespace_config = parent_rpcs.delete_scope_namespace if parent_rpcs.respond_to? :delete_scope_namespace + @delete_scope_namespace = ::Gapic::Config::Method.new delete_scope_namespace_config + list_scope_namespaces_config = parent_rpcs.list_scope_namespaces if parent_rpcs.respond_to? :list_scope_namespaces + @list_scope_namespaces = ::Gapic::Config::Method.new list_scope_namespaces_config + get_scope_rbac_role_binding_config = parent_rpcs.get_scope_rbac_role_binding if parent_rpcs.respond_to? :get_scope_rbac_role_binding + @get_scope_rbac_role_binding = ::Gapic::Config::Method.new get_scope_rbac_role_binding_config + create_scope_rbac_role_binding_config = parent_rpcs.create_scope_rbac_role_binding if parent_rpcs.respond_to? :create_scope_rbac_role_binding + @create_scope_rbac_role_binding = ::Gapic::Config::Method.new create_scope_rbac_role_binding_config + update_scope_rbac_role_binding_config = parent_rpcs.update_scope_rbac_role_binding if parent_rpcs.respond_to? :update_scope_rbac_role_binding + @update_scope_rbac_role_binding = ::Gapic::Config::Method.new update_scope_rbac_role_binding_config + delete_scope_rbac_role_binding_config = parent_rpcs.delete_scope_rbac_role_binding if parent_rpcs.respond_to? :delete_scope_rbac_role_binding + @delete_scope_rbac_role_binding = ::Gapic::Config::Method.new delete_scope_rbac_role_binding_config + list_scope_rbac_role_bindings_config = parent_rpcs.list_scope_rbac_role_bindings if parent_rpcs.respond_to? :list_scope_rbac_role_bindings + @list_scope_rbac_role_bindings = ::Gapic::Config::Method.new list_scope_rbac_role_bindings_config + get_scope_config = parent_rpcs.get_scope if parent_rpcs.respond_to? :get_scope + @get_scope = ::Gapic::Config::Method.new get_scope_config + create_scope_config = parent_rpcs.create_scope if parent_rpcs.respond_to? :create_scope + @create_scope = ::Gapic::Config::Method.new create_scope_config + update_scope_config = parent_rpcs.update_scope if parent_rpcs.respond_to? :update_scope + @update_scope = ::Gapic::Config::Method.new update_scope_config + delete_scope_config = parent_rpcs.delete_scope if parent_rpcs.respond_to? :delete_scope + @delete_scope = ::Gapic::Config::Method.new delete_scope_config + list_scopes_config = parent_rpcs.list_scopes if parent_rpcs.respond_to? :list_scopes + @list_scopes = ::Gapic::Config::Method.new list_scopes_config + list_permitted_scopes_config = parent_rpcs.list_permitted_scopes if parent_rpcs.respond_to? :list_permitted_scopes + @list_permitted_scopes = ::Gapic::Config::Method.new list_permitted_scopes_config + get_membership_binding_config = parent_rpcs.get_membership_binding if parent_rpcs.respond_to? :get_membership_binding + @get_membership_binding = ::Gapic::Config::Method.new get_membership_binding_config + create_membership_binding_config = parent_rpcs.create_membership_binding if parent_rpcs.respond_to? :create_membership_binding + @create_membership_binding = ::Gapic::Config::Method.new create_membership_binding_config + update_membership_binding_config = parent_rpcs.update_membership_binding if parent_rpcs.respond_to? :update_membership_binding + @update_membership_binding = ::Gapic::Config::Method.new update_membership_binding_config + delete_membership_binding_config = parent_rpcs.delete_membership_binding if parent_rpcs.respond_to? :delete_membership_binding + @delete_membership_binding = ::Gapic::Config::Method.new delete_membership_binding_config + list_membership_bindings_config = parent_rpcs.list_membership_bindings if parent_rpcs.respond_to? :list_membership_bindings + @list_membership_bindings = ::Gapic::Config::Method.new list_membership_bindings_config + get_membership_rbac_role_binding_config = parent_rpcs.get_membership_rbac_role_binding if parent_rpcs.respond_to? :get_membership_rbac_role_binding + @get_membership_rbac_role_binding = ::Gapic::Config::Method.new get_membership_rbac_role_binding_config + create_membership_rbac_role_binding_config = parent_rpcs.create_membership_rbac_role_binding if parent_rpcs.respond_to? :create_membership_rbac_role_binding + @create_membership_rbac_role_binding = ::Gapic::Config::Method.new create_membership_rbac_role_binding_config + update_membership_rbac_role_binding_config = parent_rpcs.update_membership_rbac_role_binding if parent_rpcs.respond_to? :update_membership_rbac_role_binding + @update_membership_rbac_role_binding = ::Gapic::Config::Method.new update_membership_rbac_role_binding_config + delete_membership_rbac_role_binding_config = parent_rpcs.delete_membership_rbac_role_binding if parent_rpcs.respond_to? :delete_membership_rbac_role_binding + @delete_membership_rbac_role_binding = ::Gapic::Config::Method.new delete_membership_rbac_role_binding_config + list_membership_rbac_role_bindings_config = parent_rpcs.list_membership_rbac_role_bindings if parent_rpcs.respond_to? :list_membership_rbac_role_bindings + @list_membership_rbac_role_bindings = ::Gapic::Config::Method.new list_membership_rbac_role_bindings_config + generate_membership_rbac_role_binding_yaml_config = parent_rpcs.generate_membership_rbac_role_binding_yaml if parent_rpcs.respond_to? :generate_membership_rbac_role_binding_yaml + @generate_membership_rbac_role_binding_yaml = ::Gapic::Config::Method.new generate_membership_rbac_role_binding_yaml_config yield self if block_given? end diff --git a/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub/paths.rb b/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub/paths.rb index d6c19dd3dd68..62b66b3b9f0b 100644 --- a/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub/paths.rb +++ b/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub/paths.rb @@ -43,6 +43,49 @@ def feature_path project:, location:, feature: "projects/#{project}/locations/#{location}/features/#{feature}" end + ## + # Create a fully-qualified Fleet resource string. + # + # @overload fleet_path(project:, location:, fleet:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/fleets/{fleet}` + # + # @param project [String] + # @param location [String] + # @param fleet [String] + # + # @overload fleet_path(organization:, location:, fleet:) + # The resource will be in the following format: + # + # `organizations/{organization}/locations/{location}/fleets/{fleet}` + # + # @param organization [String] + # @param location [String] + # @param fleet [String] + # + # @return [::String] + def fleet_path **args + resources = { + "fleet:location:project" => (proc do |project:, location:, fleet:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/fleets/#{fleet}" + end), + "fleet:location:organization" => (proc do |organization:, location:, fleet:| + raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "organizations/#{organization}/locations/#{location}/fleets/#{fleet}" + 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 Location resource string. # @@ -79,6 +122,114 @@ def membership_path project:, location:, membership: "projects/#{project}/locations/#{location}/memberships/#{membership}" end + ## + # Create a fully-qualified MembershipBinding resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/memberships/{membership}/bindings/{membershipbinding}` + # + # @param project [String] + # @param location [String] + # @param membership [String] + # @param membershipbinding [String] + # + # @return [::String] + def membership_binding_path project:, location:, membership:, membershipbinding: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "membership cannot contain /" if membership.to_s.include? "/" + + "projects/#{project}/locations/#{location}/memberships/#{membership}/bindings/#{membershipbinding}" + end + + ## + # Create a fully-qualified Namespace resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/scopes/{scope}/namespaces/{namespace}` + # + # @param project [String] + # @param location [String] + # @param scope [String] + # @param namespace [String] + # + # @return [::String] + def namespace_path project:, location:, scope:, namespace: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "scope cannot contain /" if scope.to_s.include? "/" + + "projects/#{project}/locations/#{location}/scopes/#{scope}/namespaces/#{namespace}" + end + + ## + # Create a fully-qualified RBACRoleBinding resource string. + # + # @overload rbac_role_binding_path(project:, location:, scope:, rbacrolebinding:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/scopes/{scope}/rbacrolebindings/{rbacrolebinding}` + # + # @param project [String] + # @param location [String] + # @param scope [String] + # @param rbacrolebinding [String] + # + # @overload rbac_role_binding_path(project:, location:, membership:, rbacrolebinding:) + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/memberships/{membership}/rbacrolebindings/{rbacrolebinding}` + # + # @param project [String] + # @param location [String] + # @param membership [String] + # @param rbacrolebinding [String] + # + # @return [::String] + def rbac_role_binding_path **args + resources = { + "location:project:rbacrolebinding:scope" => (proc do |project:, location:, scope:, rbacrolebinding:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "scope cannot contain /" if scope.to_s.include? "/" + + "projects/#{project}/locations/#{location}/scopes/#{scope}/rbacrolebindings/#{rbacrolebinding}" + end), + "location:membership:project:rbacrolebinding" => (proc do |project:, location:, membership:, rbacrolebinding:| + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "membership cannot contain /" if membership.to_s.include? "/" + + "projects/#{project}/locations/#{location}/memberships/#{membership}/rbacrolebindings/#{rbacrolebinding}" + 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 Scope resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/scopes/{scope}` + # + # @param project [String] + # @param location [String] + # @param scope [String] + # + # @return [::String] + def scope_path project:, location:, scope: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/scopes/#{scope}" + end + extend self end end diff --git a/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub/rest/client.rb b/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub/rest/client.rb index d9932b083356..17cfd971634f 100644 --- a/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub/rest/client.rb +++ b/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub/rest/client.rb @@ -329,6 +329,106 @@ def list_memberships request, options = nil raise ::Google::Cloud::Error.from_error(e) end + ## + # Lists Memberships bound to a Scope. The response includes relevant + # Memberships from all regions. + # + # @overload list_bound_memberships(request, options = nil) + # Pass arguments to `list_bound_memberships` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::ListBoundMembershipsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::ListBoundMembershipsRequest, ::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_bound_memberships(scope_name: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_bound_memberships` 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 scope_name [::String] + # Required. Name of the Scope, in the format + # `projects/*/locations/global/scopes/*`, to which the Memberships are bound. + # @param filter [::String] + # Optional. Lists Memberships that match the filter expression, following the + # syntax outlined in https://google.aip.dev/160. Currently, filtering + # can be done only based on Memberships's `name`, `labels`, `create_time`, + # `update_time`, and `unique_id`. + # @param page_size [::Integer] + # Optional. When requesting a 'page' of resources, `page_size` specifies + # number of resources to return. If unspecified or set to 0, all resources + # will be returned. Pagination is currently not supported; therefore, setting + # this field does not have any impact for now. + # @param page_token [::String] + # Optional. Token returned by previous call to `ListBoundMemberships` which + # specifies the position in the list from where to continue listing the + # resources. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeHub::V1::Membership>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeHub::V1::Membership>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::ListBoundMembershipsRequest.new + # + # # Call the list_bound_memberships method. + # result = client.list_bound_memberships 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::GkeHub::V1::Membership. + # p item + # end + # + def list_bound_memberships request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::ListBoundMembershipsRequest + + # 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_bound_memberships.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::GkeHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_bound_memberships.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_bound_memberships.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.list_bound_memberships request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @gke_hub_stub, :list_bound_memberships, "memberships", 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 + ## # Lists Features in a given project and location. # @@ -342,7 +442,7 @@ def list_memberships request, options = nil # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # - # @overload list_features(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # @overload list_features(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, return_partial_success: nil) # Pass arguments to `list_features` 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). @@ -378,6 +478,11 @@ def list_memberships request, options = nil # @param order_by [::String] # One or more fields to compare and use to sort the output. # See https://google.aip.dev/132#ordering. + # @param return_partial_success [::Boolean] + # Optional. If set to true, the response will return partial results when + # some regions are unreachable and the unreachable field in Feature proto + # will be populated. If set to false, the request will fail when some regions + # are unreachable. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeHub::V1::Feature>] # @yieldparam operation [::Gapic::Rest::TransportOperation] @@ -534,7 +639,7 @@ def get_membership request, options = nil # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # - # @overload get_feature(name: nil) + # @overload get_feature(name: nil, return_partial_success: nil) # Pass arguments to `get_feature` 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). @@ -542,6 +647,11 @@ def get_membership request, options = nil # @param name [::String] # Required. The Feature resource name in the format # `projects/*/locations/*/features/*` + # @param return_partial_success [::Boolean] + # Optional. If set to true, the response will return partial results when + # some regions are unreachable and the unreachable field in Feature proto + # will be populated. If set to false, the request will fail when some regions + # are unreachable. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Google::Cloud::GkeHub::V1::Feature] # @yieldparam operation [::Gapic::Rest::TransportOperation] @@ -744,7 +854,7 @@ def create_membership request, options = nil # @param resource [::Google::Cloud::GkeHub::V1::Feature, ::Hash] # The Feature resource to create. # @param request_id [::String] - # Optional. A request ID to identify requests. Specify a unique request ID + # A request ID to identify requests. Specify a unique request ID # so that if you must retry your request, the server will know to ignore # the request if it has already been completed. The server will guarantee # that for at least 60 minutes after the first request. @@ -1186,7 +1296,7 @@ def update_membership request, options = nil # If you specify the update_mask to be a special path "*", fully replaces all # user-modifiable fields to match `resource`. # @param request_id [::String] - # Optional. A request ID to identify requests. Specify a unique request ID + # A request ID to identify requests. Specify a unique request ID # so that if you must retry your request, the server will know to ignore # the request if it has already been completed. The server will guarantee # that for at least 60 minutes after the first request. @@ -1373,147 +1483,3016 @@ def generate_connect_manifest request, options = nil end ## - # Configuration class for the GkeHub REST API. + # Creates a fleet. # - # This class represents the configuration for GkeHub 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::GkeHub::V1::GkeHub::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. + # @overload create_fleet(request, options = nil) + # Pass arguments to `create_fleet` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::CreateFleetRequest} or an equivalent Hash. # - # Configuration can be applied globally to all clients, or to a single client - # on construction. + # @param request [::Google::Cloud::GkeHub::V1::CreateFleetRequest, ::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. # - # @example + # @overload create_fleet(parent: nil, fleet: nil) + # Pass arguments to `create_fleet` 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). # - # # Modify the global config, setting the timeout for - # # list_memberships to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_memberships.timeout = 20.0 - # end + # @param parent [::String] + # Required. The parent (project and location) where the Fleet will be + # created. Specified in the format `projects/*/locations/*`. + # @param fleet [::Google::Cloud::GkeHub::V1::Fleet, ::Hash] + # Required. The fleet to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_memberships.timeout = 20.0 - # end + # @return [::Gapic::Operation] # - # @!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 + # @raise [::Google::Cloud::Error] if the REST call is aborted. # - # 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. - # * `: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] + # @example Basic example + # require "google/cloud/gke_hub/v1" # - class Configuration - extend ::Gapic::Config + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::CreateFleetRequest.new + # + # # Call the create_fleet method. + # result = client.create_fleet request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_fleet request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "gkehub.googleapis.com" + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::CreateFleetRequest - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? + # Customize the options with defaults + call_metadata = @config.rpcs.create_fleet.metadata.to_h - yield self if block_given? - end + # 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::GkeHub::V1::VERSION, + transports_version_send: [:rest] - ## - # 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 + 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_fleet.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_fleet.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.create_fleet request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end - ## - # Configuration RPC class for the GkeHub 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. + ## + # Returns the details of a fleet. + # + # @overload get_fleet(request, options = nil) + # Pass arguments to `get_fleet` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::GetFleetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::GetFleetRequest, ::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_fleet(name: nil) + # Pass arguments to `get_fleet` 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 Fleet resource name in the format + # `projects/*/locations/*/fleets/*`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::GkeHub::V1::Fleet] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GkeHub::V1::Fleet] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::GetFleetRequest.new + # + # # Call the get_fleet method. + # result = client.get_fleet request + # + # # The returned object is of type Google::Cloud::GkeHub::V1::Fleet. + # p result + # + def get_fleet request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::GetFleetRequest + + # 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_fleet.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::GkeHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_fleet.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_fleet.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.get_fleet 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 a fleet. + # + # @overload update_fleet(request, options = nil) + # Pass arguments to `update_fleet` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::UpdateFleetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::UpdateFleetRequest, ::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_fleet(fleet: nil, update_mask: nil) + # Pass arguments to `update_fleet` 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 fleet [::Google::Cloud::GkeHub::V1::Fleet, ::Hash] + # Required. The Fleet to update. + # + # The `name` field of the Fleet object identifies which fleet will be + # updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The fields to be updated; + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::UpdateFleetRequest.new + # + # # Call the update_fleet method. + # result = client.update_fleet request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_fleet request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::UpdateFleetRequest + + # 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_fleet.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::GkeHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_fleet.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_fleet.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.update_fleet request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Removes a Fleet. There must be no memberships remaining in the Fleet. + # + # @overload delete_fleet(request, options = nil) + # Pass arguments to `delete_fleet` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::DeleteFleetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::DeleteFleetRequest, ::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_fleet(name: nil) + # Pass arguments to `delete_fleet` 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 Fleet resource name in the format + # `projects/*/locations/*/fleets/*`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::DeleteFleetRequest.new + # + # # Call the delete_fleet method. + # result = client.delete_fleet request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_fleet request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::DeleteFleetRequest + + # 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_fleet.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::GkeHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_fleet.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_fleet.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.delete_fleet request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns all fleets within an organization or a project that the caller has + # access to. + # + # @overload list_fleets(request, options = nil) + # Pass arguments to `list_fleets` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::ListFleetsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::ListFleetsRequest, ::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_fleets(parent: nil, page_token: nil, page_size: nil) + # Pass arguments to `list_fleets` 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 organization or project to list for Fleets under, in the + # format `organizations/*/locations/*` or `projects/*/locations/*`. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListFleets` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListFleets` must match + # the call that provided the page token. + # @param page_size [::Integer] + # Optional. The maximum number of fleets to return. The service may return + # fewer than this value. If unspecified, at most 200 fleets will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeHub::V1::Fleet>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeHub::V1::Fleet>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::ListFleetsRequest.new + # + # # Call the list_fleets method. + # result = client.list_fleets 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::GkeHub::V1::Fleet. + # p item + # end + # + def list_fleets request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::ListFleetsRequest + + # 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_fleets.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::GkeHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_fleets.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_fleets.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.list_fleets request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @gke_hub_stub, :list_fleets, "fleets", 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 + + ## + # Returns the details of a fleet namespace. + # + # @overload get_scope_namespace(request, options = nil) + # Pass arguments to `get_scope_namespace` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::GetScopeNamespaceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::GetScopeNamespaceRequest, ::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_scope_namespace(name: nil) + # Pass arguments to `get_scope_namespace` 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 Namespace resource name in the format + # `projects/*/locations/*/scopes/*/namespaces/*`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::GkeHub::V1::Namespace] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GkeHub::V1::Namespace] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::GetScopeNamespaceRequest.new + # + # # Call the get_scope_namespace method. + # result = client.get_scope_namespace request + # + # # The returned object is of type Google::Cloud::GkeHub::V1::Namespace. + # p result + # + def get_scope_namespace request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::GetScopeNamespaceRequest + + # 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_scope_namespace.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::GkeHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_scope_namespace.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_scope_namespace.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.get_scope_namespace request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a fleet namespace. + # + # @overload create_scope_namespace(request, options = nil) + # Pass arguments to `create_scope_namespace` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::CreateScopeNamespaceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::CreateScopeNamespaceRequest, ::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_scope_namespace(parent: nil, scope_namespace_id: nil, scope_namespace: nil) + # Pass arguments to `create_scope_namespace` 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 (project and location) where the Namespace will be + # created. Specified in the format `projects/*/locations/*/scopes/*`. + # @param scope_namespace_id [::String] + # Required. Client chosen ID for the Namespace. `namespace_id` must be a + # valid RFC 1123 compliant DNS label: + # + # 1. At most 63 characters in length + # 2. It must consist of lower case alphanumeric characters or `-` + # 3. It must start and end with an alphanumeric character + # + # Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, + # with a maximum length of 63 characters. + # @param scope_namespace [::Google::Cloud::GkeHub::V1::Namespace, ::Hash] + # Required. The fleet namespace to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::CreateScopeNamespaceRequest.new + # + # # Call the create_scope_namespace method. + # result = client.create_scope_namespace request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_scope_namespace request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::CreateScopeNamespaceRequest + + # 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_scope_namespace.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::GkeHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_scope_namespace.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_scope_namespace.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.create_scope_namespace request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a fleet namespace. + # + # @overload update_scope_namespace(request, options = nil) + # Pass arguments to `update_scope_namespace` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::UpdateScopeNamespaceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::UpdateScopeNamespaceRequest, ::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_scope_namespace(scope_namespace: nil, update_mask: nil) + # Pass arguments to `update_scope_namespace` 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 scope_namespace [::Google::Cloud::GkeHub::V1::Namespace, ::Hash] + # Required. A namespace with fields updated. The 'name' field in this + # namespace is used to identify the resource to update. Given 'updated' + # prefix to follow go/proto-best-practices-checkers#keyword_conflict + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The fields to be updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::UpdateScopeNamespaceRequest.new + # + # # Call the update_scope_namespace method. + # result = client.update_scope_namespace request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_scope_namespace request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::UpdateScopeNamespaceRequest + + # 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_scope_namespace.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::GkeHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_scope_namespace.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_scope_namespace.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.update_scope_namespace request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 a fleet namespace. + # + # @overload delete_scope_namespace(request, options = nil) + # Pass arguments to `delete_scope_namespace` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::DeleteScopeNamespaceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::DeleteScopeNamespaceRequest, ::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_scope_namespace(name: nil) + # Pass arguments to `delete_scope_namespace` 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 Namespace resource name in the format + # `projects/*/locations/*/scopes/*/namespaces/*`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::DeleteScopeNamespaceRequest.new + # + # # Call the delete_scope_namespace method. + # result = client.delete_scope_namespace request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_scope_namespace request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::DeleteScopeNamespaceRequest + + # 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_scope_namespace.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::GkeHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_scope_namespace.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_scope_namespace.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.delete_scope_namespace request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists fleet namespaces. + # + # @overload list_scope_namespaces(request, options = nil) + # Pass arguments to `list_scope_namespaces` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::ListScopeNamespacesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::ListScopeNamespacesRequest, ::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_scope_namespaces(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_scope_namespaces` 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 (project and location) where the Features will be + # listed. Specified in the format `projects/*/locations/*/scopes/*`. + # @param page_size [::Integer] + # Optional. When requesting a 'page' of resources, `page_size` specifies + # number of resources to return. If unspecified or set to 0, all resources + # will be returned. + # @param page_token [::String] + # Optional. Token returned by previous call to `ListFeatures` which + # specifies the position in the list from where to continue listing the + # resources. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeHub::V1::Namespace>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeHub::V1::Namespace>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::ListScopeNamespacesRequest.new + # + # # Call the list_scope_namespaces method. + # result = client.list_scope_namespaces 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::GkeHub::V1::Namespace. + # p item + # end + # + def list_scope_namespaces request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::ListScopeNamespacesRequest + + # 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_scope_namespaces.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::GkeHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_scope_namespaces.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_scope_namespaces.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.list_scope_namespaces request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @gke_hub_stub, :list_scope_namespaces, "scope_namespaces", 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 + + ## + # Returns the details of a Scope RBACRoleBinding. + # + # @overload get_scope_rbac_role_binding(request, options = nil) + # Pass arguments to `get_scope_rbac_role_binding` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::GetScopeRBACRoleBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::GetScopeRBACRoleBindingRequest, ::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_scope_rbac_role_binding(name: nil) + # Pass arguments to `get_scope_rbac_role_binding` 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 RBACRoleBinding resource name in the format + # `projects/*/locations/*/scopes/*/rbacrolebindings/*`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::GkeHub::V1::RBACRoleBinding] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GkeHub::V1::RBACRoleBinding] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::GetScopeRBACRoleBindingRequest.new + # + # # Call the get_scope_rbac_role_binding method. + # result = client.get_scope_rbac_role_binding request + # + # # The returned object is of type Google::Cloud::GkeHub::V1::RBACRoleBinding. + # p result + # + def get_scope_rbac_role_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::GetScopeRBACRoleBindingRequest + + # 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_scope_rbac_role_binding.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::GkeHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_scope_rbac_role_binding.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_scope_rbac_role_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.get_scope_rbac_role_binding request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a Scope RBACRoleBinding. + # + # @overload create_scope_rbac_role_binding(request, options = nil) + # Pass arguments to `create_scope_rbac_role_binding` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::CreateScopeRBACRoleBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::CreateScopeRBACRoleBindingRequest, ::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_scope_rbac_role_binding(parent: nil, rbacrolebinding_id: nil, rbacrolebinding: nil) + # Pass arguments to `create_scope_rbac_role_binding` 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 (project and location) where the RBACRoleBinding will + # be created. Specified in the format `projects/*/locations/*/scopes/*`. + # @param rbacrolebinding_id [::String] + # Required. Client chosen ID for the RBACRoleBinding. `rbacrolebinding_id` + # must be a valid RFC 1123 compliant DNS label: + # + # 1. At most 63 characters in length + # 2. It must consist of lower case alphanumeric characters or `-` + # 3. It must start and end with an alphanumeric character + # + # Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, + # with a maximum length of 63 characters. + # @param rbacrolebinding [::Google::Cloud::GkeHub::V1::RBACRoleBinding, ::Hash] + # Required. The rbacrolebindings to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::CreateScopeRBACRoleBindingRequest.new + # + # # Call the create_scope_rbac_role_binding method. + # result = client.create_scope_rbac_role_binding request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_scope_rbac_role_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::CreateScopeRBACRoleBindingRequest + + # 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_scope_rbac_role_binding.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::GkeHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_scope_rbac_role_binding.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_scope_rbac_role_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.create_scope_rbac_role_binding request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a Scope RBACRoleBinding. + # + # @overload update_scope_rbac_role_binding(request, options = nil) + # Pass arguments to `update_scope_rbac_role_binding` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::UpdateScopeRBACRoleBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::UpdateScopeRBACRoleBindingRequest, ::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_scope_rbac_role_binding(rbacrolebinding: nil, update_mask: nil) + # Pass arguments to `update_scope_rbac_role_binding` 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 rbacrolebinding [::Google::Cloud::GkeHub::V1::RBACRoleBinding, ::Hash] + # Required. A rbacrolebinding with fields updated. The 'name' field in this + # rbacrolebinding is used to identify the resource to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The fields to be updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::UpdateScopeRBACRoleBindingRequest.new + # + # # Call the update_scope_rbac_role_binding method. + # result = client.update_scope_rbac_role_binding request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_scope_rbac_role_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::UpdateScopeRBACRoleBindingRequest + + # 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_scope_rbac_role_binding.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::GkeHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_scope_rbac_role_binding.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_scope_rbac_role_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.update_scope_rbac_role_binding request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 a Scope RBACRoleBinding. + # + # @overload delete_scope_rbac_role_binding(request, options = nil) + # Pass arguments to `delete_scope_rbac_role_binding` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::DeleteScopeRBACRoleBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::DeleteScopeRBACRoleBindingRequest, ::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_scope_rbac_role_binding(name: nil) + # Pass arguments to `delete_scope_rbac_role_binding` 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 RBACRoleBinding resource name in the format + # `projects/*/locations/*/scopes/*/rbacrolebindings/*`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::DeleteScopeRBACRoleBindingRequest.new + # + # # Call the delete_scope_rbac_role_binding method. + # result = client.delete_scope_rbac_role_binding request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_scope_rbac_role_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::DeleteScopeRBACRoleBindingRequest + + # 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_scope_rbac_role_binding.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::GkeHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_scope_rbac_role_binding.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_scope_rbac_role_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.delete_scope_rbac_role_binding request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all Scope RBACRoleBindings. + # + # @overload list_scope_rbac_role_bindings(request, options = nil) + # Pass arguments to `list_scope_rbac_role_bindings` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::ListScopeRBACRoleBindingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::ListScopeRBACRoleBindingsRequest, ::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_scope_rbac_role_bindings(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_scope_rbac_role_bindings` 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 (project and location) where the Features will be + # listed. Specified in the format `projects/*/locations/*/scopes/*`. + # @param page_size [::Integer] + # Optional. When requesting a 'page' of resources, `page_size` specifies + # number of resources to return. If unspecified or set to 0, all resources + # will be returned. + # @param page_token [::String] + # Optional. Token returned by previous call to `ListScopeRBACRoleBindings` + # which specifies the position in the list from where to continue listing the + # resources. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeHub::V1::RBACRoleBinding>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeHub::V1::RBACRoleBinding>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::ListScopeRBACRoleBindingsRequest.new + # + # # Call the list_scope_rbac_role_bindings method. + # result = client.list_scope_rbac_role_bindings 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::GkeHub::V1::RBACRoleBinding. + # p item + # end + # + def list_scope_rbac_role_bindings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::ListScopeRBACRoleBindingsRequest + + # 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_scope_rbac_role_bindings.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::GkeHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_scope_rbac_role_bindings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_scope_rbac_role_bindings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.list_scope_rbac_role_bindings request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @gke_hub_stub, :list_scope_rbac_role_bindings, "rbacrolebindings", 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 + + ## + # Returns the details of a Scope. + # + # @overload get_scope(request, options = nil) + # Pass arguments to `get_scope` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::GetScopeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::GetScopeRequest, ::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_scope(name: nil) + # Pass arguments to `get_scope` 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 Scope resource name in the format + # `projects/*/locations/*/scopes/*`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::GkeHub::V1::Scope] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GkeHub::V1::Scope] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::GetScopeRequest.new + # + # # Call the get_scope method. + # result = client.get_scope request + # + # # The returned object is of type Google::Cloud::GkeHub::V1::Scope. + # p result + # + def get_scope request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::GetScopeRequest + + # 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_scope.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::GkeHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_scope.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_scope.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.get_scope request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a Scope. + # + # @overload create_scope(request, options = nil) + # Pass arguments to `create_scope` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::CreateScopeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::CreateScopeRequest, ::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_scope(parent: nil, scope_id: nil, scope: nil) + # Pass arguments to `create_scope` 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 (project and location) where the Scope will be + # created. Specified in the format `projects/*/locations/*`. + # @param scope_id [::String] + # Required. Client chosen ID for the Scope. `scope_id` must be a + # ???? + # @param scope [::Google::Cloud::GkeHub::V1::Scope, ::Hash] + # Required. The Scope to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::CreateScopeRequest.new + # + # # Call the create_scope method. + # result = client.create_scope request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_scope request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::CreateScopeRequest + + # 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_scope.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::GkeHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_scope.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_scope.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.create_scope request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a scopes. + # + # @overload update_scope(request, options = nil) + # Pass arguments to `update_scope` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::UpdateScopeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::UpdateScopeRequest, ::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_scope(scope: nil, update_mask: nil) + # Pass arguments to `update_scope` 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 scope [::Google::Cloud::GkeHub::V1::Scope, ::Hash] + # Required. A Scope with fields updated. The 'name' field in this + # namespace is used to identify the resource to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The fields to be updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::UpdateScopeRequest.new + # + # # Call the update_scope method. + # result = client.update_scope request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_scope request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::UpdateScopeRequest + + # 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_scope.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::GkeHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_scope.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_scope.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.update_scope request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 a Scope. + # + # @overload delete_scope(request, options = nil) + # Pass arguments to `delete_scope` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::DeleteScopeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::DeleteScopeRequest, ::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_scope(name: nil) + # Pass arguments to `delete_scope` 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 Scope resource name in the format + # `projects/*/locations/*/scopes/*`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::DeleteScopeRequest.new + # + # # Call the delete_scope method. + # result = client.delete_scope request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_scope request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::DeleteScopeRequest + + # 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_scope.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::GkeHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_scope.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_scope.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.delete_scope request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists Scopes. + # + # @overload list_scopes(request, options = nil) + # Pass arguments to `list_scopes` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::ListScopesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::ListScopesRequest, ::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_scopes(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_scopes` 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 (project and location) where the Scope will be listed. + # Specified in the format `projects/*/locations/*`. + # @param page_size [::Integer] + # Optional. When requesting a 'page' of resources, `page_size` specifies + # number of resources to return. If unspecified or set to 0, all resources + # will be returned. + # @param page_token [::String] + # Optional. Token returned by previous call to `ListScopes` which + # specifies the position in the list from where to continue listing the + # resources. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeHub::V1::Scope>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeHub::V1::Scope>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::ListScopesRequest.new + # + # # Call the list_scopes method. + # result = client.list_scopes 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::GkeHub::V1::Scope. + # p item + # end + # + def list_scopes request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::ListScopesRequest + + # 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_scopes.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::GkeHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_scopes.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_scopes.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.list_scopes request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @gke_hub_stub, :list_scopes, "scopes", 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 + + ## + # Lists permitted Scopes. + # + # @overload list_permitted_scopes(request, options = nil) + # Pass arguments to `list_permitted_scopes` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::ListPermittedScopesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::ListPermittedScopesRequest, ::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_permitted_scopes(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_permitted_scopes` 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 (project and location) where the Scope will be listed. + # Specified in the format `projects/*/locations/*`. + # @param page_size [::Integer] + # Optional. When requesting a 'page' of resources, `page_size` specifies + # number of resources to return. If unspecified or set to 0, all resources + # will be returned. + # @param page_token [::String] + # Optional. Token returned by previous call to `ListPermittedScopes` which + # specifies the position in the list from where to continue listing the + # resources. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeHub::V1::Scope>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeHub::V1::Scope>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::ListPermittedScopesRequest.new + # + # # Call the list_permitted_scopes method. + # result = client.list_permitted_scopes 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::GkeHub::V1::Scope. + # p item + # end + # + def list_permitted_scopes request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::ListPermittedScopesRequest + + # 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_permitted_scopes.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::GkeHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_permitted_scopes.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_permitted_scopes.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.list_permitted_scopes request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @gke_hub_stub, :list_permitted_scopes, "scopes", 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 + + ## + # Returns the details of a MembershipBinding. + # + # @overload get_membership_binding(request, options = nil) + # Pass arguments to `get_membership_binding` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::GetMembershipBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::GetMembershipBindingRequest, ::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_membership_binding(name: nil) + # Pass arguments to `get_membership_binding` 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 MembershipBinding resource name in the format + # `projects/*/locations/*/memberships/*/bindings/*`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::GkeHub::V1::MembershipBinding] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GkeHub::V1::MembershipBinding] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::GetMembershipBindingRequest.new + # + # # Call the get_membership_binding method. + # result = client.get_membership_binding request + # + # # The returned object is of type Google::Cloud::GkeHub::V1::MembershipBinding. + # p result + # + def get_membership_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::GetMembershipBindingRequest + + # 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_membership_binding.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::GkeHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_membership_binding.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_membership_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.get_membership_binding request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a MembershipBinding. + # + # @overload create_membership_binding(request, options = nil) + # Pass arguments to `create_membership_binding` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::CreateMembershipBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::CreateMembershipBindingRequest, ::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_membership_binding(parent: nil, membership_binding: nil, membership_binding_id: nil) + # Pass arguments to `create_membership_binding` 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 (project and location) where the MembershipBinding + # will be created. Specified in the format + # `projects/*/locations/*/memberships/*`. + # @param membership_binding [::Google::Cloud::GkeHub::V1::MembershipBinding, ::Hash] + # Required. The MembershipBinding to create. + # @param membership_binding_id [::String] + # Required. The ID to use for the MembershipBinding. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::CreateMembershipBindingRequest.new + # + # # Call the create_membership_binding method. + # result = client.create_membership_binding request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_membership_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::CreateMembershipBindingRequest + + # 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_membership_binding.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::GkeHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_membership_binding.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_membership_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.create_membership_binding request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a MembershipBinding. + # + # @overload update_membership_binding(request, options = nil) + # Pass arguments to `update_membership_binding` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::UpdateMembershipBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::UpdateMembershipBindingRequest, ::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_membership_binding(membership_binding: nil, update_mask: nil) + # Pass arguments to `update_membership_binding` 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 membership_binding [::Google::Cloud::GkeHub::V1::MembershipBinding, ::Hash] + # Required. The MembershipBinding object with fields updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The fields to be updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::UpdateMembershipBindingRequest.new + # + # # Call the update_membership_binding method. + # result = client.update_membership_binding request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_membership_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::UpdateMembershipBindingRequest + + # 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_membership_binding.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::GkeHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_membership_binding.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_membership_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.update_membership_binding request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 a MembershipBinding. + # + # @overload delete_membership_binding(request, options = nil) + # Pass arguments to `delete_membership_binding` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::DeleteMembershipBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::DeleteMembershipBindingRequest, ::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_membership_binding(name: nil) + # Pass arguments to `delete_membership_binding` 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 MembershipBinding resource name in the format + # `projects/*/locations/*/memberships/*/bindings/*`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::DeleteMembershipBindingRequest.new + # + # # Call the delete_membership_binding method. + # result = client.delete_membership_binding request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_membership_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::DeleteMembershipBindingRequest + + # 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_membership_binding.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::GkeHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_membership_binding.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_membership_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.delete_membership_binding request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists MembershipBindings. + # + # @overload list_membership_bindings(request, options = nil) + # Pass arguments to `list_membership_bindings` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::ListMembershipBindingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::ListMembershipBindingsRequest, ::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_membership_bindings(parent: nil, page_size: nil, page_token: nil, filter: nil) + # Pass arguments to `list_membership_bindings` 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 Membership for which the MembershipBindings will be + # listed. Specified in the format `projects/*/locations/*/memberships/*`. + # @param page_size [::Integer] + # Optional. When requesting a 'page' of resources, `page_size` specifies + # number of resources to return. If unspecified or set to 0, all resources + # will be returned. + # @param page_token [::String] + # Optional. Token returned by previous call to `ListMembershipBindings` which + # specifies the position in the list from where to continue listing the + # resources. + # @param filter [::String] + # Optional. Lists MembershipBindings that match the filter expression, + # following the syntax outlined in https://google.aip.dev/160. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeHub::V1::MembershipBinding>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeHub::V1::MembershipBinding>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::ListMembershipBindingsRequest.new + # + # # Call the list_membership_bindings method. + # result = client.list_membership_bindings 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::GkeHub::V1::MembershipBinding. + # p item + # end + # + def list_membership_bindings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::ListMembershipBindingsRequest + + # 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_membership_bindings.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::GkeHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_membership_bindings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_membership_bindings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.list_membership_bindings request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @gke_hub_stub, :list_membership_bindings, "membership_bindings", 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 + + ## + # Returns the details of a Membership RBACRoleBinding. + # + # @overload get_membership_rbac_role_binding(request, options = nil) + # Pass arguments to `get_membership_rbac_role_binding` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::GetMembershipRBACRoleBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::GetMembershipRBACRoleBindingRequest, ::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_membership_rbac_role_binding(name: nil) + # Pass arguments to `get_membership_rbac_role_binding` 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 RBACRoleBinding resource name in the format + # `projects/*/locations/*/memberships/*/rbacrolebindings/*`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::GkeHub::V1::RBACRoleBinding] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GkeHub::V1::RBACRoleBinding] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::GetMembershipRBACRoleBindingRequest.new + # + # # Call the get_membership_rbac_role_binding method. + # result = client.get_membership_rbac_role_binding request + # + # # The returned object is of type Google::Cloud::GkeHub::V1::RBACRoleBinding. + # p result + # + def get_membership_rbac_role_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::GetMembershipRBACRoleBindingRequest + + # 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_membership_rbac_role_binding.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::GkeHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_membership_rbac_role_binding.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_membership_rbac_role_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.get_membership_rbac_role_binding request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Creates a Membership RBACRoleBinding. + # + # @overload create_membership_rbac_role_binding(request, options = nil) + # Pass arguments to `create_membership_rbac_role_binding` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::CreateMembershipRBACRoleBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::CreateMembershipRBACRoleBindingRequest, ::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_membership_rbac_role_binding(parent: nil, rbacrolebinding_id: nil, rbacrolebinding: nil) + # Pass arguments to `create_membership_rbac_role_binding` 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 (project and location) where the RBACRoleBinding will + # be created. Specified in the format `projects/*/locations/*/memberships/*`. + # @param rbacrolebinding_id [::String] + # Required. Client chosen ID for the RBACRoleBinding. `rbacrolebinding_id` + # must be a valid RFC 1123 compliant DNS label: + # + # 1. At most 63 characters in length + # 2. It must consist of lower case alphanumeric characters or `-` + # 3. It must start and end with an alphanumeric character + # + # Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, + # with a maximum length of 63 characters. + # @param rbacrolebinding [::Google::Cloud::GkeHub::V1::RBACRoleBinding, ::Hash] + # Required. The rbacrolebindings to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::CreateMembershipRBACRoleBindingRequest.new + # + # # Call the create_membership_rbac_role_binding method. + # result = client.create_membership_rbac_role_binding request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_membership_rbac_role_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::CreateMembershipRBACRoleBindingRequest + + # 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_membership_rbac_role_binding.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::GkeHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.create_membership_rbac_role_binding.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_membership_rbac_role_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.create_membership_rbac_role_binding request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a Membership RBACRoleBinding. + # + # @overload update_membership_rbac_role_binding(request, options = nil) + # Pass arguments to `update_membership_rbac_role_binding` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::UpdateMembershipRBACRoleBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::UpdateMembershipRBACRoleBindingRequest, ::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_membership_rbac_role_binding(rbacrolebinding: nil, update_mask: nil) + # Pass arguments to `update_membership_rbac_role_binding` 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 rbacrolebinding [::Google::Cloud::GkeHub::V1::RBACRoleBinding, ::Hash] + # Required. A rbacrolebinding with fields updated. The 'name' field in this + # rbacrolebinding is used to identify the resource to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The fields to be updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::UpdateMembershipRBACRoleBindingRequest.new + # + # # Call the update_membership_rbac_role_binding method. + # result = client.update_membership_rbac_role_binding request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_membership_rbac_role_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::UpdateMembershipRBACRoleBindingRequest + + # 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_membership_rbac_role_binding.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::GkeHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_membership_rbac_role_binding.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_membership_rbac_role_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.update_membership_rbac_role_binding request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 a Membership RBACRoleBinding. + # + # @overload delete_membership_rbac_role_binding(request, options = nil) + # Pass arguments to `delete_membership_rbac_role_binding` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::DeleteMembershipRBACRoleBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::DeleteMembershipRBACRoleBindingRequest, ::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_membership_rbac_role_binding(name: nil) + # Pass arguments to `delete_membership_rbac_role_binding` 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 RBACRoleBinding resource name in the format + # `projects/*/locations/*/memberships/*/rbacrolebindings/*`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::DeleteMembershipRBACRoleBindingRequest.new + # + # # Call the delete_membership_rbac_role_binding method. + # result = client.delete_membership_rbac_role_binding request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_membership_rbac_role_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::DeleteMembershipRBACRoleBindingRequest + + # 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_membership_rbac_role_binding.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::GkeHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_membership_rbac_role_binding.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_membership_rbac_role_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.delete_membership_rbac_role_binding request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists all Membership RBACRoleBindings. + # + # @overload list_membership_rbac_role_bindings(request, options = nil) + # Pass arguments to `list_membership_rbac_role_bindings` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::ListMembershipRBACRoleBindingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::ListMembershipRBACRoleBindingsRequest, ::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_membership_rbac_role_bindings(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_membership_rbac_role_bindings` 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 (project and location) where the Features will be + # listed. Specified in the format `projects/*/locations/*/memberships/*`. + # @param page_size [::Integer] + # Optional. When requesting a 'page' of resources, `page_size` specifies + # number of resources to return. If unspecified or set to 0, all resources + # will be returned. + # @param page_token [::String] + # Optional. Token returned by previous call to + # `ListMembershipRBACRoleBindings` which specifies the position in the list + # from where to continue listing the resources. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeHub::V1::RBACRoleBinding>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeHub::V1::RBACRoleBinding>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::ListMembershipRBACRoleBindingsRequest.new + # + # # Call the list_membership_rbac_role_bindings method. + # result = client.list_membership_rbac_role_bindings 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::GkeHub::V1::RBACRoleBinding. + # p item + # end + # + def list_membership_rbac_role_bindings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::ListMembershipRBACRoleBindingsRequest + + # 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_membership_rbac_role_bindings.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::GkeHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_membership_rbac_role_bindings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_membership_rbac_role_bindings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.list_membership_rbac_role_bindings request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @gke_hub_stub, :list_membership_rbac_role_bindings, "rbacrolebindings", 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 + + ## + # Generates a YAML of the RBAC policies for the specified + # RoleBinding and its associated impersonation resources. + # + # @overload generate_membership_rbac_role_binding_yaml(request, options = nil) + # Pass arguments to `generate_membership_rbac_role_binding_yaml` via a request object, either of type + # {::Google::Cloud::GkeHub::V1::GenerateMembershipRBACRoleBindingYAMLRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeHub::V1::GenerateMembershipRBACRoleBindingYAMLRequest, ::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 generate_membership_rbac_role_binding_yaml(parent: nil, rbacrolebinding_id: nil, rbacrolebinding: nil) + # Pass arguments to `generate_membership_rbac_role_binding_yaml` 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 (project and location) where the RBACRoleBinding will + # be created. Specified in the format `projects/*/locations/*/memberships/*`. + # @param rbacrolebinding_id [::String] + # Required. Client chosen ID for the RBACRoleBinding. `rbacrolebinding_id` + # must be a valid RFC 1123 compliant DNS label: + # + # 1. At most 63 characters in length + # 2. It must consist of lower case alphanumeric characters or `-` + # 3. It must start and end with an alphanumeric character + # + # Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, + # with a maximum length of 63 characters. + # @param rbacrolebinding [::Google::Cloud::GkeHub::V1::RBACRoleBinding, ::Hash] + # Required. The rbacrolebindings to generate the YAML for. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::GkeHub::V1::GenerateMembershipRBACRoleBindingYAMLResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GkeHub::V1::GenerateMembershipRBACRoleBindingYAMLResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_hub/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeHub::V1::GenerateMembershipRBACRoleBindingYAMLRequest.new + # + # # Call the generate_membership_rbac_role_binding_yaml method. + # result = client.generate_membership_rbac_role_binding_yaml request + # + # # The returned object is of type Google::Cloud::GkeHub::V1::GenerateMembershipRBACRoleBindingYAMLResponse. + # p result + # + def generate_membership_rbac_role_binding_yaml request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::GenerateMembershipRBACRoleBindingYAMLRequest + + # 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.generate_membership_rbac_role_binding_yaml.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::GkeHub::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.generate_membership_rbac_role_binding_yaml.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.generate_membership_rbac_role_binding_yaml.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gke_hub_stub.generate_membership_rbac_role_binding_yaml 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 GkeHub REST API. + # + # This class represents the configuration for GkeHub 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::GkeHub::V1::GkeHub::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_memberships to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_memberships.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_memberships.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. + # * `: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 = "gkehub.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the GkeHub 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. # * `:retry_codes` (*type:* `Array`) - The error codes that should # trigger a retry. # @@ -1524,6 +4503,11 @@ class Rpcs # attr_reader :list_memberships ## + # RPC-specific configuration for `list_bound_memberships` + # @return [::Gapic::Config::Method] + # + attr_reader :list_bound_memberships + ## # RPC-specific configuration for `list_features` # @return [::Gapic::Config::Method] # @@ -1573,11 +4557,173 @@ class Rpcs # @return [::Gapic::Config::Method] # attr_reader :generate_connect_manifest + ## + # RPC-specific configuration for `create_fleet` + # @return [::Gapic::Config::Method] + # + attr_reader :create_fleet + ## + # RPC-specific configuration for `get_fleet` + # @return [::Gapic::Config::Method] + # + attr_reader :get_fleet + ## + # RPC-specific configuration for `update_fleet` + # @return [::Gapic::Config::Method] + # + attr_reader :update_fleet + ## + # RPC-specific configuration for `delete_fleet` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_fleet + ## + # RPC-specific configuration for `list_fleets` + # @return [::Gapic::Config::Method] + # + attr_reader :list_fleets + ## + # RPC-specific configuration for `get_scope_namespace` + # @return [::Gapic::Config::Method] + # + attr_reader :get_scope_namespace + ## + # RPC-specific configuration for `create_scope_namespace` + # @return [::Gapic::Config::Method] + # + attr_reader :create_scope_namespace + ## + # RPC-specific configuration for `update_scope_namespace` + # @return [::Gapic::Config::Method] + # + attr_reader :update_scope_namespace + ## + # RPC-specific configuration for `delete_scope_namespace` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_scope_namespace + ## + # RPC-specific configuration for `list_scope_namespaces` + # @return [::Gapic::Config::Method] + # + attr_reader :list_scope_namespaces + ## + # RPC-specific configuration for `get_scope_rbac_role_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :get_scope_rbac_role_binding + ## + # RPC-specific configuration for `create_scope_rbac_role_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :create_scope_rbac_role_binding + ## + # RPC-specific configuration for `update_scope_rbac_role_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :update_scope_rbac_role_binding + ## + # RPC-specific configuration for `delete_scope_rbac_role_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_scope_rbac_role_binding + ## + # RPC-specific configuration for `list_scope_rbac_role_bindings` + # @return [::Gapic::Config::Method] + # + attr_reader :list_scope_rbac_role_bindings + ## + # RPC-specific configuration for `get_scope` + # @return [::Gapic::Config::Method] + # + attr_reader :get_scope + ## + # RPC-specific configuration for `create_scope` + # @return [::Gapic::Config::Method] + # + attr_reader :create_scope + ## + # RPC-specific configuration for `update_scope` + # @return [::Gapic::Config::Method] + # + attr_reader :update_scope + ## + # RPC-specific configuration for `delete_scope` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_scope + ## + # RPC-specific configuration for `list_scopes` + # @return [::Gapic::Config::Method] + # + attr_reader :list_scopes + ## + # RPC-specific configuration for `list_permitted_scopes` + # @return [::Gapic::Config::Method] + # + attr_reader :list_permitted_scopes + ## + # RPC-specific configuration for `get_membership_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :get_membership_binding + ## + # RPC-specific configuration for `create_membership_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :create_membership_binding + ## + # RPC-specific configuration for `update_membership_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :update_membership_binding + ## + # RPC-specific configuration for `delete_membership_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_membership_binding + ## + # RPC-specific configuration for `list_membership_bindings` + # @return [::Gapic::Config::Method] + # + attr_reader :list_membership_bindings + ## + # RPC-specific configuration for `get_membership_rbac_role_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :get_membership_rbac_role_binding + ## + # RPC-specific configuration for `create_membership_rbac_role_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :create_membership_rbac_role_binding + ## + # RPC-specific configuration for `update_membership_rbac_role_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :update_membership_rbac_role_binding + ## + # RPC-specific configuration for `delete_membership_rbac_role_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_membership_rbac_role_binding + ## + # RPC-specific configuration for `list_membership_rbac_role_bindings` + # @return [::Gapic::Config::Method] + # + attr_reader :list_membership_rbac_role_bindings + ## + # RPC-specific configuration for `generate_membership_rbac_role_binding_yaml` + # @return [::Gapic::Config::Method] + # + attr_reader :generate_membership_rbac_role_binding_yaml # @private def initialize parent_rpcs = nil list_memberships_config = parent_rpcs.list_memberships if parent_rpcs.respond_to? :list_memberships @list_memberships = ::Gapic::Config::Method.new list_memberships_config + list_bound_memberships_config = parent_rpcs.list_bound_memberships if parent_rpcs.respond_to? :list_bound_memberships + @list_bound_memberships = ::Gapic::Config::Method.new list_bound_memberships_config list_features_config = parent_rpcs.list_features if parent_rpcs.respond_to? :list_features @list_features = ::Gapic::Config::Method.new list_features_config get_membership_config = parent_rpcs.get_membership if parent_rpcs.respond_to? :get_membership @@ -1598,6 +4744,70 @@ def initialize parent_rpcs = nil @update_feature = ::Gapic::Config::Method.new update_feature_config generate_connect_manifest_config = parent_rpcs.generate_connect_manifest if parent_rpcs.respond_to? :generate_connect_manifest @generate_connect_manifest = ::Gapic::Config::Method.new generate_connect_manifest_config + create_fleet_config = parent_rpcs.create_fleet if parent_rpcs.respond_to? :create_fleet + @create_fleet = ::Gapic::Config::Method.new create_fleet_config + get_fleet_config = parent_rpcs.get_fleet if parent_rpcs.respond_to? :get_fleet + @get_fleet = ::Gapic::Config::Method.new get_fleet_config + update_fleet_config = parent_rpcs.update_fleet if parent_rpcs.respond_to? :update_fleet + @update_fleet = ::Gapic::Config::Method.new update_fleet_config + delete_fleet_config = parent_rpcs.delete_fleet if parent_rpcs.respond_to? :delete_fleet + @delete_fleet = ::Gapic::Config::Method.new delete_fleet_config + list_fleets_config = parent_rpcs.list_fleets if parent_rpcs.respond_to? :list_fleets + @list_fleets = ::Gapic::Config::Method.new list_fleets_config + get_scope_namespace_config = parent_rpcs.get_scope_namespace if parent_rpcs.respond_to? :get_scope_namespace + @get_scope_namespace = ::Gapic::Config::Method.new get_scope_namespace_config + create_scope_namespace_config = parent_rpcs.create_scope_namespace if parent_rpcs.respond_to? :create_scope_namespace + @create_scope_namespace = ::Gapic::Config::Method.new create_scope_namespace_config + update_scope_namespace_config = parent_rpcs.update_scope_namespace if parent_rpcs.respond_to? :update_scope_namespace + @update_scope_namespace = ::Gapic::Config::Method.new update_scope_namespace_config + delete_scope_namespace_config = parent_rpcs.delete_scope_namespace if parent_rpcs.respond_to? :delete_scope_namespace + @delete_scope_namespace = ::Gapic::Config::Method.new delete_scope_namespace_config + list_scope_namespaces_config = parent_rpcs.list_scope_namespaces if parent_rpcs.respond_to? :list_scope_namespaces + @list_scope_namespaces = ::Gapic::Config::Method.new list_scope_namespaces_config + get_scope_rbac_role_binding_config = parent_rpcs.get_scope_rbac_role_binding if parent_rpcs.respond_to? :get_scope_rbac_role_binding + @get_scope_rbac_role_binding = ::Gapic::Config::Method.new get_scope_rbac_role_binding_config + create_scope_rbac_role_binding_config = parent_rpcs.create_scope_rbac_role_binding if parent_rpcs.respond_to? :create_scope_rbac_role_binding + @create_scope_rbac_role_binding = ::Gapic::Config::Method.new create_scope_rbac_role_binding_config + update_scope_rbac_role_binding_config = parent_rpcs.update_scope_rbac_role_binding if parent_rpcs.respond_to? :update_scope_rbac_role_binding + @update_scope_rbac_role_binding = ::Gapic::Config::Method.new update_scope_rbac_role_binding_config + delete_scope_rbac_role_binding_config = parent_rpcs.delete_scope_rbac_role_binding if parent_rpcs.respond_to? :delete_scope_rbac_role_binding + @delete_scope_rbac_role_binding = ::Gapic::Config::Method.new delete_scope_rbac_role_binding_config + list_scope_rbac_role_bindings_config = parent_rpcs.list_scope_rbac_role_bindings if parent_rpcs.respond_to? :list_scope_rbac_role_bindings + @list_scope_rbac_role_bindings = ::Gapic::Config::Method.new list_scope_rbac_role_bindings_config + get_scope_config = parent_rpcs.get_scope if parent_rpcs.respond_to? :get_scope + @get_scope = ::Gapic::Config::Method.new get_scope_config + create_scope_config = parent_rpcs.create_scope if parent_rpcs.respond_to? :create_scope + @create_scope = ::Gapic::Config::Method.new create_scope_config + update_scope_config = parent_rpcs.update_scope if parent_rpcs.respond_to? :update_scope + @update_scope = ::Gapic::Config::Method.new update_scope_config + delete_scope_config = parent_rpcs.delete_scope if parent_rpcs.respond_to? :delete_scope + @delete_scope = ::Gapic::Config::Method.new delete_scope_config + list_scopes_config = parent_rpcs.list_scopes if parent_rpcs.respond_to? :list_scopes + @list_scopes = ::Gapic::Config::Method.new list_scopes_config + list_permitted_scopes_config = parent_rpcs.list_permitted_scopes if parent_rpcs.respond_to? :list_permitted_scopes + @list_permitted_scopes = ::Gapic::Config::Method.new list_permitted_scopes_config + get_membership_binding_config = parent_rpcs.get_membership_binding if parent_rpcs.respond_to? :get_membership_binding + @get_membership_binding = ::Gapic::Config::Method.new get_membership_binding_config + create_membership_binding_config = parent_rpcs.create_membership_binding if parent_rpcs.respond_to? :create_membership_binding + @create_membership_binding = ::Gapic::Config::Method.new create_membership_binding_config + update_membership_binding_config = parent_rpcs.update_membership_binding if parent_rpcs.respond_to? :update_membership_binding + @update_membership_binding = ::Gapic::Config::Method.new update_membership_binding_config + delete_membership_binding_config = parent_rpcs.delete_membership_binding if parent_rpcs.respond_to? :delete_membership_binding + @delete_membership_binding = ::Gapic::Config::Method.new delete_membership_binding_config + list_membership_bindings_config = parent_rpcs.list_membership_bindings if parent_rpcs.respond_to? :list_membership_bindings + @list_membership_bindings = ::Gapic::Config::Method.new list_membership_bindings_config + get_membership_rbac_role_binding_config = parent_rpcs.get_membership_rbac_role_binding if parent_rpcs.respond_to? :get_membership_rbac_role_binding + @get_membership_rbac_role_binding = ::Gapic::Config::Method.new get_membership_rbac_role_binding_config + create_membership_rbac_role_binding_config = parent_rpcs.create_membership_rbac_role_binding if parent_rpcs.respond_to? :create_membership_rbac_role_binding + @create_membership_rbac_role_binding = ::Gapic::Config::Method.new create_membership_rbac_role_binding_config + update_membership_rbac_role_binding_config = parent_rpcs.update_membership_rbac_role_binding if parent_rpcs.respond_to? :update_membership_rbac_role_binding + @update_membership_rbac_role_binding = ::Gapic::Config::Method.new update_membership_rbac_role_binding_config + delete_membership_rbac_role_binding_config = parent_rpcs.delete_membership_rbac_role_binding if parent_rpcs.respond_to? :delete_membership_rbac_role_binding + @delete_membership_rbac_role_binding = ::Gapic::Config::Method.new delete_membership_rbac_role_binding_config + list_membership_rbac_role_bindings_config = parent_rpcs.list_membership_rbac_role_bindings if parent_rpcs.respond_to? :list_membership_rbac_role_bindings + @list_membership_rbac_role_bindings = ::Gapic::Config::Method.new list_membership_rbac_role_bindings_config + generate_membership_rbac_role_binding_yaml_config = parent_rpcs.generate_membership_rbac_role_binding_yaml if parent_rpcs.respond_to? :generate_membership_rbac_role_binding_yaml + @generate_membership_rbac_role_binding_yaml = ::Gapic::Config::Method.new generate_membership_rbac_role_binding_yaml_config yield self if block_given? end diff --git a/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub/rest/service_stub.rb b/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub/rest/service_stub.rb index 394941422e6f..5c59d711a241 100644 --- a/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub/rest/service_stub.rb +++ b/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub/rest/service_stub.rb @@ -113,6 +113,46 @@ def list_memberships request_pb, options = nil end end + ## + # Baseline implementation for the list_bound_memberships REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::ListBoundMembershipsRequest] + # 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::GkeHub::V1::ListBoundMembershipsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GkeHub::V1::ListBoundMembershipsResponse] + # A result object deserialized from the server's reply + def list_bound_memberships request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_bound_memberships_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_bound_memberships", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::GkeHub::V1::ListBoundMembershipsResponse.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_features REST call # @@ -514,149 +554,1843 @@ def generate_connect_manifest request_pb, options = nil end ## - # @private - # - # GRPC transcoding helper method for the list_memberships REST call + # Baseline implementation for the create_fleet REST call # - # @param request_pb [::Google::Cloud::GkeHub::V1::ListMembershipsRequest] + # @param request_pb [::Google::Cloud::GkeHub::V1::CreateFleetRequest] # 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_memberships_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/memberships", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # - # GRPC transcoding helper method for the list_features REST call + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @param request_pb [::Google::Cloud::GkeHub::V1::ListFeaturesRequest] - # 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_features_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/features", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_fleet request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_fleet_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_fleet", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end end ## - # @private + # Baseline implementation for the get_fleet REST call # - # GRPC transcoding helper method for the get_membership REST call - # - # @param request_pb [::Google::Cloud::GkeHub::V1::GetMembershipRequest] + # @param request_pb [::Google::Cloud::GkeHub::V1::GetFleetRequest] # 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_membership_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/memberships/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # - # GRPC transcoding helper method for the get_feature REST call + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::GkeHub::V1::Fleet] + # @yieldparam operation [::Gapic::Rest::TransportOperation] # - # @param request_pb [::Google::Cloud::GkeHub::V1::GetFeatureRequest] - # 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_feature_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/features/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb + # @return [::Google::Cloud::GkeHub::V1::Fleet] + # A result object deserialized from the server's reply + def get_fleet request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_fleet_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_fleet", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::GkeHub::V1::Fleet.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end end ## - # @private + # Baseline implementation for the update_fleet REST call # - # GRPC transcoding helper method for the create_membership REST call - # - # @param request_pb [::Google::Cloud::GkeHub::V1::CreateMembershipRequest] + # @param request_pb [::Google::Cloud::GkeHub::V1::UpdateFleetRequest] # 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_membership_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/memberships", - body: "resource", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb + # @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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_fleet request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_fleet_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_fleet", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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 create_feature REST call + # Baseline implementation for the delete_fleet REST call # - # @param request_pb [::Google::Cloud::GkeHub::V1::CreateFeatureRequest] + # @param request_pb [::Google::Cloud::GkeHub::V1::DeleteFleetRequest] # 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_feature_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/features", - body: "resource", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb + # @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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_fleet request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_fleet_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_fleet", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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 delete_membership REST call + # Baseline implementation for the list_fleets REST call # - # @param request_pb [::Google::Cloud::GkeHub::V1::DeleteMembershipRequest] + # @param request_pb [::Google::Cloud::GkeHub::V1::ListFleetsRequest] # 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_membership_request request_pb + # @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::GkeHub::V1::ListFleetsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GkeHub::V1::ListFleetsResponse] + # A result object deserialized from the server's reply + def list_fleets request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_fleets_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_fleets", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::GkeHub::V1::ListFleetsResponse.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_scope_namespace REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::GetScopeNamespaceRequest] + # 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::GkeHub::V1::Namespace] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GkeHub::V1::Namespace] + # A result object deserialized from the server's reply + def get_scope_namespace request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_scope_namespace_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_scope_namespace", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::GkeHub::V1::Namespace.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_scope_namespace REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::CreateScopeNamespaceRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_scope_namespace request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_scope_namespace_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_scope_namespace", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_scope_namespace REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::UpdateScopeNamespaceRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_scope_namespace request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_scope_namespace_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_scope_namespace", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_scope_namespace REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::DeleteScopeNamespaceRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_scope_namespace request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_scope_namespace_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_scope_namespace", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_scope_namespaces REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::ListScopeNamespacesRequest] + # 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::GkeHub::V1::ListScopeNamespacesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GkeHub::V1::ListScopeNamespacesResponse] + # A result object deserialized from the server's reply + def list_scope_namespaces request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_scope_namespaces_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_scope_namespaces", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::GkeHub::V1::ListScopeNamespacesResponse.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_scope_rbac_role_binding REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::GetScopeRBACRoleBindingRequest] + # 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::GkeHub::V1::RBACRoleBinding] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GkeHub::V1::RBACRoleBinding] + # A result object deserialized from the server's reply + def get_scope_rbac_role_binding request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_scope_rbac_role_binding_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_scope_rbac_role_binding", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::GkeHub::V1::RBACRoleBinding.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_scope_rbac_role_binding REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::CreateScopeRBACRoleBindingRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_scope_rbac_role_binding request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_scope_rbac_role_binding_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_scope_rbac_role_binding", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_scope_rbac_role_binding REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::UpdateScopeRBACRoleBindingRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_scope_rbac_role_binding request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_scope_rbac_role_binding_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_scope_rbac_role_binding", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_scope_rbac_role_binding REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::DeleteScopeRBACRoleBindingRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_scope_rbac_role_binding request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_scope_rbac_role_binding_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_scope_rbac_role_binding", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_scope_rbac_role_bindings REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::ListScopeRBACRoleBindingsRequest] + # 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::GkeHub::V1::ListScopeRBACRoleBindingsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GkeHub::V1::ListScopeRBACRoleBindingsResponse] + # A result object deserialized from the server's reply + def list_scope_rbac_role_bindings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_scope_rbac_role_bindings_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_scope_rbac_role_bindings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::GkeHub::V1::ListScopeRBACRoleBindingsResponse.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_scope REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::GetScopeRequest] + # 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::GkeHub::V1::Scope] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GkeHub::V1::Scope] + # A result object deserialized from the server's reply + def get_scope request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_scope_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_scope", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::GkeHub::V1::Scope.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_scope REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::CreateScopeRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_scope request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_scope_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_scope", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_scope REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::UpdateScopeRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_scope request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_scope_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_scope", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_scope REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::DeleteScopeRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_scope request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_scope_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_scope", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_scopes REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::ListScopesRequest] + # 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::GkeHub::V1::ListScopesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GkeHub::V1::ListScopesResponse] + # A result object deserialized from the server's reply + def list_scopes request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_scopes_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_scopes", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::GkeHub::V1::ListScopesResponse.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_permitted_scopes REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::ListPermittedScopesRequest] + # 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::GkeHub::V1::ListPermittedScopesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GkeHub::V1::ListPermittedScopesResponse] + # A result object deserialized from the server's reply + def list_permitted_scopes request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_permitted_scopes_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_permitted_scopes", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::GkeHub::V1::ListPermittedScopesResponse.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_membership_binding REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::GetMembershipBindingRequest] + # 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::GkeHub::V1::MembershipBinding] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GkeHub::V1::MembershipBinding] + # A result object deserialized from the server's reply + def get_membership_binding request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_membership_binding_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_membership_binding", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::GkeHub::V1::MembershipBinding.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_membership_binding REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::CreateMembershipBindingRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_membership_binding request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_membership_binding_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_membership_binding", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_membership_binding REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::UpdateMembershipBindingRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_membership_binding request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_membership_binding_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_membership_binding", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_membership_binding REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::DeleteMembershipBindingRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_membership_binding request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_membership_binding_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_membership_binding", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_membership_bindings REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::ListMembershipBindingsRequest] + # 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::GkeHub::V1::ListMembershipBindingsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GkeHub::V1::ListMembershipBindingsResponse] + # A result object deserialized from the server's reply + def list_membership_bindings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_membership_bindings_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_membership_bindings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::GkeHub::V1::ListMembershipBindingsResponse.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_membership_rbac_role_binding REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::GetMembershipRBACRoleBindingRequest] + # 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::GkeHub::V1::RBACRoleBinding] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GkeHub::V1::RBACRoleBinding] + # A result object deserialized from the server's reply + def get_membership_rbac_role_binding request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_membership_rbac_role_binding_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_membership_rbac_role_binding", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::GkeHub::V1::RBACRoleBinding.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_membership_rbac_role_binding REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::CreateMembershipRBACRoleBindingRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def create_membership_rbac_role_binding request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_membership_rbac_role_binding_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_membership_rbac_role_binding", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_membership_rbac_role_binding REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::UpdateMembershipRBACRoleBindingRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def update_membership_rbac_role_binding request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_membership_rbac_role_binding_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_membership_rbac_role_binding", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_membership_rbac_role_binding REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::DeleteMembershipRBACRoleBindingRequest] + # 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::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def delete_membership_rbac_role_binding request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_membership_rbac_role_binding_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_membership_rbac_role_binding", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_membership_rbac_role_bindings REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::ListMembershipRBACRoleBindingsRequest] + # 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::GkeHub::V1::ListMembershipRBACRoleBindingsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GkeHub::V1::ListMembershipRBACRoleBindingsResponse] + # A result object deserialized from the server's reply + def list_membership_rbac_role_bindings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_membership_rbac_role_bindings_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_membership_rbac_role_bindings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::GkeHub::V1::ListMembershipRBACRoleBindingsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the generate_membership_rbac_role_binding_yaml REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::GenerateMembershipRBACRoleBindingYAMLRequest] + # 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::GkeHub::V1::GenerateMembershipRBACRoleBindingYAMLResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GkeHub::V1::GenerateMembershipRBACRoleBindingYAMLResponse] + # A result object deserialized from the server's reply + def generate_membership_rbac_role_binding_yaml request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_generate_membership_rbac_role_binding_yaml_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: "generate_membership_rbac_role_binding_yaml", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::GkeHub::V1::GenerateMembershipRBACRoleBindingYAMLResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_memberships REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::ListMembershipsRequest] + # 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_memberships_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/memberships", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_bound_memberships REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::ListBoundMembershipsRequest] + # 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_bound_memberships_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{scope_name}:listMemberships", + matches: [ + ["scope_name", %r{^projects/[^/]+/locations/[^/]+/scopes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_features REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::ListFeaturesRequest] + # 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_features_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/features", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_membership REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::GetMembershipRequest] + # 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_membership_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/memberships/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_feature REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::GetFeatureRequest] + # 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_feature_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/features/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_membership REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::CreateMembershipRequest] + # 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_membership_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/memberships", + body: "resource", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_feature REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::CreateFeatureRequest] + # 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_feature_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/features", + body: "resource", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_membership REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::DeleteMembershipRequest] + # 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_membership_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/memberships/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_feature REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::DeleteFeatureRequest] + # 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_feature_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/features/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_membership REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::UpdateMembershipRequest] + # 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_membership_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{name}", + body: "resource", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/memberships/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_feature REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::UpdateFeatureRequest] + # 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_feature_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{name}", + body: "resource", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/features/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the generate_connect_manifest REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::GenerateConnectManifestRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_generate_connect_manifest_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}:generateConnectManifest", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/memberships/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_fleet REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::CreateFleetRequest] + # 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_fleet_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/fleets", + body: "fleet", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_fleet REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::GetFleetRequest] + # 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_fleet_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/fleets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_fleet REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::UpdateFleetRequest] + # 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_fleet_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{fleet.name}", + body: "fleet", + matches: [ + ["fleet.name", %r{^projects/[^/]+/locations/[^/]+/fleets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_fleet REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::DeleteFleetRequest] + # 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_fleet_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/fleets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_fleets REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::ListFleetsRequest] + # 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_fleets_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/fleets", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/fleets", + matches: [ + ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_scope_namespace REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::GetScopeNamespaceRequest] + # 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_scope_namespace_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/scopes/[^/]+/namespaces/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_scope_namespace REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::CreateScopeNamespaceRequest] + # 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_scope_namespace_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/namespaces", + body: "scope_namespace", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/scopes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_scope_namespace REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::UpdateScopeNamespaceRequest] + # 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_scope_namespace_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{scope_namespace.name}", + body: "scope_namespace", + matches: [ + ["scope_namespace.name", %r{^projects/[^/]+/locations/[^/]+/scopes/[^/]+/namespaces/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_scope_namespace REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::DeleteScopeNamespaceRequest] + # 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_scope_namespace_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/scopes/[^/]+/namespaces/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_scope_namespaces REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::ListScopeNamespacesRequest] + # 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_scope_namespaces_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/namespaces", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/scopes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_scope_rbac_role_binding REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::GetScopeRBACRoleBindingRequest] + # 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_scope_rbac_role_binding_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/scopes/[^/]+/rbacrolebindings/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_scope_rbac_role_binding REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::CreateScopeRBACRoleBindingRequest] + # 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_scope_rbac_role_binding_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/rbacrolebindings", + body: "rbacrolebinding", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/scopes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_scope_rbac_role_binding REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::UpdateScopeRBACRoleBindingRequest] + # 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_scope_rbac_role_binding_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{rbacrolebinding.name}", + body: "rbacrolebinding", + matches: [ + ["rbacrolebinding.name", %r{^projects/[^/]+/locations/[^/]+/scopes/[^/]+/rbacrolebindings/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_scope_rbac_role_binding REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::DeleteScopeRBACRoleBindingRequest] + # 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_scope_rbac_role_binding_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :delete, uri_template: "/v1/{name}", matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/memberships/[^/]+/?$}, false] + ["name", %r{^projects/[^/]+/locations/[^/]+/scopes/[^/]+/rbacrolebindings/[^/]+/?$}, false] ] ) transcoder.transcode request_pb @@ -665,19 +2399,105 @@ def self.transcode_delete_membership_request request_pb ## # @private # - # GRPC transcoding helper method for the delete_feature REST call + # GRPC transcoding helper method for the list_scope_rbac_role_bindings REST call # - # @param request_pb [::Google::Cloud::GkeHub::V1::DeleteFeatureRequest] + # @param request_pb [::Google::Cloud::GkeHub::V1::ListScopeRBACRoleBindingsRequest] # 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_feature_request request_pb + def self.transcode_list_scope_rbac_role_bindings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/rbacrolebindings", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/scopes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_scope REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::GetScopeRequest] + # 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_scope_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/scopes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_scope REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::CreateScopeRequest] + # 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_scope_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/scopes", + body: "scope", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_scope REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::UpdateScopeRequest] + # 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_scope_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{scope.name}", + body: "scope", + matches: [ + ["scope.name", %r{^projects/[^/]+/locations/[^/]+/scopes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_scope REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::DeleteScopeRequest] + # 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_scope_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :delete, uri_template: "/v1/{name}", matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/features/[^/]+/?$}, false] + ["name", %r{^projects/[^/]+/locations/[^/]+/scopes/[^/]+/?$}, false] ] ) transcoder.transcode request_pb @@ -686,20 +2506,126 @@ def self.transcode_delete_feature_request request_pb ## # @private # - # GRPC transcoding helper method for the update_membership REST call + # GRPC transcoding helper method for the list_scopes REST call # - # @param request_pb [::Google::Cloud::GkeHub::V1::UpdateMembershipRequest] + # @param request_pb [::Google::Cloud::GkeHub::V1::ListScopesRequest] # 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_membership_request request_pb + def self.transcode_list_scopes_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/scopes", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_permitted_scopes REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::ListPermittedScopesRequest] + # 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_permitted_scopes_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/scopes:listPermitted", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_membership_binding REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::GetMembershipBindingRequest] + # 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_membership_binding_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/memberships/[^/]+/bindings/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_membership_binding REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::CreateMembershipBindingRequest] + # 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_membership_binding_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/bindings", + body: "membership_binding", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/memberships/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_membership_binding REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::UpdateMembershipBindingRequest] + # 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_membership_binding_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :patch, + uri_template: "/v1/{membership_binding.name}", + body: "membership_binding", + matches: [ + ["membership_binding.name", %r{^projects/[^/]+/locations/[^/]+/memberships/[^/]+/bindings/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_membership_binding REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::DeleteMembershipBindingRequest] + # 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_membership_binding_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, uri_template: "/v1/{name}", - body: "resource", matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/memberships/[^/]+/?$}, false] + ["name", %r{^projects/[^/]+/locations/[^/]+/memberships/[^/]+/bindings/[^/]+/?$}, false] ] ) transcoder.transcode request_pb @@ -708,20 +2634,105 @@ def self.transcode_update_membership_request request_pb ## # @private # - # GRPC transcoding helper method for the update_feature REST call + # GRPC transcoding helper method for the list_membership_bindings REST call # - # @param request_pb [::Google::Cloud::GkeHub::V1::UpdateFeatureRequest] + # @param request_pb [::Google::Cloud::GkeHub::V1::ListMembershipBindingsRequest] # 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_feature_request request_pb + def self.transcode_list_membership_bindings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/bindings", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/memberships/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_membership_rbac_role_binding REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::GetMembershipRBACRoleBindingRequest] + # 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_membership_rbac_role_binding_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/memberships/[^/]+/rbacrolebindings/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_membership_rbac_role_binding REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::CreateMembershipRBACRoleBindingRequest] + # 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_membership_rbac_role_binding_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/rbacrolebindings", + body: "rbacrolebinding", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/memberships/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_membership_rbac_role_binding REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::UpdateMembershipRBACRoleBindingRequest] + # 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_membership_rbac_role_binding_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :patch, + uri_template: "/v1/{rbacrolebinding.name}", + body: "rbacrolebinding", + matches: [ + ["rbacrolebinding.name", %r{^projects/[^/]+/locations/[^/]+/memberships/[^/]+/rbacrolebindings/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_membership_rbac_role_binding REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::DeleteMembershipRBACRoleBindingRequest] + # 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_membership_rbac_role_binding_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, uri_template: "/v1/{name}", - body: "resource", matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/features/[^/]+/?$}, false] + ["name", %r{^projects/[^/]+/locations/[^/]+/memberships/[^/]+/rbacrolebindings/[^/]+/?$}, false] ] ) transcoder.transcode request_pb @@ -730,19 +2741,41 @@ def self.transcode_update_feature_request request_pb ## # @private # - # GRPC transcoding helper method for the generate_connect_manifest REST call + # GRPC transcoding helper method for the list_membership_rbac_role_bindings REST call # - # @param request_pb [::Google::Cloud::GkeHub::V1::GenerateConnectManifestRequest] + # @param request_pb [::Google::Cloud::GkeHub::V1::ListMembershipRBACRoleBindingsRequest] # A request object representing the call parameters. Required. # @return [Array(String, [String, nil], Hash{String => String})] # Uri, Body, Query string parameters - def self.transcode_generate_connect_manifest_request request_pb + def self.transcode_list_membership_rbac_role_bindings_request request_pb transcoder = Gapic::Rest::GrpcTranscoder.new .with_bindings( uri_method: :get, - uri_template: "/v1/{name}:generateConnectManifest", + uri_template: "/v1/{parent}/rbacrolebindings", matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/memberships/[^/]+/?$}, false] + ["parent", %r{^projects/[^/]+/locations/[^/]+/memberships/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the generate_membership_rbac_role_binding_yaml REST call + # + # @param request_pb [::Google::Cloud::GkeHub::V1::GenerateMembershipRBACRoleBindingYAMLRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_generate_membership_rbac_role_binding_yaml_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/rbacrolebindings:generateMembershipRBACRoleBindingYAML", + body: "rbacrolebinding", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/memberships/[^/]+/?$}, false] ] ) transcoder.transcode request_pb diff --git a/google-cloud-gke_hub-v1/lib/google/cloud/gkehub/v1/configmanagement/configmanagement_pb.rb b/google-cloud-gke_hub-v1/lib/google/cloud/gkehub/v1/configmanagement/configmanagement_pb.rb deleted file mode 100644 index 70d524437a2f..000000000000 --- a/google-cloud-gke_hub-v1/lib/google/cloud/gkehub/v1/configmanagement/configmanagement_pb.rb +++ /dev/null @@ -1,74 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/gkehub/v1/configmanagement/configmanagement.proto - -require 'google/protobuf' - -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n>google/cloud/gkehub/v1/configmanagement/configmanagement.proto\x12\'google.cloud.gkehub.configmanagement.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"\xe6\x03\n\x0fMembershipState\x12\x14\n\x0c\x63luster_name\x18\x01 \x01(\t\x12P\n\x0fmembership_spec\x18\x02 \x01(\x0b\x32\x37.google.cloud.gkehub.configmanagement.v1.MembershipSpec\x12N\n\x0eoperator_state\x18\x03 \x01(\x0b\x32\x36.google.cloud.gkehub.configmanagement.v1.OperatorState\x12S\n\x11\x63onfig_sync_state\x18\x04 \x01(\x0b\x32\x38.google.cloud.gkehub.configmanagement.v1.ConfigSyncState\x12_\n\x17policy_controller_state\x18\x05 \x01(\x0b\x32>.google.cloud.gkehub.configmanagement.v1.PolicyControllerState\x12\x65\n\x1ahierarchy_controller_state\x18\x07 \x01(\x0b\x32\x41.google.cloud.gkehub.configmanagement.v1.HierarchyControllerState\"\xe7\x03\n\x0eMembershipSpec\x12H\n\x0b\x63onfig_sync\x18\x01 \x01(\x0b\x32\x33.google.cloud.gkehub.configmanagement.v1.ConfigSync\x12T\n\x11policy_controller\x18\x02 \x01(\x0b\x32\x39.google.cloud.gkehub.configmanagement.v1.PolicyController\x12`\n\x14hierarchy_controller\x18\x04 \x01(\x0b\x32\x42.google.cloud.gkehub.configmanagement.v1.HierarchyControllerConfig\x12\x0f\n\x07version\x18\n \x01(\t\x12\x0f\n\x07\x63luster\x18\x0b \x01(\t\x12V\n\nmanagement\x18\x0c \x01(\x0e\x32\x42.google.cloud.gkehub.configmanagement.v1.MembershipSpec.Management\"Y\n\nManagement\x12\x1a\n\x16MANAGEMENT_UNSPECIFIED\x10\x00\x12\x18\n\x14MANAGEMENT_AUTOMATIC\x10\x01\x12\x15\n\x11MANAGEMENT_MANUAL\x10\x02\"\x89\x02\n\nConfigSync\x12?\n\x03git\x18\x07 \x01(\x0b\x32\x32.google.cloud.gkehub.configmanagement.v1.GitConfig\x12\x15\n\rsource_format\x18\x08 \x01(\t\x12\x14\n\x07\x65nabled\x18\n \x01(\x08H\x00\x88\x01\x01\x12\x15\n\rprevent_drift\x18\x0b \x01(\x08\x12?\n\x03oci\x18\x0c \x01(\x0b\x32\x32.google.cloud.gkehub.configmanagement.v1.OciConfig\x12)\n!metrics_gcp_service_account_email\x18\x0f \x01(\tB\n\n\x08_enabled\"\xbe\x01\n\tGitConfig\x12\x11\n\tsync_repo\x18\x01 \x01(\t\x12\x13\n\x0bsync_branch\x18\x02 \x01(\t\x12\x12\n\npolicy_dir\x18\x03 \x01(\t\x12\x16\n\x0esync_wait_secs\x18\x04 \x01(\x03\x12\x10\n\x08sync_rev\x18\x05 \x01(\t\x12\x13\n\x0bsecret_type\x18\x06 \x01(\t\x12\x13\n\x0bhttps_proxy\x18\x07 \x01(\t\x12!\n\x19gcp_service_account_email\x18\x08 \x01(\t\"\x82\x01\n\tOciConfig\x12\x11\n\tsync_repo\x18\x01 \x01(\t\x12\x12\n\npolicy_dir\x18\x02 \x01(\t\x12\x16\n\x0esync_wait_secs\x18\x03 \x01(\x03\x12\x13\n\x0bsecret_type\x18\x04 \x01(\t\x12!\n\x19gcp_service_account_email\x18\x05 \x01(\t\"\x89\x02\n\x10PolicyController\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\'\n\x1atemplate_library_installed\x18\x02 \x01(\x08H\x00\x88\x01\x01\x12#\n\x16\x61udit_interval_seconds\x18\x03 \x01(\x03H\x01\x88\x01\x01\x12\x1d\n\x15\x65xemptable_namespaces\x18\x04 \x03(\t\x12!\n\x19referential_rules_enabled\x18\x05 \x01(\x08\x12\x1a\n\x12log_denies_enabled\x18\x06 \x01(\x08\x42\x1d\n\x1b_template_library_installedB\x19\n\x17_audit_interval_seconds\"x\n\x19HierarchyControllerConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x1e\n\x16\x65nable_pod_tree_labels\x18\x02 \x01(\x08\x12*\n\"enable_hierarchical_resource_quota\x18\x03 \x01(\x08\"\xb8\x01\n\"HierarchyControllerDeploymentState\x12\x45\n\x03hnc\x18\x01 \x01(\x0e\x32\x38.google.cloud.gkehub.configmanagement.v1.DeploymentState\x12K\n\textension\x18\x02 \x01(\x0e\x32\x38.google.cloud.gkehub.configmanagement.v1.DeploymentState\"<\n\x1aHierarchyControllerVersion\x12\x0b\n\x03hnc\x18\x01 \x01(\t\x12\x11\n\textension\x18\x02 \x01(\t\"\xcc\x01\n\x18HierarchyControllerState\x12T\n\x07version\x18\x01 \x01(\x0b\x32\x43.google.cloud.gkehub.configmanagement.v1.HierarchyControllerVersion\x12Z\n\x05state\x18\x02 \x01(\x0b\x32K.google.cloud.gkehub.configmanagement.v1.HierarchyControllerDeploymentState\"\xbb\x01\n\rOperatorState\x12\x0f\n\x07version\x18\x01 \x01(\t\x12R\n\x10\x64\x65ployment_state\x18\x02 \x01(\x0e\x32\x38.google.cloud.gkehub.configmanagement.v1.DeploymentState\x12\x45\n\x06\x65rrors\x18\x03 \x03(\x0b\x32\x35.google.cloud.gkehub.configmanagement.v1.InstallError\"%\n\x0cInstallError\x12\x15\n\rerror_message\x18\x01 \x01(\t\"\xc4\x06\n\x0f\x43onfigSyncState\x12K\n\x07version\x18\x01 \x01(\x0b\x32:.google.cloud.gkehub.configmanagement.v1.ConfigSyncVersion\x12\\\n\x10\x64\x65ployment_state\x18\x02 \x01(\x0b\x32\x42.google.cloud.gkehub.configmanagement.v1.ConfigSyncDeploymentState\x12\x46\n\nsync_state\x18\x03 \x01(\x0b\x32\x32.google.cloud.gkehub.configmanagement.v1.SyncState\x12H\n\x06\x65rrors\x18\x04 \x03(\x0b\x32\x38.google.cloud.gkehub.configmanagement.v1.ConfigSyncError\x12W\n\x0crootsync_crd\x18\x05 \x01(\x0e\x32\x41.google.cloud.gkehub.configmanagement.v1.ConfigSyncState.CRDState\x12W\n\x0creposync_crd\x18\x06 \x01(\x0e\x32\x41.google.cloud.gkehub.configmanagement.v1.ConfigSyncState.CRDState\x12M\n\x05state\x18\x07 \x01(\x0e\x32>.google.cloud.gkehub.configmanagement.v1.ConfigSyncState.State\"h\n\x08\x43RDState\x12\x19\n\x15\x43RD_STATE_UNSPECIFIED\x10\x00\x12\x11\n\rNOT_INSTALLED\x10\x01\x12\r\n\tINSTALLED\x10\x02\x12\x0f\n\x0bTERMINATING\x10\x03\x12\x0e\n\nINSTALLING\x10\x04\"\x88\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x1d\n\x19\x43ONFIG_SYNC_NOT_INSTALLED\x10\x01\x12\x19\n\x15\x43ONFIG_SYNC_INSTALLED\x10\x02\x12\x15\n\x11\x43ONFIG_SYNC_ERROR\x10\x03\x12\x17\n\x13\x43ONFIG_SYNC_PENDING\x10\x04\"(\n\x0f\x43onfigSyncError\x12\x15\n\rerror_message\x18\x01 \x01(\t\"\xa8\x01\n\x11\x43onfigSyncVersion\x12\x10\n\x08importer\x18\x01 \x01(\t\x12\x0e\n\x06syncer\x18\x02 \x01(\t\x12\x10\n\x08git_sync\x18\x03 \x01(\t\x12\x0f\n\x07monitor\x18\x04 \x01(\t\x12\x1a\n\x12reconciler_manager\x18\x05 \x01(\t\x12\x17\n\x0froot_reconciler\x18\x06 \x01(\t\x12\x19\n\x11\x61\x64mission_webhook\x18\x07 \x01(\t\"\xc6\x04\n\x19\x43onfigSyncDeploymentState\x12J\n\x08importer\x18\x01 \x01(\x0e\x32\x38.google.cloud.gkehub.configmanagement.v1.DeploymentState\x12H\n\x06syncer\x18\x02 \x01(\x0e\x32\x38.google.cloud.gkehub.configmanagement.v1.DeploymentState\x12J\n\x08git_sync\x18\x03 \x01(\x0e\x32\x38.google.cloud.gkehub.configmanagement.v1.DeploymentState\x12I\n\x07monitor\x18\x04 \x01(\x0e\x32\x38.google.cloud.gkehub.configmanagement.v1.DeploymentState\x12T\n\x12reconciler_manager\x18\x05 \x01(\x0e\x32\x38.google.cloud.gkehub.configmanagement.v1.DeploymentState\x12Q\n\x0froot_reconciler\x18\x06 \x01(\x0e\x32\x38.google.cloud.gkehub.configmanagement.v1.DeploymentState\x12S\n\x11\x61\x64mission_webhook\x18\x07 \x01(\x0e\x32\x38.google.cloud.gkehub.configmanagement.v1.DeploymentState\"\xbb\x03\n\tSyncState\x12\x14\n\x0csource_token\x18\x01 \x01(\t\x12\x14\n\x0cimport_token\x18\x02 \x01(\t\x12\x12\n\nsync_token\x18\x03 \x01(\t\x12\x15\n\tlast_sync\x18\x04 \x01(\tB\x02\x18\x01\x12\x32\n\x0elast_sync_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12I\n\x04\x63ode\x18\x05 \x01(\x0e\x32;.google.cloud.gkehub.configmanagement.v1.SyncState.SyncCode\x12\x42\n\x06\x65rrors\x18\x06 \x03(\x0b\x32\x32.google.cloud.gkehub.configmanagement.v1.SyncError\"\x93\x01\n\x08SyncCode\x12\x19\n\x15SYNC_CODE_UNSPECIFIED\x10\x00\x12\n\n\x06SYNCED\x10\x01\x12\x0b\n\x07PENDING\x10\x02\x12\t\n\x05\x45RROR\x10\x03\x12\x12\n\x0eNOT_CONFIGURED\x10\x04\x12\x11\n\rNOT_INSTALLED\x10\x05\x12\x10\n\x0cUNAUTHORIZED\x10\x06\x12\x0f\n\x0bUNREACHABLE\x10\x07\"\x81\x01\n\tSyncError\x12\x0c\n\x04\x63ode\x18\x01 \x01(\t\x12\x15\n\rerror_message\x18\x02 \x01(\t\x12O\n\x0f\x65rror_resources\x18\x03 \x03(\x0b\x32\x36.google.cloud.gkehub.configmanagement.v1.ErrorResource\"\xa8\x01\n\rErrorResource\x12\x13\n\x0bsource_path\x18\x01 \x01(\t\x12\x15\n\rresource_name\x18\x02 \x01(\t\x12\x1a\n\x12resource_namespace\x18\x03 \x01(\t\x12O\n\x0cresource_gvk\x18\x04 \x01(\x0b\x32\x39.google.cloud.gkehub.configmanagement.v1.GroupVersionKind\"@\n\x10GroupVersionKind\x12\r\n\x05group\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\t\x12\x0c\n\x04kind\x18\x03 \x01(\t\"\xc8\x01\n\x15PolicyControllerState\x12Q\n\x07version\x18\x01 \x01(\x0b\x32@.google.cloud.gkehub.configmanagement.v1.PolicyControllerVersion\x12\\\n\x10\x64\x65ployment_state\x18\x02 \x01(\x0b\x32\x42.google.cloud.gkehub.configmanagement.v1.GatekeeperDeploymentState\"*\n\x17PolicyControllerVersion\x12\x0f\n\x07version\x18\x01 \x01(\t\"\xd6\x01\n\x19GatekeeperDeploymentState\x12\x65\n#gatekeeper_controller_manager_state\x18\x01 \x01(\x0e\x32\x38.google.cloud.gkehub.configmanagement.v1.DeploymentState\x12R\n\x10gatekeeper_audit\x18\x02 \x01(\x0e\x32\x38.google.cloud.gkehub.configmanagement.v1.DeploymentState*m\n\x0f\x44\x65ploymentState\x12 \n\x1c\x44\x45PLOYMENT_STATE_UNSPECIFIED\x10\x00\x12\x11\n\rNOT_INSTALLED\x10\x01\x12\r\n\tINSTALLED\x10\x02\x12\t\n\x05\x45RROR\x10\x03\x12\x0b\n\x07PENDING\x10\x04\x42\xa1\x02\n+com.google.cloud.gkehub.configmanagement.v1B\x15\x43onfigManagementProtoP\x01ZWcloud.google.com/go/gkehub/configmanagement/apiv1/configmanagementpb;configmanagementpb\xaa\x02\'Google.Cloud.GkeHub.ConfigManagement.V1\xca\x02\'Google\\Cloud\\GkeHub\\ConfigManagement\\V1\xea\x02+Google::Cloud::GkeHub::ConfigManagement::V1b\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module GkeHub - module ConfigManagement - module V1 - MembershipState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.configmanagement.v1.MembershipState").msgclass - MembershipSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.configmanagement.v1.MembershipSpec").msgclass - MembershipSpec::Management = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.configmanagement.v1.MembershipSpec.Management").enummodule - ConfigSync = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.configmanagement.v1.ConfigSync").msgclass - GitConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.configmanagement.v1.GitConfig").msgclass - OciConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.configmanagement.v1.OciConfig").msgclass - PolicyController = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.configmanagement.v1.PolicyController").msgclass - HierarchyControllerConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.configmanagement.v1.HierarchyControllerConfig").msgclass - HierarchyControllerDeploymentState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.configmanagement.v1.HierarchyControllerDeploymentState").msgclass - HierarchyControllerVersion = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.configmanagement.v1.HierarchyControllerVersion").msgclass - HierarchyControllerState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.configmanagement.v1.HierarchyControllerState").msgclass - OperatorState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.configmanagement.v1.OperatorState").msgclass - InstallError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.configmanagement.v1.InstallError").msgclass - ConfigSyncState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.configmanagement.v1.ConfigSyncState").msgclass - ConfigSyncState::CRDState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.configmanagement.v1.ConfigSyncState.CRDState").enummodule - ConfigSyncState::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.configmanagement.v1.ConfigSyncState.State").enummodule - ConfigSyncError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.configmanagement.v1.ConfigSyncError").msgclass - ConfigSyncVersion = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.configmanagement.v1.ConfigSyncVersion").msgclass - ConfigSyncDeploymentState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.configmanagement.v1.ConfigSyncDeploymentState").msgclass - SyncState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.configmanagement.v1.SyncState").msgclass - SyncState::SyncCode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.configmanagement.v1.SyncState.SyncCode").enummodule - SyncError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.configmanagement.v1.SyncError").msgclass - ErrorResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.configmanagement.v1.ErrorResource").msgclass - GroupVersionKind = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.configmanagement.v1.GroupVersionKind").msgclass - PolicyControllerState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.configmanagement.v1.PolicyControllerState").msgclass - PolicyControllerVersion = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.configmanagement.v1.PolicyControllerVersion").msgclass - GatekeeperDeploymentState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.configmanagement.v1.GatekeeperDeploymentState").msgclass - DeploymentState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.configmanagement.v1.DeploymentState").enummodule - end - end - end - end -end diff --git a/google-cloud-gke_hub-v1/lib/google/cloud/gkehub/v1/feature_pb.rb b/google-cloud-gke_hub-v1/lib/google/cloud/gkehub/v1/feature_pb.rb index 9e617b6a55ca..b7bc160f35dd 100644 --- a/google-cloud-gke_hub-v1/lib/google/cloud/gkehub/v1/feature_pb.rb +++ b/google-cloud-gke_hub-v1/lib/google/cloud/gkehub/v1/feature_pb.rb @@ -8,10 +8,11 @@ require 'google/api/resource_pb' require 'google/cloud/gkehub/v1/configmanagement/configmanagement_pb' require 'google/cloud/gkehub/v1/multiclusteringress/multiclusteringress_pb' +require 'google/cloud/gkehub/v1/rbacrolebindingactuation/rbacrolebindingactuation_pb' require 'google/protobuf/timestamp_pb' -descriptor_data = "\n$google/cloud/gkehub/v1/feature.proto\x12\x16google.cloud.gkehub.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a>google/cloud/gkehub/v1/configmanagement/configmanagement.proto\x1a\x44google/cloud/gkehub/v1/multiclusteringress/multiclusteringress.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xcf\x07\n\x07\x46\x65\x61ture\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12;\n\x06labels\x18\x02 \x03(\x0b\x32+.google.cloud.gkehub.v1.Feature.LabelsEntry\x12I\n\x0eresource_state\x18\x03 \x01(\x0b\x32,.google.cloud.gkehub.v1.FeatureResourceStateB\x03\xe0\x41\x03\x12<\n\x04spec\x18\x04 \x01(\x0b\x32).google.cloud.gkehub.v1.CommonFeatureSpecB\x03\xe0\x41\x01\x12S\n\x10membership_specs\x18\x05 \x03(\x0b\x32\x34.google.cloud.gkehub.v1.Feature.MembershipSpecsEntryB\x03\xe0\x41\x01\x12>\n\x05state\x18\x06 \x01(\x0b\x32*.google.cloud.gkehub.v1.CommonFeatureStateB\x03\xe0\x41\x03\x12U\n\x11membership_states\x18\x07 \x03(\x0b\x32\x35.google.cloud.gkehub.v1.Feature.MembershipStatesEntryB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x64\x65lete_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x65\n\x14MembershipSpecsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12<\n\x05value\x18\x02 \x01(\x0b\x32-.google.cloud.gkehub.v1.MembershipFeatureSpec:\x02\x38\x01\x1ag\n\x15MembershipStatesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12=\n\x05value\x18\x02 \x01(\x0b\x32..google.cloud.gkehub.v1.MembershipFeatureState:\x02\x38\x01:^\xea\x41[\n\x1dgkehub.googleapis.com/Feature\x12:projects/{project}/locations/{location}/features/{feature}\"\xc6\x01\n\x14\x46\x65\x61tureResourceState\x12\x41\n\x05state\x18\x01 \x01(\x0e\x32\x32.google.cloud.gkehub.v1.FeatureResourceState.State\"k\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x45NABLING\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\r\n\tDISABLING\x10\x03\x12\x0c\n\x08UPDATING\x10\x04\x12\x14\n\x10SERVICE_UPDATING\x10\x05\"\xcb\x01\n\x0c\x46\x65\x61tureState\x12\x37\n\x04\x63ode\x18\x01 \x01(\x0e\x32).google.cloud.gkehub.v1.FeatureState.Code\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12/\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"<\n\x04\x43ode\x12\x14\n\x10\x43ODE_UNSPECIFIED\x10\x00\x12\x06\n\x02OK\x10\x01\x12\x0b\n\x07WARNING\x10\x02\x12\t\n\x05\x45RROR\x10\x03\"{\n\x11\x43ommonFeatureSpec\x12V\n\x13multiclusteringress\x18\x66 \x01(\x0b\x32\x37.google.cloud.gkehub.multiclusteringress.v1.FeatureSpecH\x00\x42\x0e\n\x0c\x66\x65\x61ture_spec\"N\n\x12\x43ommonFeatureState\x12\x38\n\x05state\x18\x01 \x01(\x0b\x32$.google.cloud.gkehub.v1.FeatureStateB\x03\xe0\x41\x03\"|\n\x15MembershipFeatureSpec\x12S\n\x10\x63onfigmanagement\x18j \x01(\x0b\x32\x37.google.cloud.gkehub.configmanagement.v1.MembershipSpecH\x00\x42\x0e\n\x0c\x66\x65\x61ture_spec\"\xb4\x01\n\x16MembershipFeatureState\x12T\n\x10\x63onfigmanagement\x18j \x01(\x0b\x32\x38.google.cloud.gkehub.configmanagement.v1.MembershipStateH\x00\x12\x33\n\x05state\x18\x01 \x01(\x0b\x32$.google.cloud.gkehub.v1.FeatureStateB\x0f\n\rfeature_stateB\xae\x01\n\x1a\x63om.google.cloud.gkehub.v1B\x0c\x46\x65\x61tureProtoP\x01Z2cloud.google.com/go/gkehub/apiv1/gkehubpb;gkehubpb\xaa\x02\x16Google.Cloud.GkeHub.V1\xca\x02\x16Google\\Cloud\\GkeHub\\V1\xea\x02\x19Google::Cloud::GkeHub::V1b\x06proto3" +descriptor_data = "\n$google/cloud/gkehub/v1/feature.proto\x12\x16google.cloud.gkehub.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a>google/cloud/gkehub/v1/configmanagement/configmanagement.proto\x1a\x44google/cloud/gkehub/v1/multiclusteringress/multiclusteringress.proto\x1aNgoogle/cloud/gkehub/v1/rbacrolebindingactuation/rbacrolebindingactuation.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xbd\n\n\x07\x46\x65\x61ture\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12;\n\x06labels\x18\x02 \x03(\x0b\x32+.google.cloud.gkehub.v1.Feature.LabelsEntry\x12I\n\x0eresource_state\x18\x03 \x01(\x0b\x32,.google.cloud.gkehub.v1.FeatureResourceStateB\x03\xe0\x41\x03\x12<\n\x04spec\x18\x04 \x01(\x0b\x32).google.cloud.gkehub.v1.CommonFeatureSpecB\x03\xe0\x41\x01\x12S\n\x10membership_specs\x18\x05 \x03(\x0b\x32\x34.google.cloud.gkehub.v1.Feature.MembershipSpecsEntryB\x03\xe0\x41\x01\x12>\n\x05state\x18\x06 \x01(\x0b\x32*.google.cloud.gkehub.v1.CommonFeatureStateB\x03\xe0\x41\x03\x12U\n\x11membership_states\x18\x07 \x03(\x0b\x32\x35.google.cloud.gkehub.v1.Feature.MembershipStatesEntryB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x64\x65lete_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12I\n\x0bscope_specs\x18\x0c \x03(\x0b\x32/.google.cloud.gkehub.v1.Feature.ScopeSpecsEntryB\x03\xe0\x41\x01\x12K\n\x0cscope_states\x18\r \x03(\x0b\x32\x30.google.cloud.gkehub.v1.Feature.ScopeStatesEntryB\x03\xe0\x41\x03\x12\x18\n\x0bunreachable\x18\x0f \x03(\tB\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x65\n\x14MembershipSpecsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12<\n\x05value\x18\x02 \x01(\x0b\x32-.google.cloud.gkehub.v1.MembershipFeatureSpec:\x02\x38\x01\x1ag\n\x15MembershipStatesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12=\n\x05value\x18\x02 \x01(\x0b\x32..google.cloud.gkehub.v1.MembershipFeatureState:\x02\x38\x01\x1a[\n\x0fScopeSpecsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x37\n\x05value\x18\x02 \x01(\x0b\x32(.google.cloud.gkehub.v1.ScopeFeatureSpec:\x02\x38\x01\x1a]\n\x10ScopeStatesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x38\n\x05value\x18\x02 \x01(\x0b\x32).google.cloud.gkehub.v1.ScopeFeatureState:\x02\x38\x01:^\xea\x41[\n\x1dgkehub.googleapis.com/Feature\x12:projects/{project}/locations/{location}/features/{feature}\"\xc6\x01\n\x14\x46\x65\x61tureResourceState\x12\x41\n\x05state\x18\x01 \x01(\x0e\x32\x32.google.cloud.gkehub.v1.FeatureResourceState.State\"k\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x45NABLING\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\r\n\tDISABLING\x10\x03\x12\x0c\n\x08UPDATING\x10\x04\x12\x14\n\x10SERVICE_UPDATING\x10\x05\"\xcb\x01\n\x0c\x46\x65\x61tureState\x12\x37\n\x04\x63ode\x18\x01 \x01(\x0e\x32).google.cloud.gkehub.v1.FeatureState.Code\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12/\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"<\n\x04\x43ode\x12\x14\n\x10\x43ODE_UNSPECIFIED\x10\x00\x12\x06\n\x02OK\x10\x01\x12\x0b\n\x07WARNING\x10\x02\x12\t\n\x05\x45RROR\x10\x03\"{\n\x11\x43ommonFeatureSpec\x12V\n\x13multiclusteringress\x18\x66 \x01(\x0b\x32\x37.google.cloud.gkehub.multiclusteringress.v1.FeatureSpecH\x00\x42\x0e\n\x0c\x66\x65\x61ture_spec\"\xc2\x01\n\x12\x43ommonFeatureState\x12\x61\n\x18rbacrolebindingactuation\x18x \x01(\x0b\x32=.google.cloud.gkehub.rbacrolebindingactuation.v1.FeatureStateH\x00\x12\x38\n\x05state\x18\x01 \x01(\x0b\x32$.google.cloud.gkehub.v1.FeatureStateB\x03\xe0\x41\x03\x42\x0f\n\rfeature_state\"\x12\n\x10ScopeFeatureSpec\"M\n\x11ScopeFeatureState\x12\x38\n\x05state\x18\x01 \x01(\x0b\x32$.google.cloud.gkehub.v1.FeatureStateB\x03\xe0\x41\x03\"|\n\x15MembershipFeatureSpec\x12S\n\x10\x63onfigmanagement\x18j \x01(\x0b\x32\x37.google.cloud.gkehub.configmanagement.v1.MembershipSpecH\x00\x42\x0e\n\x0c\x66\x65\x61ture_spec\"\xb4\x01\n\x16MembershipFeatureState\x12T\n\x10\x63onfigmanagement\x18j \x01(\x0b\x32\x38.google.cloud.gkehub.configmanagement.v1.MembershipStateH\x00\x12\x33\n\x05state\x18\x01 \x01(\x0b\x32$.google.cloud.gkehub.v1.FeatureStateB\x0f\n\rfeature_stateB\xae\x01\n\x1a\x63om.google.cloud.gkehub.v1B\x0c\x46\x65\x61tureProtoP\x01Z2cloud.google.com/go/gkehub/apiv1/gkehubpb;gkehubpb\xaa\x02\x16Google.Cloud.GkeHub.V1\xca\x02\x16Google\\Cloud\\GkeHub\\V1\xea\x02\x19Google::Cloud::GkeHub::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -28,6 +29,7 @@ imports = [ ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], ["google.cloud.gkehub.multiclusteringress.v1.FeatureSpec", "google/cloud/gkehub/v1/multiclusteringress/multiclusteringress.proto"], + ["google.cloud.gkehub.rbacrolebindingactuation.v1.FeatureState", "google/cloud/gkehub/v1/rbacrolebindingactuation/rbacrolebindingactuation.proto"], ["google.cloud.gkehub.configmanagement.v1.MembershipSpec", "google/cloud/gkehub/v1/configmanagement/configmanagement.proto"], ] imports.each do |type_name, expected_filename| @@ -51,6 +53,8 @@ module V1 FeatureState::Code = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.FeatureState.Code").enummodule CommonFeatureSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.CommonFeatureSpec").msgclass CommonFeatureState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.CommonFeatureState").msgclass + ScopeFeatureSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.ScopeFeatureSpec").msgclass + ScopeFeatureState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.ScopeFeatureState").msgclass MembershipFeatureSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.MembershipFeatureSpec").msgclass MembershipFeatureState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.MembershipFeatureState").msgclass end diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gkehub/v1/fleet_pb.rb b/google-cloud-gke_hub-v1/lib/google/cloud/gkehub/v1/fleet_pb.rb similarity index 100% rename from owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gkehub/v1/fleet_pb.rb rename to google-cloud-gke_hub-v1/lib/google/cloud/gkehub/v1/fleet_pb.rb diff --git a/google-cloud-gke_hub-v1/lib/google/cloud/gkehub/v1/multiclusteringress/multiclusteringress_pb.rb b/google-cloud-gke_hub-v1/lib/google/cloud/gkehub/v1/multiclusteringress/multiclusteringress_pb.rb deleted file mode 100644 index 594fe9e25e34..000000000000 --- a/google-cloud-gke_hub-v1/lib/google/cloud/gkehub/v1/multiclusteringress/multiclusteringress_pb.rb +++ /dev/null @@ -1,44 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/gkehub/v1/multiclusteringress/multiclusteringress.proto - -require 'google/protobuf' - - -descriptor_data = "\nDgoogle/cloud/gkehub/v1/multiclusteringress/multiclusteringress.proto\x12*google.cloud.gkehub.multiclusteringress.v1\"(\n\x0b\x46\x65\x61tureSpec\x12\x19\n\x11\x63onfig_membership\x18\x01 \x01(\tB\xb9\x02\n.com.google.cloud.gkehub.multiclusteringress.v1B\x18MultiClusterIngressProtoP\x01Z`cloud.google.com/go/gkehub/multiclusteringress/apiv1/multiclusteringresspb;multiclusteringresspb\xaa\x02*Google.Cloud.GkeHub.MultiClusterIngress.V1\xca\x02*Google\\Cloud\\GkeHub\\MultiClusterIngress\\V1\xea\x02.Google::Cloud::GkeHub::MultiClusterIngress::V1b\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module GkeHub - module MultiClusterIngress - module V1 - FeatureSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.multiclusteringress.v1.FeatureSpec").msgclass - end - end - end - end -end diff --git a/google-cloud-gke_hub-v1/lib/google/cloud/gkehub/v1/service_pb.rb b/google-cloud-gke_hub-v1/lib/google/cloud/gkehub/v1/service_pb.rb index 9582a68880e8..612cbecb8655 100644 --- a/google-cloud-gke_hub-v1/lib/google/cloud/gkehub/v1/service_pb.rb +++ b/google-cloud-gke_hub-v1/lib/google/cloud/gkehub/v1/service_pb.rb @@ -9,13 +9,14 @@ require 'google/api/field_behavior_pb' require 'google/api/resource_pb' require 'google/cloud/gkehub/v1/feature_pb' +require 'google/cloud/gkehub/v1/fleet_pb' require 'google/cloud/gkehub/v1/membership_pb' require 'google/longrunning/operations_pb' require 'google/protobuf/field_mask_pb' require 'google/protobuf/timestamp_pb' -descriptor_data = "\n$google/cloud/gkehub/v1/service.proto\x12\x16google.cloud.gkehub.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a$google/cloud/gkehub/v1/feature.proto\x1a\'google/cloud/gkehub/v1/membership.proto\x1a#google/longrunning/operations.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xaf\x01\n\x16ListMembershipsRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\x12 gkehub.googleapis.com/Membership\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"~\n\x17ListMembershipsResponse\x12\x35\n\tresources\x18\x01 \x03(\x0b\x32\".google.cloud.gkehub.v1.Membership\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"N\n\x14GetMembershipRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n gkehub.googleapis.com/Membership\"\xc3\x01\n\x17\x43reateMembershipRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\x12 gkehub.googleapis.com/Membership\x12\x1a\n\rmembership_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x39\n\x08resource\x18\x03 \x01(\x0b\x32\".google.cloud.gkehub.v1.MembershipB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"~\n\x17\x44\x65leteMembershipRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n gkehub.googleapis.com/Membership\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05\x66orce\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"\xdb\x01\n\x17UpdateMembershipRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n gkehub.googleapis.com/Membership\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x39\n\x08resource\x18\x03 \x01(\x0b\x32\".google.cloud.gkehub.v1.MembershipB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xf2\x01\n\x1eGenerateConnectManifestRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n gkehub.googleapis.com/Membership\x12\x16\n\tnamespace\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05proxy\x18\x03 \x01(\x0c\x42\x03\xe0\x41\x01\x12\x14\n\x07version\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x17\n\nis_upgrade\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\x12\x15\n\x08registry\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12&\n\x19image_pull_secret_content\x18\x07 \x01(\x0c\x42\x03\xe0\x41\x01\"a\n\x1fGenerateConnectManifestResponse\x12>\n\x08manifest\x18\x01 \x03(\x0b\x32,.google.cloud.gkehub.v1.ConnectAgentResource\"X\n\x14\x43onnectAgentResource\x12.\n\x04type\x18\x01 \x01(\x0b\x32 .google.cloud.gkehub.v1.TypeMeta\x12\x10\n\x08manifest\x18\x02 \x01(\t\"-\n\x08TypeMeta\x12\x0c\n\x04kind\x18\x01 \x01(\t\x12\x13\n\x0b\x61pi_version\x18\x02 \x01(\t\"\x92\x01\n\x13ListFeaturesRequest\x12\x32\n\x06parent\x18\x01 \x01(\tB\"\xfa\x41\x1f\x12\x1dgkehub.googleapis.com/Feature\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\x12\x10\n\x08order_by\x18\x05 \x01(\t\"c\n\x14ListFeaturesResponse\x12\x32\n\tresources\x18\x01 \x03(\x0b\x32\x1f.google.cloud.gkehub.v1.Feature\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"E\n\x11GetFeatureRequest\x12\x30\n\x04name\x18\x01 \x01(\tB\"\xfa\x41\x1f\n\x1dgkehub.googleapis.com/Feature\"\xa5\x01\n\x14\x43reateFeatureRequest\x12\x32\n\x06parent\x18\x01 \x01(\tB\"\xfa\x41\x1f\x12\x1dgkehub.googleapis.com/Feature\x12\x12\n\nfeature_id\x18\x02 \x01(\t\x12\x31\n\x08resource\x18\x03 \x01(\x0b\x32\x1f.google.cloud.gkehub.v1.Feature\x12\x12\n\nrequest_id\x18\x04 \x01(\t\"p\n\x14\x44\x65leteFeatureRequest\x12\x30\n\x04name\x18\x01 \x01(\tB\"\xfa\x41\x1f\n\x1dgkehub.googleapis.com/Feature\x12\r\n\x05\x66orce\x18\x02 \x01(\x08\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xc0\x01\n\x14UpdateFeatureRequest\x12\x30\n\x04name\x18\x01 \x01(\tB\"\xfa\x41\x1f\n\x1dgkehub.googleapis.com/Feature\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x31\n\x08resource\x18\x03 \x01(\x0b\x32\x1f.google.cloud.gkehub.v1.Feature\x12\x12\n\nrequest_id\x18\x04 \x01(\t\"\xf9\x01\n\x11OperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1a\n\rstatus_detail\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x1d\n\x10\x63\x61ncel_requested\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\x32\xf0\x11\n\x06GkeHub\x12\xb4\x01\n\x0fListMemberships\x12..google.cloud.gkehub.v1.ListMembershipsRequest\x1a/.google.cloud.gkehub.v1.ListMembershipsResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v1/{parent=projects/*/locations/*}/memberships\x12\xa8\x01\n\x0cListFeatures\x12+.google.cloud.gkehub.v1.ListFeaturesRequest\x1a,.google.cloud.gkehub.v1.ListFeaturesResponse\"=\xda\x41\x06parent\x82\xd3\xe4\x93\x02.\x12,/v1/{parent=projects/*/locations/*}/features\x12\xa1\x01\n\rGetMembership\x12,.google.cloud.gkehub.v1.GetMembershipRequest\x1a\".google.cloud.gkehub.v1.Membership\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1/{name=projects/*/locations/*/memberships/*}\x12\x95\x01\n\nGetFeature\x12).google.cloud.gkehub.v1.GetFeatureRequest\x1a\x1f.google.cloud.gkehub.v1.Feature\";\xda\x41\x04name\x82\xd3\xe4\x93\x02.\x12,/v1/{name=projects/*/locations/*/features/*}\x12\xe8\x01\n\x10\x43reateMembership\x12/.google.cloud.gkehub.v1.CreateMembershipRequest\x1a\x1d.google.longrunning.Operation\"\x83\x01\xca\x41\x1f\n\nMembership\x12\x11OperationMetadata\xda\x41\x1dparent,resource,membership_id\x82\xd3\xe4\x93\x02;\"//v1/{parent=projects/*/locations/*}/memberships:\x08resource\x12\xd8\x01\n\rCreateFeature\x12,.google.cloud.gkehub.v1.CreateFeatureRequest\x1a\x1d.google.longrunning.Operation\"z\xca\x41\x1c\n\x07\x46\x65\x61ture\x12\x11OperationMetadata\xda\x41\x1aparent,resource,feature_id\x82\xd3\xe4\x93\x02\x38\",/v1/{parent=projects/*/locations/*}/features:\x08resource\x12\xcf\x01\n\x10\x44\x65leteMembership\x12/.google.cloud.gkehub.v1.DeleteMembershipRequest\x1a\x1d.google.longrunning.Operation\"k\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//v1/{name=projects/*/locations/*/memberships/*}\x12\xc6\x01\n\rDeleteFeature\x12,.google.cloud.gkehub.v1.DeleteFeatureRequest\x1a\x1d.google.longrunning.Operation\"h\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02.*,/v1/{name=projects/*/locations/*/features/*}\x12\xe3\x01\n\x10UpdateMembership\x12/.google.cloud.gkehub.v1.UpdateMembershipRequest\x1a\x1d.google.longrunning.Operation\"\x7f\xca\x41\x1f\n\nMembership\x12\x11OperationMetadata\xda\x41\x19name,resource,update_mask\x82\xd3\xe4\x93\x02;2//v1/{name=projects/*/locations/*/memberships/*}:\x08resource\x12\xd7\x01\n\rUpdateFeature\x12,.google.cloud.gkehub.v1.UpdateFeatureRequest\x1a\x1d.google.longrunning.Operation\"y\xca\x41\x1c\n\x07\x46\x65\x61ture\x12\x11OperationMetadata\xda\x41\x19name,resource,update_mask\x82\xd3\xe4\x93\x02\x38\x32,/v1/{name=projects/*/locations/*/features/*}:\x08resource\x12\xdb\x01\n\x17GenerateConnectManifest\x12\x36.google.cloud.gkehub.v1.GenerateConnectManifestRequest\x1a\x37.google.cloud.gkehub.v1.GenerateConnectManifestResponse\"O\x82\xd3\xe4\x93\x02I\x12G/v1/{name=projects/*/locations/*/memberships/*}:generateConnectManifest\x1aI\xca\x41\x15gkehub.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xae\x01\n\x1a\x63om.google.cloud.gkehub.v1B\x0cServiceProtoP\x01Z2cloud.google.com/go/gkehub/apiv1/gkehubpb;gkehubpb\xaa\x02\x16Google.Cloud.GkeHub.V1\xca\x02\x16Google\\Cloud\\GkeHub\\V1\xea\x02\x19Google::Cloud::GkeHub::V1b\x06proto3" +descriptor_data = "\n$google/cloud/gkehub/v1/service.proto\x12\x16google.cloud.gkehub.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a$google/cloud/gkehub/v1/feature.proto\x1a\"google/cloud/gkehub/v1/fleet.proto\x1a\'google/cloud/gkehub/v1/membership.proto\x1a#google/longrunning/operations.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"Q\n\x18GetScopeNamespaceRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fgkehub.googleapis.com/Namespace\"\xb8\x01\n\x1b\x43reateScopeNamespaceRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1fgkehub.googleapis.com/Namespace\x12\x1f\n\x12scope_namespace_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12?\n\x0fscope_namespace\x18\x03 \x01(\x0b\x32!.google.cloud.gkehub.v1.NamespaceB\x03\xe0\x41\x02\"\x94\x01\n\x1bUpdateScopeNamespaceRequest\x12?\n\x0fscope_namespace\x18\x01 \x01(\x0b\x32!.google.cloud.gkehub.v1.NamespaceB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"T\n\x1b\x44\x65leteScopeNamespaceRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fgkehub.googleapis.com/Namespace\"\x86\x01\n\x1aListScopeNamespacesRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1fgkehub.googleapis.com/Namespace\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"s\n\x1bListScopeNamespacesResponse\x12;\n\x10scope_namespaces\x18\x01 \x03(\x0b\x32!.google.cloud.gkehub.v1.Namespace\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"]\n\x1eGetScopeRBACRoleBindingRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%gkehub.googleapis.com/RBACRoleBinding\"\xca\x01\n!CreateScopeRBACRoleBindingRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\x12%gkehub.googleapis.com/RBACRoleBinding\x12\x1f\n\x12rbacrolebinding_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x45\n\x0frbacrolebinding\x18\x03 \x01(\x0b\x32\'.google.cloud.gkehub.v1.RBACRoleBindingB\x03\xe0\x41\x02\"\xa0\x01\n!UpdateScopeRBACRoleBindingRequest\x12\x45\n\x0frbacrolebinding\x18\x01 \x01(\x0b\x32\'.google.cloud.gkehub.v1.RBACRoleBindingB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"`\n!DeleteScopeRBACRoleBindingRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%gkehub.googleapis.com/RBACRoleBinding\"\x92\x01\n ListScopeRBACRoleBindingsRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\x12%gkehub.googleapis.com/RBACRoleBinding\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x7f\n!ListScopeRBACRoleBindingsResponse\x12\x41\n\x10rbacrolebindings\x18\x01 \x03(\x0b\x32\'.google.cloud.gkehub.v1.RBACRoleBinding\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"D\n\x0fGetScopeRequest\x12\x31\n\x04name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1bgkehub.googleapis.com/Scope\"\x93\x01\n\x12\x43reateScopeRequest\x12\x33\n\x06parent\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\x12\x1bgkehub.googleapis.com/Scope\x12\x15\n\x08scope_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x31\n\x05scope\x18\x03 \x01(\x0b\x32\x1d.google.cloud.gkehub.v1.ScopeB\x03\xe0\x41\x02\"}\n\x12UpdateScopeRequest\x12\x31\n\x05scope\x18\x01 \x01(\x0b\x32\x1d.google.cloud.gkehub.v1.ScopeB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"G\n\x12\x44\x65leteScopeRequest\x12\x31\n\x04name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1bgkehub.googleapis.com/Scope\"y\n\x11ListScopesRequest\x12\x33\n\x06parent\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\x12\x1bgkehub.googleapis.com/Scope\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\\\n\x12ListScopesResponse\x12-\n\x06scopes\x18\x01 \x03(\x0b\x32\x1d.google.cloud.gkehub.v1.Scope\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x82\x01\n\x1aListPermittedScopesRequest\x12\x33\n\x06parent\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\x12\x1bgkehub.googleapis.com/Scope\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"e\n\x1bListPermittedScopesResponse\x12-\n\x06scopes\x18\x01 \x03(\x0b\x32\x1d.google.cloud.gkehub.v1.Scope\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\\\n\x1bGetMembershipBindingRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'gkehub.googleapis.com/MembershipBinding\"\xd1\x01\n\x1e\x43reateMembershipBindingRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'gkehub.googleapis.com/MembershipBinding\x12J\n\x12membership_binding\x18\x02 \x01(\x0b\x32).google.cloud.gkehub.v1.MembershipBindingB\x03\xe0\x41\x02\x12\"\n\x15membership_binding_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\xa2\x01\n\x1eUpdateMembershipBindingRequest\x12J\n\x12membership_binding\x18\x01 \x01(\x0b\x32).google.cloud.gkehub.v1.MembershipBindingB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"_\n\x1e\x44\x65leteMembershipBindingRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'gkehub.googleapis.com/MembershipBinding\"\xa6\x01\n\x1dListMembershipBindingsRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'gkehub.googleapis.com/MembershipBinding\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\x96\x01\n\x1eListMembershipBindingsResponse\x12\x46\n\x13membership_bindings\x18\x01 \x03(\x0b\x32).google.cloud.gkehub.v1.MembershipBinding\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xaf\x01\n\x16ListMembershipsRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\x12 gkehub.googleapis.com/Membership\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"b\n#GetMembershipRBACRoleBindingRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%gkehub.googleapis.com/RBACRoleBinding\"\xcf\x01\n&CreateMembershipRBACRoleBindingRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\x12%gkehub.googleapis.com/RBACRoleBinding\x12\x1f\n\x12rbacrolebinding_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x45\n\x0frbacrolebinding\x18\x03 \x01(\x0b\x32\'.google.cloud.gkehub.v1.RBACRoleBindingB\x03\xe0\x41\x02\"\xa5\x01\n&UpdateMembershipRBACRoleBindingRequest\x12\x45\n\x0frbacrolebinding\x18\x01 \x01(\x0b\x32\'.google.cloud.gkehub.v1.RBACRoleBindingB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"e\n&DeleteMembershipRBACRoleBindingRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%gkehub.googleapis.com/RBACRoleBinding\"\x97\x01\n%ListMembershipRBACRoleBindingsRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\x12%gkehub.googleapis.com/RBACRoleBinding\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x99\x01\n&ListMembershipRBACRoleBindingsResponse\x12\x41\n\x10rbacrolebindings\x18\x01 \x03(\x0b\x32\'.google.cloud.gkehub.v1.RBACRoleBinding\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xd0\x01\n,GenerateMembershipRBACRoleBindingYAMLRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n gkehub.googleapis.com/Membership\x12\x1f\n\x12rbacrolebinding_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x45\n\x0frbacrolebinding\x18\x03 \x01(\x0b\x32\'.google.cloud.gkehub.v1.RBACRoleBindingB\x03\xe0\x41\x02\"K\n-GenerateMembershipRBACRoleBindingYAMLResponse\x12\x1a\n\x12role_bindings_yaml\x18\x01 \x01(\t\"~\n\x17ListMembershipsResponse\x12\x35\n\tresources\x18\x01 \x03(\x0b\x32\".google.cloud.gkehub.v1.Membership\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"N\n\x14GetMembershipRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n gkehub.googleapis.com/Membership\"\x9c\x01\n\x1bListBoundMembershipsRequest\x12\x37\n\nscope_name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1bgkehub.googleapis.com/Scope\x12\x13\n\x06\x66ilter\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\x85\x01\n\x1cListBoundMembershipsResponse\x12\x37\n\x0bmemberships\x18\x01 \x03(\x0b\x32\".google.cloud.gkehub.v1.Membership\x12\x13\n\x0bunreachable\x18\x02 \x03(\t\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\t\"\xc3\x01\n\x17\x43reateMembershipRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\x12 gkehub.googleapis.com/Membership\x12\x1a\n\rmembership_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x39\n\x08resource\x18\x03 \x01(\x0b\x32\".google.cloud.gkehub.v1.MembershipB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"~\n\x17\x44\x65leteMembershipRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n gkehub.googleapis.com/Membership\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05\x66orce\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"\xdb\x01\n\x17UpdateMembershipRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n gkehub.googleapis.com/Membership\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x39\n\x08resource\x18\x03 \x01(\x0b\x32\".google.cloud.gkehub.v1.MembershipB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xf2\x01\n\x1eGenerateConnectManifestRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n gkehub.googleapis.com/Membership\x12\x16\n\tnamespace\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05proxy\x18\x03 \x01(\x0c\x42\x03\xe0\x41\x01\x12\x14\n\x07version\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x17\n\nis_upgrade\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\x12\x15\n\x08registry\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12&\n\x19image_pull_secret_content\x18\x07 \x01(\x0c\x42\x03\xe0\x41\x01\"a\n\x1fGenerateConnectManifestResponse\x12>\n\x08manifest\x18\x01 \x03(\x0b\x32,.google.cloud.gkehub.v1.ConnectAgentResource\"X\n\x14\x43onnectAgentResource\x12.\n\x04type\x18\x01 \x01(\x0b\x32 .google.cloud.gkehub.v1.TypeMeta\x12\x10\n\x08manifest\x18\x02 \x01(\t\"-\n\x08TypeMeta\x12\x0c\n\x04kind\x18\x01 \x01(\t\x12\x13\n\x0b\x61pi_version\x18\x02 \x01(\t\"\xb7\x01\n\x13ListFeaturesRequest\x12\x32\n\x06parent\x18\x01 \x01(\tB\"\xfa\x41\x1f\x12\x1dgkehub.googleapis.com/Feature\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\x12\x10\n\x08order_by\x18\x05 \x01(\t\x12#\n\x16return_partial_success\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\"c\n\x14ListFeaturesResponse\x12\x32\n\tresources\x18\x01 \x03(\x0b\x32\x1f.google.cloud.gkehub.v1.Feature\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"j\n\x11GetFeatureRequest\x12\x30\n\x04name\x18\x01 \x01(\tB\"\xfa\x41\x1f\n\x1dgkehub.googleapis.com/Feature\x12#\n\x16return_partial_success\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"\xa5\x01\n\x14\x43reateFeatureRequest\x12\x32\n\x06parent\x18\x01 \x01(\tB\"\xfa\x41\x1f\x12\x1dgkehub.googleapis.com/Feature\x12\x12\n\nfeature_id\x18\x02 \x01(\t\x12\x31\n\x08resource\x18\x03 \x01(\x0b\x32\x1f.google.cloud.gkehub.v1.Feature\x12\x12\n\nrequest_id\x18\x04 \x01(\t\"p\n\x14\x44\x65leteFeatureRequest\x12\x30\n\x04name\x18\x01 \x01(\tB\"\xfa\x41\x1f\n\x1dgkehub.googleapis.com/Feature\x12\r\n\x05\x66orce\x18\x02 \x01(\x08\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xc0\x01\n\x14UpdateFeatureRequest\x12\x30\n\x04name\x18\x01 \x01(\tB\"\xfa\x41\x1f\n\x1dgkehub.googleapis.com/Feature\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x31\n\x08resource\x18\x03 \x01(\x0b\x32\x1f.google.cloud.gkehub.v1.Feature\x12\x12\n\nrequest_id\x18\x04 \x01(\t\"\x82\x01\n\x12\x43reateFleetRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x31\n\x05\x66leet\x18\x02 \x01(\x0b\x32\x1d.google.cloud.gkehub.v1.FleetB\x03\xe0\x41\x02\"D\n\x0fGetFleetRequest\x12\x31\n\x04name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1bgkehub.googleapis.com/Fleet\"}\n\x12UpdateFleetRequest\x12\x31\n\x05\x66leet\x18\x01 \x01(\x0b\x32\x1d.google.cloud.gkehub.v1.FleetB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"G\n\x12\x44\x65leteFleetRequest\x12\x31\n\x04name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1bgkehub.googleapis.com/Fleet\"\x7f\n\x11ListFleetsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x17\n\npage_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\"\\\n\x12ListFleetsResponse\x12-\n\x06\x66leets\x18\x01 \x03(\x0b\x32\x1d.google.cloud.gkehub.v1.Fleet\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xf9\x01\n\x11OperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1a\n\rstatus_detail\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x1d\n\x10\x63\x61ncel_requested\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\x32\x96M\n\x06GkeHub\x12\xb4\x01\n\x0fListMemberships\x12..google.cloud.gkehub.v1.ListMembershipsRequest\x1a/.google.cloud.gkehub.v1.ListMembershipsResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v1/{parent=projects/*/locations/*}/memberships\x12\xd8\x01\n\x14ListBoundMemberships\x12\x33.google.cloud.gkehub.v1.ListBoundMembershipsRequest\x1a\x34.google.cloud.gkehub.v1.ListBoundMembershipsResponse\"U\xda\x41\nscope_name\x82\xd3\xe4\x93\x02\x42\x12@/v1/{scope_name=projects/*/locations/*/scopes/*}:listMemberships\x12\xa8\x01\n\x0cListFeatures\x12+.google.cloud.gkehub.v1.ListFeaturesRequest\x1a,.google.cloud.gkehub.v1.ListFeaturesResponse\"=\xda\x41\x06parent\x82\xd3\xe4\x93\x02.\x12,/v1/{parent=projects/*/locations/*}/features\x12\xa1\x01\n\rGetMembership\x12,.google.cloud.gkehub.v1.GetMembershipRequest\x1a\".google.cloud.gkehub.v1.Membership\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1/{name=projects/*/locations/*/memberships/*}\x12\x95\x01\n\nGetFeature\x12).google.cloud.gkehub.v1.GetFeatureRequest\x1a\x1f.google.cloud.gkehub.v1.Feature\";\xda\x41\x04name\x82\xd3\xe4\x93\x02.\x12,/v1/{name=projects/*/locations/*/features/*}\x12\xe8\x01\n\x10\x43reateMembership\x12/.google.cloud.gkehub.v1.CreateMembershipRequest\x1a\x1d.google.longrunning.Operation\"\x83\x01\xca\x41\x1f\n\nMembership\x12\x11OperationMetadata\xda\x41\x1dparent,resource,membership_id\x82\xd3\xe4\x93\x02;\"//v1/{parent=projects/*/locations/*}/memberships:\x08resource\x12\xd8\x01\n\rCreateFeature\x12,.google.cloud.gkehub.v1.CreateFeatureRequest\x1a\x1d.google.longrunning.Operation\"z\xca\x41\x1c\n\x07\x46\x65\x61ture\x12\x11OperationMetadata\xda\x41\x1aparent,resource,feature_id\x82\xd3\xe4\x93\x02\x38\",/v1/{parent=projects/*/locations/*}/features:\x08resource\x12\xcf\x01\n\x10\x44\x65leteMembership\x12/.google.cloud.gkehub.v1.DeleteMembershipRequest\x1a\x1d.google.longrunning.Operation\"k\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//v1/{name=projects/*/locations/*/memberships/*}\x12\xc6\x01\n\rDeleteFeature\x12,.google.cloud.gkehub.v1.DeleteFeatureRequest\x1a\x1d.google.longrunning.Operation\"h\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02.*,/v1/{name=projects/*/locations/*/features/*}\x12\xe3\x01\n\x10UpdateMembership\x12/.google.cloud.gkehub.v1.UpdateMembershipRequest\x1a\x1d.google.longrunning.Operation\"\x7f\xca\x41\x1f\n\nMembership\x12\x11OperationMetadata\xda\x41\x19name,resource,update_mask\x82\xd3\xe4\x93\x02;2//v1/{name=projects/*/locations/*/memberships/*}:\x08resource\x12\xd7\x01\n\rUpdateFeature\x12,.google.cloud.gkehub.v1.UpdateFeatureRequest\x1a\x1d.google.longrunning.Operation\"y\xca\x41\x1c\n\x07\x46\x65\x61ture\x12\x11OperationMetadata\xda\x41\x19name,resource,update_mask\x82\xd3\xe4\x93\x02\x38\x32,/v1/{name=projects/*/locations/*/features/*}:\x08resource\x12\xdb\x01\n\x17GenerateConnectManifest\x12\x36.google.cloud.gkehub.v1.GenerateConnectManifestRequest\x1a\x37.google.cloud.gkehub.v1.GenerateConnectManifestResponse\"O\x82\xd3\xe4\x93\x02I\x12G/v1/{name=projects/*/locations/*/memberships/*}:generateConnectManifest\x12\xbf\x01\n\x0b\x43reateFleet\x12*.google.cloud.gkehub.v1.CreateFleetRequest\x1a\x1d.google.longrunning.Operation\"e\xca\x41\x1a\n\x05\x46leet\x12\x11OperationMetadata\xda\x41\x0cparent,fleet\x82\xd3\xe4\x93\x02\x33\"*/v1/{parent=projects/*/locations/*}/fleets:\x05\x66leet\x12\x8d\x01\n\x08GetFleet\x12\'.google.cloud.gkehub.v1.GetFleetRequest\x1a\x1d.google.cloud.gkehub.v1.Fleet\"9\xda\x41\x04name\x82\xd3\xe4\x93\x02,\x12*/v1/{name=projects/*/locations/*/fleets/*}\x12\xca\x01\n\x0bUpdateFleet\x12*.google.cloud.gkehub.v1.UpdateFleetRequest\x1a\x1d.google.longrunning.Operation\"p\xca\x41\x1a\n\x05\x46leet\x12\x11OperationMetadata\xda\x41\x11\x66leet,update_mask\x82\xd3\xe4\x93\x02\x39\x32\x30/v1/{fleet.name=projects/*/locations/*/fleets/*}:\x05\x66leet\x12\xc0\x01\n\x0b\x44\x65leteFleet\x12*.google.cloud.gkehub.v1.DeleteFleetRequest\x1a\x1d.google.longrunning.Operation\"f\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02,**/v1/{name=projects/*/locations/*/fleets/*}\x12\xd3\x01\n\nListFleets\x12).google.cloud.gkehub.v1.ListFleetsRequest\x1a*.google.cloud.gkehub.v1.ListFleetsResponse\"n\xda\x41\x06parent\x82\xd3\xe4\x93\x02_\x12*/v1/{parent=projects/*/locations/*}/fleetsZ1\x12//v1/{parent=organizations/*/locations/*}/fleets\x12\xb0\x01\n\x11GetScopeNamespace\x12\x30.google.cloud.gkehub.v1.GetScopeNamespaceRequest\x1a!.google.cloud.gkehub.v1.Namespace\"F\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39\x12\x37/v1/{name=projects/*/locations/*/scopes/*/namespaces/*}\x12\x8a\x02\n\x14\x43reateScopeNamespace\x12\x33.google.cloud.gkehub.v1.CreateScopeNamespaceRequest\x1a\x1d.google.longrunning.Operation\"\x9d\x01\xca\x41\x1e\n\tNamespace\x12\x11OperationMetadata\xda\x41)parent,scope_namespace,scope_namespace_id\x82\xd3\xe4\x93\x02J\"7/v1/{parent=projects/*/locations/*/scopes/*}/namespaces:\x0fscope_namespace\x12\x8c\x02\n\x14UpdateScopeNamespace\x12\x33.google.cloud.gkehub.v1.UpdateScopeNamespaceRequest\x1a\x1d.google.longrunning.Operation\"\x9f\x01\xca\x41\x1e\n\tNamespace\x12\x11OperationMetadata\xda\x41\x1bscope_namespace,update_mask\x82\xd3\xe4\x93\x02Z2G/v1/{scope_namespace.name=projects/*/locations/*/scopes/*/namespaces/*}:\x0fscope_namespace\x12\xdf\x01\n\x14\x44\x65leteScopeNamespace\x12\x33.google.cloud.gkehub.v1.DeleteScopeNamespaceRequest\x1a\x1d.google.longrunning.Operation\"s\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39*7/v1/{name=projects/*/locations/*/scopes/*/namespaces/*}\x12\xc8\x01\n\x13ListScopeNamespaces\x12\x32.google.cloud.gkehub.v1.ListScopeNamespacesRequest\x1a\x33.google.cloud.gkehub.v1.ListScopeNamespacesResponse\"H\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x39\x12\x37/v1/{parent=projects/*/locations/*/scopes/*}/namespaces\x12\xc8\x01\n\x17GetScopeRBACRoleBinding\x12\x36.google.cloud.gkehub.v1.GetScopeRBACRoleBindingRequest\x1a\'.google.cloud.gkehub.v1.RBACRoleBinding\"L\xda\x41\x04name\x82\xd3\xe4\x93\x02?\x12=/v1/{name=projects/*/locations/*/scopes/*/rbacrolebindings/*}\x12\xa2\x02\n\x1a\x43reateScopeRBACRoleBinding\x12\x39.google.cloud.gkehub.v1.CreateScopeRBACRoleBindingRequest\x1a\x1d.google.longrunning.Operation\"\xa9\x01\xca\x41$\n\x0fRBACRoleBinding\x12\x11OperationMetadata\xda\x41)parent,rbacrolebinding,rbacrolebinding_id\x82\xd3\xe4\x93\x02P\"=/v1/{parent=projects/*/locations/*/scopes/*}/rbacrolebindings:\x0frbacrolebinding\x12\xa4\x02\n\x1aUpdateScopeRBACRoleBinding\x12\x39.google.cloud.gkehub.v1.UpdateScopeRBACRoleBindingRequest\x1a\x1d.google.longrunning.Operation\"\xab\x01\xca\x41$\n\x0fRBACRoleBinding\x12\x11OperationMetadata\xda\x41\x1brbacrolebinding,update_mask\x82\xd3\xe4\x93\x02`2M/v1/{rbacrolebinding.name=projects/*/locations/*/scopes/*/rbacrolebindings/*}:\x0frbacrolebinding\x12\xf1\x01\n\x1a\x44\x65leteScopeRBACRoleBinding\x12\x39.google.cloud.gkehub.v1.DeleteScopeRBACRoleBindingRequest\x1a\x1d.google.longrunning.Operation\"y\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02?*=/v1/{name=projects/*/locations/*/scopes/*/rbacrolebindings/*}\x12\xe0\x01\n\x19ListScopeRBACRoleBindings\x12\x38.google.cloud.gkehub.v1.ListScopeRBACRoleBindingsRequest\x1a\x39.google.cloud.gkehub.v1.ListScopeRBACRoleBindingsResponse\"N\xda\x41\x06parent\x82\xd3\xe4\x93\x02?\x12=/v1/{parent=projects/*/locations/*/scopes/*}/rbacrolebindings\x12\x8d\x01\n\x08GetScope\x12\'.google.cloud.gkehub.v1.GetScopeRequest\x1a\x1d.google.cloud.gkehub.v1.Scope\"9\xda\x41\x04name\x82\xd3\xe4\x93\x02,\x12*/v1/{name=projects/*/locations/*/scopes/*}\x12\xc8\x01\n\x0b\x43reateScope\x12*.google.cloud.gkehub.v1.CreateScopeRequest\x1a\x1d.google.longrunning.Operation\"n\xca\x41\x1a\n\x05Scope\x12\x11OperationMetadata\xda\x41\x15parent,scope,scope_id\x82\xd3\xe4\x93\x02\x33\"*/v1/{parent=projects/*/locations/*}/scopes:\x05scope\x12\xca\x01\n\x0bUpdateScope\x12*.google.cloud.gkehub.v1.UpdateScopeRequest\x1a\x1d.google.longrunning.Operation\"p\xca\x41\x1a\n\x05Scope\x12\x11OperationMetadata\xda\x41\x11scope,update_mask\x82\xd3\xe4\x93\x02\x39\x32\x30/v1/{scope.name=projects/*/locations/*/scopes/*}:\x05scope\x12\xc0\x01\n\x0b\x44\x65leteScope\x12*.google.cloud.gkehub.v1.DeleteScopeRequest\x1a\x1d.google.longrunning.Operation\"f\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02,**/v1/{name=projects/*/locations/*/scopes/*}\x12\xa0\x01\n\nListScopes\x12).google.cloud.gkehub.v1.ListScopesRequest\x1a*.google.cloud.gkehub.v1.ListScopesResponse\";\xda\x41\x06parent\x82\xd3\xe4\x93\x02,\x12*/v1/{parent=projects/*/locations/*}/scopes\x12\xc9\x01\n\x13ListPermittedScopes\x12\x32.google.cloud.gkehub.v1.ListPermittedScopesRequest\x1a\x33.google.cloud.gkehub.v1.ListPermittedScopesResponse\"I\xda\x41\x06parent\x82\xd3\xe4\x93\x02:\x12\x38/v1/{parent=projects/*/locations/*}/scopes:listPermitted\x12\xc1\x01\n\x14GetMembershipBinding\x12\x33.google.cloud.gkehub.v1.GetMembershipBindingRequest\x1a).google.cloud.gkehub.v1.MembershipBinding\"I\xda\x41\x04name\x82\xd3\xe4\x93\x02<\x12:/v1/{name=projects/*/locations/*/memberships/*/bindings/*}\x12\xa4\x02\n\x17\x43reateMembershipBinding\x12\x36.google.cloud.gkehub.v1.CreateMembershipBindingRequest\x1a\x1d.google.longrunning.Operation\"\xb1\x01\xca\x41&\n\x11MembershipBinding\x12\x11OperationMetadata\xda\x41/parent,membership_binding,membership_binding_id\x82\xd3\xe4\x93\x02P\":/v1/{parent=projects/*/locations/*/memberships/*}/bindings:\x12membership_binding\x12\xa6\x02\n\x17UpdateMembershipBinding\x12\x36.google.cloud.gkehub.v1.UpdateMembershipBindingRequest\x1a\x1d.google.longrunning.Operation\"\xb3\x01\xca\x41&\n\x11MembershipBinding\x12\x11OperationMetadata\xda\x41\x1emembership_binding,update_mask\x82\xd3\xe4\x93\x02\x63\x32M/v1/{membership_binding.name=projects/*/locations/*/memberships/*/bindings/*}:\x12membership_binding\x12\xe8\x01\n\x17\x44\x65leteMembershipBinding\x12\x36.google.cloud.gkehub.v1.DeleteMembershipBindingRequest\x1a\x1d.google.longrunning.Operation\"v\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02<*:/v1/{name=projects/*/locations/*/memberships/*/bindings/*}\x12\xd4\x01\n\x16ListMembershipBindings\x12\x35.google.cloud.gkehub.v1.ListMembershipBindingsRequest\x1a\x36.google.cloud.gkehub.v1.ListMembershipBindingsResponse\"K\xda\x41\x06parent\x82\xd3\xe4\x93\x02<\x12:/v1/{parent=projects/*/locations/*/memberships/*}/bindings\x12\xd7\x01\n\x1cGetMembershipRBACRoleBinding\x12;.google.cloud.gkehub.v1.GetMembershipRBACRoleBindingRequest\x1a\'.google.cloud.gkehub.v1.RBACRoleBinding\"Q\xda\x41\x04name\x82\xd3\xe4\x93\x02\x44\x12\x42/v1/{name=projects/*/locations/*/memberships/*/rbacrolebindings/*}\x12\xb1\x02\n\x1f\x43reateMembershipRBACRoleBinding\x12>.google.cloud.gkehub.v1.CreateMembershipRBACRoleBindingRequest\x1a\x1d.google.longrunning.Operation\"\xae\x01\xca\x41$\n\x0fRBACRoleBinding\x12\x11OperationMetadata\xda\x41)parent,rbacrolebinding,rbacrolebinding_id\x82\xd3\xe4\x93\x02U\"B/v1/{parent=projects/*/locations/*/memberships/*}/rbacrolebindings:\x0frbacrolebinding\x12\xb3\x02\n\x1fUpdateMembershipRBACRoleBinding\x12>.google.cloud.gkehub.v1.UpdateMembershipRBACRoleBindingRequest\x1a\x1d.google.longrunning.Operation\"\xb0\x01\xca\x41$\n\x0fRBACRoleBinding\x12\x11OperationMetadata\xda\x41\x1brbacrolebinding,update_mask\x82\xd3\xe4\x93\x02\x65\x32R/v1/{rbacrolebinding.name=projects/*/locations/*/memberships/*/rbacrolebindings/*}:\x0frbacrolebinding\x12\x80\x02\n\x1f\x44\x65leteMembershipRBACRoleBinding\x12>.google.cloud.gkehub.v1.DeleteMembershipRBACRoleBindingRequest\x1a\x1d.google.longrunning.Operation\"~\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x44*B/v1/{name=projects/*/locations/*/memberships/*/rbacrolebindings/*}\x12\xf4\x01\n\x1eListMembershipRBACRoleBindings\x12=.google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsRequest\x1a>.google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsResponse\"S\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x44\x12\x42/v1/{parent=projects/*/locations/*/memberships/*}/rbacrolebindings\x12\xb8\x02\n%GenerateMembershipRBACRoleBindingYAML\x12\x44.google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLRequest\x1a\x45.google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLResponse\"\x81\x01\x82\xd3\xe4\x93\x02{\"h/v1/{parent=projects/*/locations/*/memberships/*}/rbacrolebindings:generateMembershipRBACRoleBindingYAML:\x0frbacrolebinding\x1aI\xca\x41\x15gkehub.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xae\x01\n\x1a\x63om.google.cloud.gkehub.v1B\x0cServiceProtoP\x01Z2cloud.google.com/go/gkehub/apiv1/gkehubpb;gkehubpb\xaa\x02\x16Google.Cloud.GkeHub.V1\xca\x02\x16Google\\Cloud\\GkeHub\\V1\xea\x02\x19Google::Cloud::GkeHub::V1b\x06proto3" pool = Google::Protobuf::DescriptorPool.generated_pool @@ -30,8 +31,9 @@ file = pool.add_serialized_file(serialized) warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" imports = [ - ["google.cloud.gkehub.v1.Membership", "google/cloud/gkehub/v1/membership.proto"], + ["google.cloud.gkehub.v1.Namespace", "google/cloud/gkehub/v1/fleet.proto"], ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], + ["google.cloud.gkehub.v1.Membership", "google/cloud/gkehub/v1/membership.proto"], ["google.cloud.gkehub.v1.Feature", "google/cloud/gkehub/v1/feature.proto"], ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], ] @@ -49,9 +51,45 @@ module Google module Cloud module GkeHub module V1 + GetScopeNamespaceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.GetScopeNamespaceRequest").msgclass + CreateScopeNamespaceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.CreateScopeNamespaceRequest").msgclass + UpdateScopeNamespaceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.UpdateScopeNamespaceRequest").msgclass + DeleteScopeNamespaceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.DeleteScopeNamespaceRequest").msgclass + ListScopeNamespacesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.ListScopeNamespacesRequest").msgclass + ListScopeNamespacesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.ListScopeNamespacesResponse").msgclass + GetScopeRBACRoleBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.GetScopeRBACRoleBindingRequest").msgclass + CreateScopeRBACRoleBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.CreateScopeRBACRoleBindingRequest").msgclass + UpdateScopeRBACRoleBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.UpdateScopeRBACRoleBindingRequest").msgclass + DeleteScopeRBACRoleBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.DeleteScopeRBACRoleBindingRequest").msgclass + ListScopeRBACRoleBindingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.ListScopeRBACRoleBindingsRequest").msgclass + ListScopeRBACRoleBindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.ListScopeRBACRoleBindingsResponse").msgclass + GetScopeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.GetScopeRequest").msgclass + CreateScopeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.CreateScopeRequest").msgclass + UpdateScopeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.UpdateScopeRequest").msgclass + DeleteScopeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.DeleteScopeRequest").msgclass + ListScopesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.ListScopesRequest").msgclass + ListScopesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.ListScopesResponse").msgclass + ListPermittedScopesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.ListPermittedScopesRequest").msgclass + ListPermittedScopesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.ListPermittedScopesResponse").msgclass + GetMembershipBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.GetMembershipBindingRequest").msgclass + CreateMembershipBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.CreateMembershipBindingRequest").msgclass + UpdateMembershipBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.UpdateMembershipBindingRequest").msgclass + DeleteMembershipBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.DeleteMembershipBindingRequest").msgclass + ListMembershipBindingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.ListMembershipBindingsRequest").msgclass + ListMembershipBindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.ListMembershipBindingsResponse").msgclass ListMembershipsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.ListMembershipsRequest").msgclass + GetMembershipRBACRoleBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.GetMembershipRBACRoleBindingRequest").msgclass + CreateMembershipRBACRoleBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.CreateMembershipRBACRoleBindingRequest").msgclass + UpdateMembershipRBACRoleBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.UpdateMembershipRBACRoleBindingRequest").msgclass + DeleteMembershipRBACRoleBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.DeleteMembershipRBACRoleBindingRequest").msgclass + ListMembershipRBACRoleBindingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsRequest").msgclass + ListMembershipRBACRoleBindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsResponse").msgclass + GenerateMembershipRBACRoleBindingYAMLRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLRequest").msgclass + GenerateMembershipRBACRoleBindingYAMLResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLResponse").msgclass ListMembershipsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.ListMembershipsResponse").msgclass GetMembershipRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.GetMembershipRequest").msgclass + ListBoundMembershipsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.ListBoundMembershipsRequest").msgclass + ListBoundMembershipsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.ListBoundMembershipsResponse").msgclass CreateMembershipRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.CreateMembershipRequest").msgclass DeleteMembershipRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.DeleteMembershipRequest").msgclass UpdateMembershipRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.UpdateMembershipRequest").msgclass @@ -65,6 +103,12 @@ module V1 CreateFeatureRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.CreateFeatureRequest").msgclass DeleteFeatureRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.DeleteFeatureRequest").msgclass UpdateFeatureRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.UpdateFeatureRequest").msgclass + CreateFleetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.CreateFleetRequest").msgclass + GetFleetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.GetFleetRequest").msgclass + UpdateFleetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.UpdateFleetRequest").msgclass + DeleteFleetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.DeleteFleetRequest").msgclass + ListFleetsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.ListFleetsRequest").msgclass + ListFleetsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.ListFleetsResponse").msgclass OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.OperationMetadata").msgclass end end diff --git a/google-cloud-gke_hub-v1/lib/google/cloud/gkehub/v1/service_services_pb.rb b/google-cloud-gke_hub-v1/lib/google/cloud/gkehub/v1/service_services_pb.rb index 2fe15a13a3a8..996c50e5b42a 100644 --- a/google-cloud-gke_hub-v1/lib/google/cloud/gkehub/v1/service_services_pb.rb +++ b/google-cloud-gke_hub-v1/lib/google/cloud/gkehub/v1/service_services_pb.rb @@ -51,6 +51,9 @@ class Service # Lists Memberships in a given project and location. rpc :ListMemberships, ::Google::Cloud::GkeHub::V1::ListMembershipsRequest, ::Google::Cloud::GkeHub::V1::ListMembershipsResponse + # Lists Memberships bound to a Scope. The response includes relevant + # Memberships from all regions. + rpc :ListBoundMemberships, ::Google::Cloud::GkeHub::V1::ListBoundMembershipsRequest, ::Google::Cloud::GkeHub::V1::ListBoundMembershipsResponse # Lists Features in a given project and location. rpc :ListFeatures, ::Google::Cloud::GkeHub::V1::ListFeaturesRequest, ::Google::Cloud::GkeHub::V1::ListFeaturesResponse # Gets the details of a Membership. @@ -82,6 +85,72 @@ class Service # **This method is used internally by Google-provided libraries.** # Most clients should not need to call this method directly. rpc :GenerateConnectManifest, ::Google::Cloud::GkeHub::V1::GenerateConnectManifestRequest, ::Google::Cloud::GkeHub::V1::GenerateConnectManifestResponse + # Creates a fleet. + rpc :CreateFleet, ::Google::Cloud::GkeHub::V1::CreateFleetRequest, ::Google::Longrunning::Operation + # Returns the details of a fleet. + rpc :GetFleet, ::Google::Cloud::GkeHub::V1::GetFleetRequest, ::Google::Cloud::GkeHub::V1::Fleet + # Updates a fleet. + rpc :UpdateFleet, ::Google::Cloud::GkeHub::V1::UpdateFleetRequest, ::Google::Longrunning::Operation + # Removes a Fleet. There must be no memberships remaining in the Fleet. + rpc :DeleteFleet, ::Google::Cloud::GkeHub::V1::DeleteFleetRequest, ::Google::Longrunning::Operation + # Returns all fleets within an organization or a project that the caller has + # access to. + rpc :ListFleets, ::Google::Cloud::GkeHub::V1::ListFleetsRequest, ::Google::Cloud::GkeHub::V1::ListFleetsResponse + # Returns the details of a fleet namespace. + rpc :GetScopeNamespace, ::Google::Cloud::GkeHub::V1::GetScopeNamespaceRequest, ::Google::Cloud::GkeHub::V1::Namespace + # Creates a fleet namespace. + rpc :CreateScopeNamespace, ::Google::Cloud::GkeHub::V1::CreateScopeNamespaceRequest, ::Google::Longrunning::Operation + # Updates a fleet namespace. + rpc :UpdateScopeNamespace, ::Google::Cloud::GkeHub::V1::UpdateScopeNamespaceRequest, ::Google::Longrunning::Operation + # Deletes a fleet namespace. + rpc :DeleteScopeNamespace, ::Google::Cloud::GkeHub::V1::DeleteScopeNamespaceRequest, ::Google::Longrunning::Operation + # Lists fleet namespaces. + rpc :ListScopeNamespaces, ::Google::Cloud::GkeHub::V1::ListScopeNamespacesRequest, ::Google::Cloud::GkeHub::V1::ListScopeNamespacesResponse + # Returns the details of a Scope RBACRoleBinding. + rpc :GetScopeRBACRoleBinding, ::Google::Cloud::GkeHub::V1::GetScopeRBACRoleBindingRequest, ::Google::Cloud::GkeHub::V1::RBACRoleBinding + # Creates a Scope RBACRoleBinding. + rpc :CreateScopeRBACRoleBinding, ::Google::Cloud::GkeHub::V1::CreateScopeRBACRoleBindingRequest, ::Google::Longrunning::Operation + # Updates a Scope RBACRoleBinding. + rpc :UpdateScopeRBACRoleBinding, ::Google::Cloud::GkeHub::V1::UpdateScopeRBACRoleBindingRequest, ::Google::Longrunning::Operation + # Deletes a Scope RBACRoleBinding. + rpc :DeleteScopeRBACRoleBinding, ::Google::Cloud::GkeHub::V1::DeleteScopeRBACRoleBindingRequest, ::Google::Longrunning::Operation + # Lists all Scope RBACRoleBindings. + rpc :ListScopeRBACRoleBindings, ::Google::Cloud::GkeHub::V1::ListScopeRBACRoleBindingsRequest, ::Google::Cloud::GkeHub::V1::ListScopeRBACRoleBindingsResponse + # Returns the details of a Scope. + rpc :GetScope, ::Google::Cloud::GkeHub::V1::GetScopeRequest, ::Google::Cloud::GkeHub::V1::Scope + # Creates a Scope. + rpc :CreateScope, ::Google::Cloud::GkeHub::V1::CreateScopeRequest, ::Google::Longrunning::Operation + # Updates a scopes. + rpc :UpdateScope, ::Google::Cloud::GkeHub::V1::UpdateScopeRequest, ::Google::Longrunning::Operation + # Deletes a Scope. + rpc :DeleteScope, ::Google::Cloud::GkeHub::V1::DeleteScopeRequest, ::Google::Longrunning::Operation + # Lists Scopes. + rpc :ListScopes, ::Google::Cloud::GkeHub::V1::ListScopesRequest, ::Google::Cloud::GkeHub::V1::ListScopesResponse + # Lists permitted Scopes. + rpc :ListPermittedScopes, ::Google::Cloud::GkeHub::V1::ListPermittedScopesRequest, ::Google::Cloud::GkeHub::V1::ListPermittedScopesResponse + # Returns the details of a MembershipBinding. + rpc :GetMembershipBinding, ::Google::Cloud::GkeHub::V1::GetMembershipBindingRequest, ::Google::Cloud::GkeHub::V1::MembershipBinding + # Creates a MembershipBinding. + rpc :CreateMembershipBinding, ::Google::Cloud::GkeHub::V1::CreateMembershipBindingRequest, ::Google::Longrunning::Operation + # Updates a MembershipBinding. + rpc :UpdateMembershipBinding, ::Google::Cloud::GkeHub::V1::UpdateMembershipBindingRequest, ::Google::Longrunning::Operation + # Deletes a MembershipBinding. + rpc :DeleteMembershipBinding, ::Google::Cloud::GkeHub::V1::DeleteMembershipBindingRequest, ::Google::Longrunning::Operation + # Lists MembershipBindings. + rpc :ListMembershipBindings, ::Google::Cloud::GkeHub::V1::ListMembershipBindingsRequest, ::Google::Cloud::GkeHub::V1::ListMembershipBindingsResponse + # Returns the details of a Membership RBACRoleBinding. + rpc :GetMembershipRBACRoleBinding, ::Google::Cloud::GkeHub::V1::GetMembershipRBACRoleBindingRequest, ::Google::Cloud::GkeHub::V1::RBACRoleBinding + # Creates a Membership RBACRoleBinding. + rpc :CreateMembershipRBACRoleBinding, ::Google::Cloud::GkeHub::V1::CreateMembershipRBACRoleBindingRequest, ::Google::Longrunning::Operation + # Updates a Membership RBACRoleBinding. + rpc :UpdateMembershipRBACRoleBinding, ::Google::Cloud::GkeHub::V1::UpdateMembershipRBACRoleBindingRequest, ::Google::Longrunning::Operation + # Deletes a Membership RBACRoleBinding. + rpc :DeleteMembershipRBACRoleBinding, ::Google::Cloud::GkeHub::V1::DeleteMembershipRBACRoleBindingRequest, ::Google::Longrunning::Operation + # Lists all Membership RBACRoleBindings. + rpc :ListMembershipRBACRoleBindings, ::Google::Cloud::GkeHub::V1::ListMembershipRBACRoleBindingsRequest, ::Google::Cloud::GkeHub::V1::ListMembershipRBACRoleBindingsResponse + # Generates a YAML of the RBAC policies for the specified + # RoleBinding and its associated impersonation resources. + rpc :GenerateMembershipRBACRoleBindingYAML, ::Google::Cloud::GkeHub::V1::GenerateMembershipRBACRoleBindingYAMLRequest, ::Google::Cloud::GkeHub::V1::GenerateMembershipRBACRoleBindingYAMLResponse end Stub = Service.rpc_stub_class diff --git a/google-cloud-gke_hub-v1/proto_docs/google/cloud/gkehub/v1/feature.rb b/google-cloud-gke_hub-v1/proto_docs/google/cloud/gkehub/v1/feature.rb index e4a3423dd037..0040a908cfd4 100644 --- a/google-cloud-gke_hub-v1/proto_docs/google/cloud/gkehub/v1/feature.rb +++ b/google-cloud-gke_hub-v1/proto_docs/google/cloud/gkehub/v1/feature.rb @@ -21,29 +21,30 @@ module Google module Cloud module GkeHub module V1 - # Feature represents the settings and status of any Hub Feature. + # Feature represents the settings and status of any Fleet Feature. # @!attribute [r] name # @return [::String] # Output only. The full, unique name of this Feature resource in the format # `projects/*/locations/*/features/*`. # @!attribute [rw] labels # @return [::Google::Protobuf::Map{::String => ::String}] - # GCP labels for this Feature. + # Labels for this Feature. # @!attribute [r] resource_state # @return [::Google::Cloud::GkeHub::V1::FeatureResourceState] # Output only. State of the Feature resource itself. # @!attribute [rw] spec # @return [::Google::Cloud::GkeHub::V1::CommonFeatureSpec] - # Optional. Hub-wide Feature configuration. If this Feature does not support any - # Hub-wide configuration, this field may be unused. + # Optional. Fleet-wide Feature configuration. If this Feature does not + # support any Fleet-wide configuration, this field may be unused. # @!attribute [rw] membership_specs # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::GkeHub::V1::MembershipFeatureSpec}] - # Optional. Membership-specific configuration for this Feature. If this Feature does - # not support any per-Membership configuration, this field may be unused. + # Optional. Membership-specific configuration for this Feature. If this + # Feature does not support any per-Membership configuration, this field may + # be unused. # # The keys indicate which Membership the configuration is for, in the form: # - # projects/{p}/locations/{l}/memberships/{m} + # `projects/{p}/locations/{l}/memberships/{m}` # # Where \\{p} is the project, \\{l} is a valid location and \\{m} is a valid # Membership in this project at that location. \\{p} WILL match the Feature's @@ -57,7 +58,7 @@ module V1 # mutating a Feature. # @!attribute [r] state # @return [::Google::Cloud::GkeHub::V1::CommonFeatureState] - # Output only. The Hub-wide Feature state. + # Output only. The Fleet-wide Feature state. # @!attribute [r] membership_states # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::GkeHub::V1::MembershipFeatureState}] # Output only. Membership-specific Feature status. If this Feature does @@ -65,7 +66,7 @@ module V1 # # The keys indicate which Membership the state is for, in the form: # - # projects/{p}/locations/{l}/memberships/{m} + # `projects/{p}/locations/{l}/memberships/{m}` # # Where \\{p} is the project number, \\{l} is a valid location and \\{m} is a valid # Membership in this project at that location. \\{p} MUST match the Feature's @@ -79,6 +80,39 @@ module V1 # @!attribute [r] delete_time # @return [::Google::Protobuf::Timestamp] # Output only. When the Feature resource was deleted. + # @!attribute [rw] scope_specs + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::GkeHub::V1::ScopeFeatureSpec}] + # Optional. Scope-specific configuration for this Feature. If this Feature + # does not support any per-Scope configuration, this field may be unused. + # + # The keys indicate which Scope the configuration is for, in the form: + # + # `projects/{p}/locations/global/scopes/{s}` + # + # Where \\{p} is the project, \\{s} is a valid Scope in this project. + # \\{p} WILL match the Feature's project. + # + # \\{p} will always be returned as the project number, but the project ID is + # also accepted during input. If the same Scope is specified in the map + # twice (using the project ID form, and the project number form), exactly + # ONE of the entries will be saved, with no guarantees as to which. For this + # reason, it is recommended the same format be used for all entries when + # mutating a Feature. + # @!attribute [r] scope_states + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::GkeHub::V1::ScopeFeatureState}] + # Output only. Scope-specific Feature status. If this Feature does + # report any per-Scope status, this field may be unused. + # + # The keys indicate which Scope the state is for, in the form: + # + # `projects/{p}/locations/global/scopes/{s}` + # + # Where \\{p} is the project, \\{s} is a valid Scope in this project. + # \\{p} WILL match the Feature's project. + # @!attribute [r] unreachable + # @return [::Array<::String>] + # Output only. List of locations that could not be reached while fetching + # this feature. class Feature include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -109,11 +143,29 @@ class MembershipStatesEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::GkeHub::V1::ScopeFeatureSpec] + class ScopeSpecsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::GkeHub::V1::ScopeFeatureState] + class ScopeStatesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end end # FeatureResourceState describes the state of a Feature *resource* in the # GkeHub API. See `FeatureState` for the "running state" of the Feature in the - # Hub and across Memberships. + # Fleet and across Memberships. # @!attribute [rw] state # @return [::Google::Cloud::GkeHub::V1::FeatureResourceState::State] # The current state of the Feature resource in the Hub API. @@ -127,14 +179,14 @@ module State STATE_UNSPECIFIED = 0 # The Feature is being enabled, and the Feature resource is being created. - # Once complete, the corresponding Feature will be enabled in this Hub. + # Once complete, the corresponding Feature will be enabled in this Fleet. ENABLING = 1 - # The Feature is enabled in this Hub, and the Feature resource is fully + # The Feature is enabled in this Fleet, and the Feature resource is fully # available. ACTIVE = 2 - # The Feature is being disabled in this Hub, and the Feature resource + # The Feature is being disabled in this Fleet, and the Feature resource # is being deleted. DISABLING = 3 @@ -193,15 +245,33 @@ class CommonFeatureSpec extend ::Google::Protobuf::MessageExts::ClassMethods end - # CommonFeatureState contains Hub-wide Feature status information. + # CommonFeatureState contains Fleet-wide Feature status information. + # @!attribute [rw] rbacrolebindingactuation + # @return [::Google::Cloud::GkeHub::RbacRoleBindingActuation::V1::FeatureState] + # RBAC Role Binding Actuation feature state # @!attribute [r] state # @return [::Google::Cloud::GkeHub::V1::FeatureState] - # Output only. The "running state" of the Feature in this Hub. + # Output only. The "running state" of the Feature in this Fleet. class CommonFeatureState include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end + # ScopeFeatureSpec contains feature specs for a fleet scope. + class ScopeFeatureSpec + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # ScopeFeatureState contains Scope-wide Feature status information. + # @!attribute [r] state + # @return [::Google::Cloud::GkeHub::V1::FeatureState] + # Output only. The "running state" of the Feature in this Scope. + class ScopeFeatureState + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # MembershipFeatureSpec contains configuration information for a single # Membership. # @!attribute [rw] configmanagement diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/cloud/gkehub/v1/fleet.rb b/google-cloud-gke_hub-v1/proto_docs/google/cloud/gkehub/v1/fleet.rb similarity index 100% rename from owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/cloud/gkehub/v1/fleet.rb rename to google-cloud-gke_hub-v1/proto_docs/google/cloud/gkehub/v1/fleet.rb diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/cloud/gkehub/v1/rbacrolebindingactuation/rbacrolebindingactuation.rb b/google-cloud-gke_hub-v1/proto_docs/google/cloud/gkehub/v1/rbacrolebindingactuation/rbacrolebindingactuation.rb similarity index 100% rename from owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/cloud/gkehub/v1/rbacrolebindingactuation/rbacrolebindingactuation.rb rename to google-cloud-gke_hub-v1/proto_docs/google/cloud/gkehub/v1/rbacrolebindingactuation/rbacrolebindingactuation.rb diff --git a/google-cloud-gke_hub-v1/proto_docs/google/cloud/gkehub/v1/service.rb b/google-cloud-gke_hub-v1/proto_docs/google/cloud/gkehub/v1/service.rb index e2d4f9ce6337..5f2e01c613b9 100644 --- a/google-cloud-gke_hub-v1/proto_docs/google/cloud/gkehub/v1/service.rb +++ b/google-cloud-gke_hub-v1/proto_docs/google/cloud/gkehub/v1/service.rb @@ -21,6 +21,397 @@ module Google module Cloud module GkeHub module V1 + # Request message for the `GkeHub.GetNamespace` method. + # @!attribute [rw] name + # @return [::String] + # Required. The Namespace resource name in the format + # `projects/*/locations/*/scopes/*/namespaces/*`. + class GetScopeNamespaceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to create a fleet namespace. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent (project and location) where the Namespace will be + # created. Specified in the format `projects/*/locations/*/scopes/*`. + # @!attribute [rw] scope_namespace_id + # @return [::String] + # Required. Client chosen ID for the Namespace. `namespace_id` must be a + # valid RFC 1123 compliant DNS label: + # + # 1. At most 63 characters in length + # 2. It must consist of lower case alphanumeric characters or `-` + # 3. It must start and end with an alphanumeric character + # + # Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, + # with a maximum length of 63 characters. + # @!attribute [rw] scope_namespace + # @return [::Google::Cloud::GkeHub::V1::Namespace] + # Required. The fleet namespace to create. + class CreateScopeNamespaceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to update a fleet namespace. + # @!attribute [rw] scope_namespace + # @return [::Google::Cloud::GkeHub::V1::Namespace] + # Required. A namespace with fields updated. The 'name' field in this + # namespace is used to identify the resource to update. Given 'updated' + # prefix to follow go/proto-best-practices-checkers#keyword_conflict + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. The fields to be updated. + class UpdateScopeNamespaceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to delete a fleet namespace. + # @!attribute [rw] name + # @return [::String] + # Required. The Namespace resource name in the format + # `projects/*/locations/*/scopes/*/namespaces/*`. + class DeleteScopeNamespaceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to list fleet namespaces. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent (project and location) where the Features will be + # listed. Specified in the format `projects/*/locations/*/scopes/*`. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. When requesting a 'page' of resources, `page_size` specifies + # number of resources to return. If unspecified or set to 0, all resources + # will be returned. + # @!attribute [rw] page_token + # @return [::String] + # Optional. Token returned by previous call to `ListFeatures` which + # specifies the position in the list from where to continue listing the + # resources. + class ListScopeNamespacesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List of fleet namespaces. + # @!attribute [rw] scope_namespaces + # @return [::Array<::Google::Cloud::GkeHub::V1::Namespace>] + # The list of fleet namespaces + # @!attribute [rw] next_page_token + # @return [::String] + # A token to request the next page of resources from the + # `ListNamespaces` method. The value of an empty string means + # that there are no more resources to return. + class ListScopeNamespacesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `GkeHub.GetScopeRBACRoleBinding` method. + # @!attribute [rw] name + # @return [::String] + # Required. The RBACRoleBinding resource name in the format + # `projects/*/locations/*/scopes/*/rbacrolebindings/*`. + class GetScopeRBACRoleBindingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to create a rbacrolebindings. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent (project and location) where the RBACRoleBinding will + # be created. Specified in the format `projects/*/locations/*/scopes/*`. + # @!attribute [rw] rbacrolebinding_id + # @return [::String] + # Required. Client chosen ID for the RBACRoleBinding. `rbacrolebinding_id` + # must be a valid RFC 1123 compliant DNS label: + # + # 1. At most 63 characters in length + # 2. It must consist of lower case alphanumeric characters or `-` + # 3. It must start and end with an alphanumeric character + # + # Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, + # with a maximum length of 63 characters. + # @!attribute [rw] rbacrolebinding + # @return [::Google::Cloud::GkeHub::V1::RBACRoleBinding] + # Required. The rbacrolebindings to create. + class CreateScopeRBACRoleBindingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to update a scope rbacrolebinding. + # @!attribute [rw] rbacrolebinding + # @return [::Google::Cloud::GkeHub::V1::RBACRoleBinding] + # Required. A rbacrolebinding with fields updated. The 'name' field in this + # rbacrolebinding is used to identify the resource to update. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. The fields to be updated. + class UpdateScopeRBACRoleBindingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to delete a Scope RBACRoleBinding. + # @!attribute [rw] name + # @return [::String] + # Required. The RBACRoleBinding resource name in the format + # `projects/*/locations/*/scopes/*/rbacrolebindings/*`. + class DeleteScopeRBACRoleBindingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to list Scope RBACRoleBindings. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent (project and location) where the Features will be + # listed. Specified in the format `projects/*/locations/*/scopes/*`. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. When requesting a 'page' of resources, `page_size` specifies + # number of resources to return. If unspecified or set to 0, all resources + # will be returned. + # @!attribute [rw] page_token + # @return [::String] + # Optional. Token returned by previous call to `ListScopeRBACRoleBindings` + # which specifies the position in the list from where to continue listing the + # resources. + class ListScopeRBACRoleBindingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List of Scope RBACRoleBindings. + # @!attribute [rw] rbacrolebindings + # @return [::Array<::Google::Cloud::GkeHub::V1::RBACRoleBinding>] + # The list of Scope RBACRoleBindings. + # @!attribute [rw] next_page_token + # @return [::String] + # A token to request the next page of resources from the + # `ListScopeRBACRoleBindings` method. The value of an empty string means + # that there are no more resources to return. + class ListScopeRBACRoleBindingsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `GkeHub.GetScope` method. + # @!attribute [rw] name + # @return [::String] + # Required. The Scope resource name in the format + # `projects/*/locations/*/scopes/*`. + class GetScopeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to create a Scope. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent (project and location) where the Scope will be + # created. Specified in the format `projects/*/locations/*`. + # @!attribute [rw] scope_id + # @return [::String] + # Required. Client chosen ID for the Scope. `scope_id` must be a + # ???? + # @!attribute [rw] scope + # @return [::Google::Cloud::GkeHub::V1::Scope] + # Required. The Scope to create. + class CreateScopeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to update a Scope. + # @!attribute [rw] scope + # @return [::Google::Cloud::GkeHub::V1::Scope] + # Required. A Scope with fields updated. The 'name' field in this + # namespace is used to identify the resource to update. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. The fields to be updated. + class UpdateScopeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to delete a Scope. + # @!attribute [rw] name + # @return [::String] + # Required. The Scope resource name in the format + # `projects/*/locations/*/scopes/*`. + class DeleteScopeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to list Scopes. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent (project and location) where the Scope will be listed. + # Specified in the format `projects/*/locations/*`. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. When requesting a 'page' of resources, `page_size` specifies + # number of resources to return. If unspecified or set to 0, all resources + # will be returned. + # @!attribute [rw] page_token + # @return [::String] + # Optional. Token returned by previous call to `ListScopes` which + # specifies the position in the list from where to continue listing the + # resources. + class ListScopesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List of Scopes. + # @!attribute [rw] scopes + # @return [::Array<::Google::Cloud::GkeHub::V1::Scope>] + # The list of Scopes + # @!attribute [rw] next_page_token + # @return [::String] + # A token to request the next page of resources from the + # `ListScopes` method. The value of an empty string means + # that there are no more resources to return. + class ListScopesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to list permitted Scopes. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent (project and location) where the Scope will be listed. + # Specified in the format `projects/*/locations/*`. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. When requesting a 'page' of resources, `page_size` specifies + # number of resources to return. If unspecified or set to 0, all resources + # will be returned. + # @!attribute [rw] page_token + # @return [::String] + # Optional. Token returned by previous call to `ListPermittedScopes` which + # specifies the position in the list from where to continue listing the + # resources. + class ListPermittedScopesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List of permitted Scopes. + # @!attribute [rw] scopes + # @return [::Array<::Google::Cloud::GkeHub::V1::Scope>] + # The list of permitted Scopes + # @!attribute [rw] next_page_token + # @return [::String] + # A token to request the next page of resources from the + # `ListPermittedScopes` method. The value of an empty string means + # that there are no more resources to return. + class ListPermittedScopesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `GkeHub.GetMembershipBinding` method. + # @!attribute [rw] name + # @return [::String] + # Required. The MembershipBinding resource name in the format + # `projects/*/locations/*/memberships/*/bindings/*`. + class GetMembershipBindingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to create a MembershipBinding. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent (project and location) where the MembershipBinding + # will be created. Specified in the format + # `projects/*/locations/*/memberships/*`. + # @!attribute [rw] membership_binding + # @return [::Google::Cloud::GkeHub::V1::MembershipBinding] + # Required. The MembershipBinding to create. + # @!attribute [rw] membership_binding_id + # @return [::String] + # Required. The ID to use for the MembershipBinding. + class CreateMembershipBindingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to update a MembershipBinding. + # @!attribute [rw] membership_binding + # @return [::Google::Cloud::GkeHub::V1::MembershipBinding] + # Required. The MembershipBinding object with fields updated. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. The fields to be updated. + class UpdateMembershipBindingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to delete a Binding. + # @!attribute [rw] name + # @return [::String] + # Required. The MembershipBinding resource name in the format + # `projects/*/locations/*/memberships/*/bindings/*`. + class DeleteMembershipBindingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to list MembershipBinding. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent Membership for which the MembershipBindings will be + # listed. Specified in the format `projects/*/locations/*/memberships/*`. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. When requesting a 'page' of resources, `page_size` specifies + # number of resources to return. If unspecified or set to 0, all resources + # will be returned. + # @!attribute [rw] page_token + # @return [::String] + # Optional. Token returned by previous call to `ListMembershipBindings` which + # specifies the position in the list from where to continue listing the + # resources. + # @!attribute [rw] filter + # @return [::String] + # Optional. Lists MembershipBindings that match the filter expression, + # following the syntax outlined in https://google.aip.dev/160. + class ListMembershipBindingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List of MembershipBindings. + # @!attribute [rw] membership_bindings + # @return [::Array<::Google::Cloud::GkeHub::V1::MembershipBinding>] + # The list of membership_bindings + # @!attribute [rw] next_page_token + # @return [::String] + # A token to request the next page of resources from the + # `ListMembershipBindings` method. The value of an empty string means + # that there are no more resources to return. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # List of locations that could not be reached while fetching this list. + class ListMembershipBindingsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # Request message for `GkeHub.ListMemberships` method. # @!attribute [rw] parent # @return [::String] @@ -68,6 +459,134 @@ class ListMembershipsRequest extend ::Google::Protobuf::MessageExts::ClassMethods end + # Request message for the `GkeHub.GetMembershipRBACRoleBinding` method. + # @!attribute [rw] name + # @return [::String] + # Required. The RBACRoleBinding resource name in the format + # `projects/*/locations/*/memberships/*/rbacrolebindings/*`. + class GetMembershipRBACRoleBindingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to create a rbacrolebindings. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent (project and location) where the RBACRoleBinding will + # be created. Specified in the format `projects/*/locations/*/memberships/*`. + # @!attribute [rw] rbacrolebinding_id + # @return [::String] + # Required. Client chosen ID for the RBACRoleBinding. `rbacrolebinding_id` + # must be a valid RFC 1123 compliant DNS label: + # + # 1. At most 63 characters in length + # 2. It must consist of lower case alphanumeric characters or `-` + # 3. It must start and end with an alphanumeric character + # + # Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, + # with a maximum length of 63 characters. + # @!attribute [rw] rbacrolebinding + # @return [::Google::Cloud::GkeHub::V1::RBACRoleBinding] + # Required. The rbacrolebindings to create. + class CreateMembershipRBACRoleBindingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to update a membership rbacrolebinding. + # @!attribute [rw] rbacrolebinding + # @return [::Google::Cloud::GkeHub::V1::RBACRoleBinding] + # Required. A rbacrolebinding with fields updated. The 'name' field in this + # rbacrolebinding is used to identify the resource to update. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. The fields to be updated. + class UpdateMembershipRBACRoleBindingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to delete a Membership RBACRoleBinding. + # @!attribute [rw] name + # @return [::String] + # Required. The RBACRoleBinding resource name in the format + # `projects/*/locations/*/memberships/*/rbacrolebindings/*`. + class DeleteMembershipRBACRoleBindingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to list Membership RBACRoleBindings. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent (project and location) where the Features will be + # listed. Specified in the format `projects/*/locations/*/memberships/*`. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. When requesting a 'page' of resources, `page_size` specifies + # number of resources to return. If unspecified or set to 0, all resources + # will be returned. + # @!attribute [rw] page_token + # @return [::String] + # Optional. Token returned by previous call to + # `ListMembershipRBACRoleBindings` which specifies the position in the list + # from where to continue listing the resources. + class ListMembershipRBACRoleBindingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List of Membership RBACRoleBindings. + # @!attribute [rw] rbacrolebindings + # @return [::Array<::Google::Cloud::GkeHub::V1::RBACRoleBinding>] + # The list of Membership RBACRoleBindings. + # @!attribute [rw] next_page_token + # @return [::String] + # A token to request the next page of resources from the + # `ListMembershipRBACRoleBindings` method. The value of an empty string means + # that there are no more resources to return. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # List of locations that could not be reached while fetching this list. + class ListMembershipRBACRoleBindingsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to generate a YAML of the RBAC policies for the specified + # RoleBinding and its associated impersonation resources. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent (project and location) where the RBACRoleBinding will + # be created. Specified in the format `projects/*/locations/*/memberships/*`. + # @!attribute [rw] rbacrolebinding_id + # @return [::String] + # Required. Client chosen ID for the RBACRoleBinding. `rbacrolebinding_id` + # must be a valid RFC 1123 compliant DNS label: + # + # 1. At most 63 characters in length + # 2. It must consist of lower case alphanumeric characters or `-` + # 3. It must start and end with an alphanumeric character + # + # Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, + # with a maximum length of 63 characters. + # @!attribute [rw] rbacrolebinding + # @return [::Google::Cloud::GkeHub::V1::RBACRoleBinding] + # Required. The rbacrolebindings to generate the YAML for. + class GenerateMembershipRBACRoleBindingYAMLRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for GenerateRBACRoleBindingYAML. + # @!attribute [rw] role_bindings_yaml + # @return [::String] + # a yaml text blob including the RBAC policies. + class GenerateMembershipRBACRoleBindingYAMLResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # Response message for the `GkeHub.ListMemberships` method. # @!attribute [rw] resources # @return [::Array<::Google::Cloud::GkeHub::V1::Membership>] @@ -95,6 +614,50 @@ class GetMembershipRequest extend ::Google::Protobuf::MessageExts::ClassMethods end + # Request to list Memberships bound to a Scope. + # @!attribute [rw] scope_name + # @return [::String] + # Required. Name of the Scope, in the format + # `projects/*/locations/global/scopes/*`, to which the Memberships are bound. + # @!attribute [rw] filter + # @return [::String] + # Optional. Lists Memberships that match the filter expression, following the + # syntax outlined in https://google.aip.dev/160. Currently, filtering + # can be done only based on Memberships's `name`, `labels`, `create_time`, + # `update_time`, and `unique_id`. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. When requesting a 'page' of resources, `page_size` specifies + # number of resources to return. If unspecified or set to 0, all resources + # will be returned. Pagination is currently not supported; therefore, setting + # this field does not have any impact for now. + # @!attribute [rw] page_token + # @return [::String] + # Optional. Token returned by previous call to `ListBoundMemberships` which + # specifies the position in the list from where to continue listing the + # resources. + class ListBoundMembershipsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # List of Memberships bound to a Scope. + # @!attribute [rw] memberships + # @return [::Array<::Google::Cloud::GkeHub::V1::Membership>] + # The list of Memberships bound to the given Scope. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # List of locations that could not be reached while fetching this list. + # @!attribute [rw] next_page_token + # @return [::String] + # A token to request the next page of resources from the + # `ListBoundMemberships` method. The value of an empty string means that + # there are no more resources to return. + class ListBoundMembershipsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # Request message for the `GkeHub.CreateMembership` method. # @!attribute [rw] parent # @return [::String] @@ -318,6 +881,12 @@ class TypeMeta # @return [::String] # One or more fields to compare and use to sort the output. # See https://google.aip.dev/132#ordering. + # @!attribute [rw] return_partial_success + # @return [::Boolean] + # Optional. If set to true, the response will return partial results when + # some regions are unreachable and the unreachable field in Feature proto + # will be populated. If set to false, the request will fail when some regions + # are unreachable. class ListFeaturesRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -342,6 +911,12 @@ class ListFeaturesResponse # @return [::String] # Required. The Feature resource name in the format # `projects/*/locations/*/features/*` + # @!attribute [rw] return_partial_success + # @return [::Boolean] + # Optional. If set to true, the response will return partial results when + # some regions are unreachable and the unreachable field in Feature proto + # will be populated. If set to false, the request will fail when some regions + # are unreachable. class GetFeatureRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods @@ -360,7 +935,7 @@ class GetFeatureRequest # The Feature resource to create. # @!attribute [rw] request_id # @return [::String] - # Optional. A request ID to identify requests. Specify a unique request ID + # A request ID to identify requests. Specify a unique request ID # so that if you must retry your request, the server will know to ignore # the request if it has already been completed. The server will guarantee # that for at least 60 minutes after the first request. @@ -428,7 +1003,7 @@ class DeleteFeatureRequest # user-modifiable fields to match `resource`. # @!attribute [rw] request_id # @return [::String] - # Optional. A request ID to identify requests. Specify a unique request ID + # A request ID to identify requests. Specify a unique request ID # so that if you must retry your request, the server will know to ignore # the request if it has already been completed. The server will guarantee # that for at least 60 minutes after the first request. @@ -446,6 +1021,90 @@ class UpdateFeatureRequest extend ::Google::Protobuf::MessageExts::ClassMethods end + # Request message for the `GkeHub.CreateFleet` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent (project and location) where the Fleet will be + # created. Specified in the format `projects/*/locations/*`. + # @!attribute [rw] fleet + # @return [::Google::Cloud::GkeHub::V1::Fleet] + # Required. The fleet to create. + class CreateFleetRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `GkeHub.GetFleet` method. + # @!attribute [rw] name + # @return [::String] + # Required. The Fleet resource name in the format + # `projects/*/locations/*/fleets/*`. + class GetFleetRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `GkeHub.UpdateFleet` method. + # @!attribute [rw] fleet + # @return [::Google::Cloud::GkeHub::V1::Fleet] + # Required. The Fleet to update. + # + # The `name` field of the Fleet object identifies which fleet will be + # updated. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. The fields to be updated; + class UpdateFleetRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for `GkeHub.DeleteFleet` method. + # @!attribute [rw] name + # @return [::String] + # Required. The Fleet resource name in the format + # `projects/*/locations/*/fleets/*`. + class DeleteFleetRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for the `GkeHub.ListFleets` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The organization or project to list for Fleets under, in the + # format `organizations/*/locations/*` or `projects/*/locations/*`. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `ListFleets` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListFleets` must match + # the call that provided the page token. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of fleets to return. The service may return + # fewer than this value. If unspecified, at most 200 fleets will be returned. + # The maximum value is 1000; values above 1000 will be coerced to 1000. + class ListFleetsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for the `GkeHub.ListFleetsResponse` method. + # @!attribute [rw] fleets + # @return [::Array<::Google::Cloud::GkeHub::V1::Fleet>] + # The list of matching fleets. + # @!attribute [rw] next_page_token + # @return [::String] + # A token, which can be sent as `page_token` to retrieve the next page. + # If this field is omitted, there are no subsequent pages. + # The token is only valid for 1h. + class ListFleetsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + # Represents the metadata of the long-running operation. # @!attribute [r] create_time # @return [::Google::Protobuf::Timestamp] @@ -466,9 +1125,10 @@ class UpdateFeatureRequest # @return [::Boolean] # Output only. Identifies whether the user has requested cancellation # of the operation. Operations that have successfully been cancelled - # have [Operation.error][] value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of 1, corresponding to - # `Code.CANCELLED`. + # have + # {::Google::Longrunning::Operation#error google.longrunning.Operation.error} + # value with a {::Google::Rpc::Status#code google.rpc.Status.code} of 1, + # corresponding to `Code.CANCELLED`. # @!attribute [r] api_version # @return [::String] # Output only. API version used to start the operation. diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/create_fleet.rb b/google-cloud-gke_hub-v1/snippets/gke_hub/create_fleet.rb similarity index 100% rename from owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/create_fleet.rb rename to google-cloud-gke_hub-v1/snippets/gke_hub/create_fleet.rb diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/create_membership_binding.rb b/google-cloud-gke_hub-v1/snippets/gke_hub/create_membership_binding.rb similarity index 100% rename from owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/create_membership_binding.rb rename to google-cloud-gke_hub-v1/snippets/gke_hub/create_membership_binding.rb diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/create_membership_rbac_role_binding.rb b/google-cloud-gke_hub-v1/snippets/gke_hub/create_membership_rbac_role_binding.rb similarity index 100% rename from owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/create_membership_rbac_role_binding.rb rename to google-cloud-gke_hub-v1/snippets/gke_hub/create_membership_rbac_role_binding.rb diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/create_scope.rb b/google-cloud-gke_hub-v1/snippets/gke_hub/create_scope.rb similarity index 100% rename from owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/create_scope.rb rename to google-cloud-gke_hub-v1/snippets/gke_hub/create_scope.rb diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/create_scope_namespace.rb b/google-cloud-gke_hub-v1/snippets/gke_hub/create_scope_namespace.rb similarity index 100% rename from owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/create_scope_namespace.rb rename to google-cloud-gke_hub-v1/snippets/gke_hub/create_scope_namespace.rb diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/create_scope_rbac_role_binding.rb b/google-cloud-gke_hub-v1/snippets/gke_hub/create_scope_rbac_role_binding.rb similarity index 100% rename from owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/create_scope_rbac_role_binding.rb rename to google-cloud-gke_hub-v1/snippets/gke_hub/create_scope_rbac_role_binding.rb diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/delete_fleet.rb b/google-cloud-gke_hub-v1/snippets/gke_hub/delete_fleet.rb similarity index 100% rename from owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/delete_fleet.rb rename to google-cloud-gke_hub-v1/snippets/gke_hub/delete_fleet.rb diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/delete_membership_binding.rb b/google-cloud-gke_hub-v1/snippets/gke_hub/delete_membership_binding.rb similarity index 100% rename from owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/delete_membership_binding.rb rename to google-cloud-gke_hub-v1/snippets/gke_hub/delete_membership_binding.rb diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/delete_membership_rbac_role_binding.rb b/google-cloud-gke_hub-v1/snippets/gke_hub/delete_membership_rbac_role_binding.rb similarity index 100% rename from owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/delete_membership_rbac_role_binding.rb rename to google-cloud-gke_hub-v1/snippets/gke_hub/delete_membership_rbac_role_binding.rb diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/delete_scope.rb b/google-cloud-gke_hub-v1/snippets/gke_hub/delete_scope.rb similarity index 100% rename from owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/delete_scope.rb rename to google-cloud-gke_hub-v1/snippets/gke_hub/delete_scope.rb diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/delete_scope_namespace.rb b/google-cloud-gke_hub-v1/snippets/gke_hub/delete_scope_namespace.rb similarity index 100% rename from owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/delete_scope_namespace.rb rename to google-cloud-gke_hub-v1/snippets/gke_hub/delete_scope_namespace.rb diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/delete_scope_rbac_role_binding.rb b/google-cloud-gke_hub-v1/snippets/gke_hub/delete_scope_rbac_role_binding.rb similarity index 100% rename from owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/delete_scope_rbac_role_binding.rb rename to google-cloud-gke_hub-v1/snippets/gke_hub/delete_scope_rbac_role_binding.rb diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/generate_membership_rbac_role_binding_yaml.rb b/google-cloud-gke_hub-v1/snippets/gke_hub/generate_membership_rbac_role_binding_yaml.rb similarity index 100% rename from owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/generate_membership_rbac_role_binding_yaml.rb rename to google-cloud-gke_hub-v1/snippets/gke_hub/generate_membership_rbac_role_binding_yaml.rb diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/get_fleet.rb b/google-cloud-gke_hub-v1/snippets/gke_hub/get_fleet.rb similarity index 100% rename from owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/get_fleet.rb rename to google-cloud-gke_hub-v1/snippets/gke_hub/get_fleet.rb diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/get_membership_binding.rb b/google-cloud-gke_hub-v1/snippets/gke_hub/get_membership_binding.rb similarity index 100% rename from owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/get_membership_binding.rb rename to google-cloud-gke_hub-v1/snippets/gke_hub/get_membership_binding.rb diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/get_membership_rbac_role_binding.rb b/google-cloud-gke_hub-v1/snippets/gke_hub/get_membership_rbac_role_binding.rb similarity index 100% rename from owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/get_membership_rbac_role_binding.rb rename to google-cloud-gke_hub-v1/snippets/gke_hub/get_membership_rbac_role_binding.rb diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/get_scope.rb b/google-cloud-gke_hub-v1/snippets/gke_hub/get_scope.rb similarity index 100% rename from owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/get_scope.rb rename to google-cloud-gke_hub-v1/snippets/gke_hub/get_scope.rb diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/get_scope_namespace.rb b/google-cloud-gke_hub-v1/snippets/gke_hub/get_scope_namespace.rb similarity index 100% rename from owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/get_scope_namespace.rb rename to google-cloud-gke_hub-v1/snippets/gke_hub/get_scope_namespace.rb diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/get_scope_rbac_role_binding.rb b/google-cloud-gke_hub-v1/snippets/gke_hub/get_scope_rbac_role_binding.rb similarity index 100% rename from owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/get_scope_rbac_role_binding.rb rename to google-cloud-gke_hub-v1/snippets/gke_hub/get_scope_rbac_role_binding.rb diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/list_bound_memberships.rb b/google-cloud-gke_hub-v1/snippets/gke_hub/list_bound_memberships.rb similarity index 100% rename from owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/list_bound_memberships.rb rename to google-cloud-gke_hub-v1/snippets/gke_hub/list_bound_memberships.rb diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/list_fleets.rb b/google-cloud-gke_hub-v1/snippets/gke_hub/list_fleets.rb similarity index 100% rename from owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/list_fleets.rb rename to google-cloud-gke_hub-v1/snippets/gke_hub/list_fleets.rb diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/list_membership_bindings.rb b/google-cloud-gke_hub-v1/snippets/gke_hub/list_membership_bindings.rb similarity index 100% rename from owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/list_membership_bindings.rb rename to google-cloud-gke_hub-v1/snippets/gke_hub/list_membership_bindings.rb diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/list_membership_rbac_role_bindings.rb b/google-cloud-gke_hub-v1/snippets/gke_hub/list_membership_rbac_role_bindings.rb similarity index 100% rename from owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/list_membership_rbac_role_bindings.rb rename to google-cloud-gke_hub-v1/snippets/gke_hub/list_membership_rbac_role_bindings.rb diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/list_permitted_scopes.rb b/google-cloud-gke_hub-v1/snippets/gke_hub/list_permitted_scopes.rb similarity index 100% rename from owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/list_permitted_scopes.rb rename to google-cloud-gke_hub-v1/snippets/gke_hub/list_permitted_scopes.rb diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/list_scope_namespaces.rb b/google-cloud-gke_hub-v1/snippets/gke_hub/list_scope_namespaces.rb similarity index 100% rename from owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/list_scope_namespaces.rb rename to google-cloud-gke_hub-v1/snippets/gke_hub/list_scope_namespaces.rb diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/list_scope_rbac_role_bindings.rb b/google-cloud-gke_hub-v1/snippets/gke_hub/list_scope_rbac_role_bindings.rb similarity index 100% rename from owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/list_scope_rbac_role_bindings.rb rename to google-cloud-gke_hub-v1/snippets/gke_hub/list_scope_rbac_role_bindings.rb diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/list_scopes.rb b/google-cloud-gke_hub-v1/snippets/gke_hub/list_scopes.rb similarity index 100% rename from owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/list_scopes.rb rename to google-cloud-gke_hub-v1/snippets/gke_hub/list_scopes.rb diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/update_fleet.rb b/google-cloud-gke_hub-v1/snippets/gke_hub/update_fleet.rb similarity index 100% rename from owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/update_fleet.rb rename to google-cloud-gke_hub-v1/snippets/gke_hub/update_fleet.rb diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/update_membership_binding.rb b/google-cloud-gke_hub-v1/snippets/gke_hub/update_membership_binding.rb similarity index 100% rename from owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/update_membership_binding.rb rename to google-cloud-gke_hub-v1/snippets/gke_hub/update_membership_binding.rb diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/update_membership_rbac_role_binding.rb b/google-cloud-gke_hub-v1/snippets/gke_hub/update_membership_rbac_role_binding.rb similarity index 100% rename from owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/update_membership_rbac_role_binding.rb rename to google-cloud-gke_hub-v1/snippets/gke_hub/update_membership_rbac_role_binding.rb diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/update_scope.rb b/google-cloud-gke_hub-v1/snippets/gke_hub/update_scope.rb similarity index 100% rename from owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/update_scope.rb rename to google-cloud-gke_hub-v1/snippets/gke_hub/update_scope.rb diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/update_scope_namespace.rb b/google-cloud-gke_hub-v1/snippets/gke_hub/update_scope_namespace.rb similarity index 100% rename from owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/update_scope_namespace.rb rename to google-cloud-gke_hub-v1/snippets/gke_hub/update_scope_namespace.rb diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/update_scope_rbac_role_binding.rb b/google-cloud-gke_hub-v1/snippets/gke_hub/update_scope_rbac_role_binding.rb similarity index 100% rename from owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/update_scope_rbac_role_binding.rb rename to google-cloud-gke_hub-v1/snippets/gke_hub/update_scope_rbac_role_binding.rb diff --git a/google-cloud-gke_hub-v1/snippets/snippet_metadata_google.cloud.gkehub.v1.json b/google-cloud-gke_hub-v1/snippets/snippet_metadata_google.cloud.gkehub.v1.json index becf91c839d6..494027e6799b 100644 --- a/google-cloud-gke_hub-v1/snippets/snippet_metadata_google.cloud.gkehub.v1.json +++ b/google-cloud-gke_hub-v1/snippets/snippet_metadata_google.cloud.gkehub.v1.json @@ -51,6 +51,46 @@ } ] }, + { + "region_tag": "gkehub_v1_generated_GkeHub_ListBoundMemberships_sync", + "title": "Snippet for the list_bound_memberships call in the GkeHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#list_bound_memberships.", + "file": "gke_hub/list_bound_memberships.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_bound_memberships", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#list_bound_memberships", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeHub::V1::ListBoundMembershipsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::GkeHub::V1::ListBoundMembershipsResponse", + "client": { + "short_name": "GkeHub::Client", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" + }, + "method": { + "short_name": "ListBoundMemberships", + "full_name": "google.cloud.gkehub.v1.GkeHub.ListBoundMemberships", + "service": { + "short_name": "GkeHub", + "full_name": "google.cloud.gkehub.v1.GkeHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, { "region_tag": "gkehub_v1_generated_GkeHub_ListFeatures_sync", "title": "Snippet for the list_features call in the GkeHub service", @@ -450,6 +490,1286 @@ "type": "FULL" } ] + }, + { + "region_tag": "gkehub_v1_generated_GkeHub_CreateFleet_sync", + "title": "Snippet for the create_fleet call in the GkeHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#create_fleet.", + "file": "gke_hub/create_fleet.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_fleet", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#create_fleet", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeHub::V1::CreateFleetRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "GkeHub::Client", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" + }, + "method": { + "short_name": "CreateFleet", + "full_name": "google.cloud.gkehub.v1.GkeHub.CreateFleet", + "service": { + "short_name": "GkeHub", + "full_name": "google.cloud.gkehub.v1.GkeHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkehub_v1_generated_GkeHub_GetFleet_sync", + "title": "Snippet for the get_fleet call in the GkeHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#get_fleet.", + "file": "gke_hub/get_fleet.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_fleet", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#get_fleet", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeHub::V1::GetFleetRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::GkeHub::V1::Fleet", + "client": { + "short_name": "GkeHub::Client", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" + }, + "method": { + "short_name": "GetFleet", + "full_name": "google.cloud.gkehub.v1.GkeHub.GetFleet", + "service": { + "short_name": "GkeHub", + "full_name": "google.cloud.gkehub.v1.GkeHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkehub_v1_generated_GkeHub_UpdateFleet_sync", + "title": "Snippet for the update_fleet call in the GkeHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#update_fleet.", + "file": "gke_hub/update_fleet.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_fleet", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#update_fleet", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeHub::V1::UpdateFleetRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "GkeHub::Client", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" + }, + "method": { + "short_name": "UpdateFleet", + "full_name": "google.cloud.gkehub.v1.GkeHub.UpdateFleet", + "service": { + "short_name": "GkeHub", + "full_name": "google.cloud.gkehub.v1.GkeHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkehub_v1_generated_GkeHub_DeleteFleet_sync", + "title": "Snippet for the delete_fleet call in the GkeHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#delete_fleet.", + "file": "gke_hub/delete_fleet.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_fleet", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#delete_fleet", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeHub::V1::DeleteFleetRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "GkeHub::Client", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" + }, + "method": { + "short_name": "DeleteFleet", + "full_name": "google.cloud.gkehub.v1.GkeHub.DeleteFleet", + "service": { + "short_name": "GkeHub", + "full_name": "google.cloud.gkehub.v1.GkeHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkehub_v1_generated_GkeHub_ListFleets_sync", + "title": "Snippet for the list_fleets call in the GkeHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#list_fleets.", + "file": "gke_hub/list_fleets.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_fleets", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#list_fleets", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeHub::V1::ListFleetsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::GkeHub::V1::ListFleetsResponse", + "client": { + "short_name": "GkeHub::Client", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" + }, + "method": { + "short_name": "ListFleets", + "full_name": "google.cloud.gkehub.v1.GkeHub.ListFleets", + "service": { + "short_name": "GkeHub", + "full_name": "google.cloud.gkehub.v1.GkeHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkehub_v1_generated_GkeHub_GetScopeNamespace_sync", + "title": "Snippet for the get_scope_namespace call in the GkeHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#get_scope_namespace.", + "file": "gke_hub/get_scope_namespace.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_scope_namespace", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#get_scope_namespace", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeHub::V1::GetScopeNamespaceRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::GkeHub::V1::Namespace", + "client": { + "short_name": "GkeHub::Client", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" + }, + "method": { + "short_name": "GetScopeNamespace", + "full_name": "google.cloud.gkehub.v1.GkeHub.GetScopeNamespace", + "service": { + "short_name": "GkeHub", + "full_name": "google.cloud.gkehub.v1.GkeHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkehub_v1_generated_GkeHub_CreateScopeNamespace_sync", + "title": "Snippet for the create_scope_namespace call in the GkeHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#create_scope_namespace.", + "file": "gke_hub/create_scope_namespace.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_scope_namespace", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#create_scope_namespace", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeHub::V1::CreateScopeNamespaceRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "GkeHub::Client", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" + }, + "method": { + "short_name": "CreateScopeNamespace", + "full_name": "google.cloud.gkehub.v1.GkeHub.CreateScopeNamespace", + "service": { + "short_name": "GkeHub", + "full_name": "google.cloud.gkehub.v1.GkeHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkehub_v1_generated_GkeHub_UpdateScopeNamespace_sync", + "title": "Snippet for the update_scope_namespace call in the GkeHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#update_scope_namespace.", + "file": "gke_hub/update_scope_namespace.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_scope_namespace", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#update_scope_namespace", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeHub::V1::UpdateScopeNamespaceRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "GkeHub::Client", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" + }, + "method": { + "short_name": "UpdateScopeNamespace", + "full_name": "google.cloud.gkehub.v1.GkeHub.UpdateScopeNamespace", + "service": { + "short_name": "GkeHub", + "full_name": "google.cloud.gkehub.v1.GkeHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkehub_v1_generated_GkeHub_DeleteScopeNamespace_sync", + "title": "Snippet for the delete_scope_namespace call in the GkeHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#delete_scope_namespace.", + "file": "gke_hub/delete_scope_namespace.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_scope_namespace", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#delete_scope_namespace", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeHub::V1::DeleteScopeNamespaceRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "GkeHub::Client", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" + }, + "method": { + "short_name": "DeleteScopeNamespace", + "full_name": "google.cloud.gkehub.v1.GkeHub.DeleteScopeNamespace", + "service": { + "short_name": "GkeHub", + "full_name": "google.cloud.gkehub.v1.GkeHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkehub_v1_generated_GkeHub_ListScopeNamespaces_sync", + "title": "Snippet for the list_scope_namespaces call in the GkeHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#list_scope_namespaces.", + "file": "gke_hub/list_scope_namespaces.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_scope_namespaces", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#list_scope_namespaces", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeHub::V1::ListScopeNamespacesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::GkeHub::V1::ListScopeNamespacesResponse", + "client": { + "short_name": "GkeHub::Client", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" + }, + "method": { + "short_name": "ListScopeNamespaces", + "full_name": "google.cloud.gkehub.v1.GkeHub.ListScopeNamespaces", + "service": { + "short_name": "GkeHub", + "full_name": "google.cloud.gkehub.v1.GkeHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkehub_v1_generated_GkeHub_GetScopeRBACRoleBinding_sync", + "title": "Snippet for the get_scope_rbac_role_binding call in the GkeHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#get_scope_rbac_role_binding.", + "file": "gke_hub/get_scope_rbac_role_binding.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_scope_rbac_role_binding", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#get_scope_rbac_role_binding", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeHub::V1::GetScopeRBACRoleBindingRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::GkeHub::V1::RBACRoleBinding", + "client": { + "short_name": "GkeHub::Client", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" + }, + "method": { + "short_name": "GetScopeRBACRoleBinding", + "full_name": "google.cloud.gkehub.v1.GkeHub.GetScopeRBACRoleBinding", + "service": { + "short_name": "GkeHub", + "full_name": "google.cloud.gkehub.v1.GkeHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkehub_v1_generated_GkeHub_CreateScopeRBACRoleBinding_sync", + "title": "Snippet for the create_scope_rbac_role_binding call in the GkeHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#create_scope_rbac_role_binding.", + "file": "gke_hub/create_scope_rbac_role_binding.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_scope_rbac_role_binding", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#create_scope_rbac_role_binding", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeHub::V1::CreateScopeRBACRoleBindingRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "GkeHub::Client", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" + }, + "method": { + "short_name": "CreateScopeRBACRoleBinding", + "full_name": "google.cloud.gkehub.v1.GkeHub.CreateScopeRBACRoleBinding", + "service": { + "short_name": "GkeHub", + "full_name": "google.cloud.gkehub.v1.GkeHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkehub_v1_generated_GkeHub_UpdateScopeRBACRoleBinding_sync", + "title": "Snippet for the update_scope_rbac_role_binding call in the GkeHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#update_scope_rbac_role_binding.", + "file": "gke_hub/update_scope_rbac_role_binding.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_scope_rbac_role_binding", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#update_scope_rbac_role_binding", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeHub::V1::UpdateScopeRBACRoleBindingRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "GkeHub::Client", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" + }, + "method": { + "short_name": "UpdateScopeRBACRoleBinding", + "full_name": "google.cloud.gkehub.v1.GkeHub.UpdateScopeRBACRoleBinding", + "service": { + "short_name": "GkeHub", + "full_name": "google.cloud.gkehub.v1.GkeHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkehub_v1_generated_GkeHub_DeleteScopeRBACRoleBinding_sync", + "title": "Snippet for the delete_scope_rbac_role_binding call in the GkeHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#delete_scope_rbac_role_binding.", + "file": "gke_hub/delete_scope_rbac_role_binding.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_scope_rbac_role_binding", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#delete_scope_rbac_role_binding", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeHub::V1::DeleteScopeRBACRoleBindingRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "GkeHub::Client", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" + }, + "method": { + "short_name": "DeleteScopeRBACRoleBinding", + "full_name": "google.cloud.gkehub.v1.GkeHub.DeleteScopeRBACRoleBinding", + "service": { + "short_name": "GkeHub", + "full_name": "google.cloud.gkehub.v1.GkeHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkehub_v1_generated_GkeHub_ListScopeRBACRoleBindings_sync", + "title": "Snippet for the list_scope_rbac_role_bindings call in the GkeHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#list_scope_rbac_role_bindings.", + "file": "gke_hub/list_scope_rbac_role_bindings.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_scope_rbac_role_bindings", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#list_scope_rbac_role_bindings", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeHub::V1::ListScopeRBACRoleBindingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::GkeHub::V1::ListScopeRBACRoleBindingsResponse", + "client": { + "short_name": "GkeHub::Client", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" + }, + "method": { + "short_name": "ListScopeRBACRoleBindings", + "full_name": "google.cloud.gkehub.v1.GkeHub.ListScopeRBACRoleBindings", + "service": { + "short_name": "GkeHub", + "full_name": "google.cloud.gkehub.v1.GkeHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkehub_v1_generated_GkeHub_GetScope_sync", + "title": "Snippet for the get_scope call in the GkeHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#get_scope.", + "file": "gke_hub/get_scope.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_scope", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#get_scope", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeHub::V1::GetScopeRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::GkeHub::V1::Scope", + "client": { + "short_name": "GkeHub::Client", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" + }, + "method": { + "short_name": "GetScope", + "full_name": "google.cloud.gkehub.v1.GkeHub.GetScope", + "service": { + "short_name": "GkeHub", + "full_name": "google.cloud.gkehub.v1.GkeHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkehub_v1_generated_GkeHub_CreateScope_sync", + "title": "Snippet for the create_scope call in the GkeHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#create_scope.", + "file": "gke_hub/create_scope.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_scope", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#create_scope", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeHub::V1::CreateScopeRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "GkeHub::Client", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" + }, + "method": { + "short_name": "CreateScope", + "full_name": "google.cloud.gkehub.v1.GkeHub.CreateScope", + "service": { + "short_name": "GkeHub", + "full_name": "google.cloud.gkehub.v1.GkeHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkehub_v1_generated_GkeHub_UpdateScope_sync", + "title": "Snippet for the update_scope call in the GkeHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#update_scope.", + "file": "gke_hub/update_scope.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_scope", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#update_scope", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeHub::V1::UpdateScopeRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "GkeHub::Client", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" + }, + "method": { + "short_name": "UpdateScope", + "full_name": "google.cloud.gkehub.v1.GkeHub.UpdateScope", + "service": { + "short_name": "GkeHub", + "full_name": "google.cloud.gkehub.v1.GkeHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkehub_v1_generated_GkeHub_DeleteScope_sync", + "title": "Snippet for the delete_scope call in the GkeHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#delete_scope.", + "file": "gke_hub/delete_scope.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_scope", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#delete_scope", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeHub::V1::DeleteScopeRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "GkeHub::Client", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" + }, + "method": { + "short_name": "DeleteScope", + "full_name": "google.cloud.gkehub.v1.GkeHub.DeleteScope", + "service": { + "short_name": "GkeHub", + "full_name": "google.cloud.gkehub.v1.GkeHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkehub_v1_generated_GkeHub_ListScopes_sync", + "title": "Snippet for the list_scopes call in the GkeHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#list_scopes.", + "file": "gke_hub/list_scopes.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_scopes", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#list_scopes", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeHub::V1::ListScopesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::GkeHub::V1::ListScopesResponse", + "client": { + "short_name": "GkeHub::Client", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" + }, + "method": { + "short_name": "ListScopes", + "full_name": "google.cloud.gkehub.v1.GkeHub.ListScopes", + "service": { + "short_name": "GkeHub", + "full_name": "google.cloud.gkehub.v1.GkeHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkehub_v1_generated_GkeHub_ListPermittedScopes_sync", + "title": "Snippet for the list_permitted_scopes call in the GkeHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#list_permitted_scopes.", + "file": "gke_hub/list_permitted_scopes.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_permitted_scopes", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#list_permitted_scopes", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeHub::V1::ListPermittedScopesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::GkeHub::V1::ListPermittedScopesResponse", + "client": { + "short_name": "GkeHub::Client", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" + }, + "method": { + "short_name": "ListPermittedScopes", + "full_name": "google.cloud.gkehub.v1.GkeHub.ListPermittedScopes", + "service": { + "short_name": "GkeHub", + "full_name": "google.cloud.gkehub.v1.GkeHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkehub_v1_generated_GkeHub_GetMembershipBinding_sync", + "title": "Snippet for the get_membership_binding call in the GkeHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#get_membership_binding.", + "file": "gke_hub/get_membership_binding.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_membership_binding", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#get_membership_binding", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeHub::V1::GetMembershipBindingRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::GkeHub::V1::MembershipBinding", + "client": { + "short_name": "GkeHub::Client", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" + }, + "method": { + "short_name": "GetMembershipBinding", + "full_name": "google.cloud.gkehub.v1.GkeHub.GetMembershipBinding", + "service": { + "short_name": "GkeHub", + "full_name": "google.cloud.gkehub.v1.GkeHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkehub_v1_generated_GkeHub_CreateMembershipBinding_sync", + "title": "Snippet for the create_membership_binding call in the GkeHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#create_membership_binding.", + "file": "gke_hub/create_membership_binding.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_membership_binding", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#create_membership_binding", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeHub::V1::CreateMembershipBindingRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "GkeHub::Client", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" + }, + "method": { + "short_name": "CreateMembershipBinding", + "full_name": "google.cloud.gkehub.v1.GkeHub.CreateMembershipBinding", + "service": { + "short_name": "GkeHub", + "full_name": "google.cloud.gkehub.v1.GkeHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkehub_v1_generated_GkeHub_UpdateMembershipBinding_sync", + "title": "Snippet for the update_membership_binding call in the GkeHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#update_membership_binding.", + "file": "gke_hub/update_membership_binding.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_membership_binding", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#update_membership_binding", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeHub::V1::UpdateMembershipBindingRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "GkeHub::Client", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" + }, + "method": { + "short_name": "UpdateMembershipBinding", + "full_name": "google.cloud.gkehub.v1.GkeHub.UpdateMembershipBinding", + "service": { + "short_name": "GkeHub", + "full_name": "google.cloud.gkehub.v1.GkeHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkehub_v1_generated_GkeHub_DeleteMembershipBinding_sync", + "title": "Snippet for the delete_membership_binding call in the GkeHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#delete_membership_binding.", + "file": "gke_hub/delete_membership_binding.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_membership_binding", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#delete_membership_binding", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeHub::V1::DeleteMembershipBindingRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "GkeHub::Client", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" + }, + "method": { + "short_name": "DeleteMembershipBinding", + "full_name": "google.cloud.gkehub.v1.GkeHub.DeleteMembershipBinding", + "service": { + "short_name": "GkeHub", + "full_name": "google.cloud.gkehub.v1.GkeHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkehub_v1_generated_GkeHub_ListMembershipBindings_sync", + "title": "Snippet for the list_membership_bindings call in the GkeHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#list_membership_bindings.", + "file": "gke_hub/list_membership_bindings.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_membership_bindings", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#list_membership_bindings", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeHub::V1::ListMembershipBindingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::GkeHub::V1::ListMembershipBindingsResponse", + "client": { + "short_name": "GkeHub::Client", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" + }, + "method": { + "short_name": "ListMembershipBindings", + "full_name": "google.cloud.gkehub.v1.GkeHub.ListMembershipBindings", + "service": { + "short_name": "GkeHub", + "full_name": "google.cloud.gkehub.v1.GkeHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkehub_v1_generated_GkeHub_GetMembershipRBACRoleBinding_sync", + "title": "Snippet for the get_membership_rbac_role_binding call in the GkeHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#get_membership_rbac_role_binding.", + "file": "gke_hub/get_membership_rbac_role_binding.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_membership_rbac_role_binding", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#get_membership_rbac_role_binding", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeHub::V1::GetMembershipRBACRoleBindingRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::GkeHub::V1::RBACRoleBinding", + "client": { + "short_name": "GkeHub::Client", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" + }, + "method": { + "short_name": "GetMembershipRBACRoleBinding", + "full_name": "google.cloud.gkehub.v1.GkeHub.GetMembershipRBACRoleBinding", + "service": { + "short_name": "GkeHub", + "full_name": "google.cloud.gkehub.v1.GkeHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkehub_v1_generated_GkeHub_CreateMembershipRBACRoleBinding_sync", + "title": "Snippet for the create_membership_rbac_role_binding call in the GkeHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#create_membership_rbac_role_binding.", + "file": "gke_hub/create_membership_rbac_role_binding.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_membership_rbac_role_binding", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#create_membership_rbac_role_binding", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeHub::V1::CreateMembershipRBACRoleBindingRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "GkeHub::Client", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" + }, + "method": { + "short_name": "CreateMembershipRBACRoleBinding", + "full_name": "google.cloud.gkehub.v1.GkeHub.CreateMembershipRBACRoleBinding", + "service": { + "short_name": "GkeHub", + "full_name": "google.cloud.gkehub.v1.GkeHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkehub_v1_generated_GkeHub_UpdateMembershipRBACRoleBinding_sync", + "title": "Snippet for the update_membership_rbac_role_binding call in the GkeHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#update_membership_rbac_role_binding.", + "file": "gke_hub/update_membership_rbac_role_binding.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_membership_rbac_role_binding", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#update_membership_rbac_role_binding", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeHub::V1::UpdateMembershipRBACRoleBindingRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "GkeHub::Client", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" + }, + "method": { + "short_name": "UpdateMembershipRBACRoleBinding", + "full_name": "google.cloud.gkehub.v1.GkeHub.UpdateMembershipRBACRoleBinding", + "service": { + "short_name": "GkeHub", + "full_name": "google.cloud.gkehub.v1.GkeHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkehub_v1_generated_GkeHub_DeleteMembershipRBACRoleBinding_sync", + "title": "Snippet for the delete_membership_rbac_role_binding call in the GkeHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#delete_membership_rbac_role_binding.", + "file": "gke_hub/delete_membership_rbac_role_binding.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_membership_rbac_role_binding", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#delete_membership_rbac_role_binding", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeHub::V1::DeleteMembershipRBACRoleBindingRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "GkeHub::Client", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" + }, + "method": { + "short_name": "DeleteMembershipRBACRoleBinding", + "full_name": "google.cloud.gkehub.v1.GkeHub.DeleteMembershipRBACRoleBinding", + "service": { + "short_name": "GkeHub", + "full_name": "google.cloud.gkehub.v1.GkeHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkehub_v1_generated_GkeHub_ListMembershipRBACRoleBindings_sync", + "title": "Snippet for the list_membership_rbac_role_bindings call in the GkeHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#list_membership_rbac_role_bindings.", + "file": "gke_hub/list_membership_rbac_role_bindings.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_membership_rbac_role_bindings", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#list_membership_rbac_role_bindings", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeHub::V1::ListMembershipRBACRoleBindingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::GkeHub::V1::ListMembershipRBACRoleBindingsResponse", + "client": { + "short_name": "GkeHub::Client", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" + }, + "method": { + "short_name": "ListMembershipRBACRoleBindings", + "full_name": "google.cloud.gkehub.v1.GkeHub.ListMembershipRBACRoleBindings", + "service": { + "short_name": "GkeHub", + "full_name": "google.cloud.gkehub.v1.GkeHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkehub_v1_generated_GkeHub_GenerateMembershipRBACRoleBindingYAML_sync", + "title": "Snippet for the generate_membership_rbac_role_binding_yaml call in the GkeHub service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#generate_membership_rbac_role_binding_yaml.", + "file": "gke_hub/generate_membership_rbac_role_binding_yaml.rb", + "language": "RUBY", + "client_method": { + "short_name": "generate_membership_rbac_role_binding_yaml", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#generate_membership_rbac_role_binding_yaml", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeHub::V1::GenerateMembershipRBACRoleBindingYAMLRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::GkeHub::V1::GenerateMembershipRBACRoleBindingYAMLResponse", + "client": { + "short_name": "GkeHub::Client", + "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" + }, + "method": { + "short_name": "GenerateMembershipRBACRoleBindingYAML", + "full_name": "google.cloud.gkehub.v1.GkeHub.GenerateMembershipRBACRoleBindingYAML", + "service": { + "short_name": "GkeHub", + "full_name": "google.cloud.gkehub.v1.GkeHub" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] } ] } \ No newline at end of file diff --git a/google-cloud-gke_hub-v1/test/google/cloud/gke_hub/v1/gke_hub_paths_test.rb b/google-cloud-gke_hub-v1/test/google/cloud/gke_hub/v1/gke_hub_paths_test.rb index cac4f638c28c..ec361062b019 100644 --- a/google-cloud-gke_hub-v1/test/google/cloud/gke_hub/v1/gke_hub_paths_test.rb +++ b/google-cloud-gke_hub-v1/test/google/cloud/gke_hub/v1/gke_hub_paths_test.rb @@ -53,6 +53,21 @@ def test_feature_path end end + def test_fleet_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.fleet_path project: "value0", location: "value1", fleet: "value2" + assert_equal "projects/value0/locations/value1/fleets/value2", path + + path = client.fleet_path organization: "value0", location: "value1", fleet: "value2" + assert_equal "organizations/value0/locations/value1/fleets/value2", path + end + end + def test_location_path grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure ::Gapic::ServiceStub.stub :new, DummyStub.new do @@ -76,4 +91,55 @@ def test_membership_path assert_equal "projects/value0/locations/value1/memberships/value2", path end end + + def test_membership_binding_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.membership_binding_path project: "value0", location: "value1", membership: "value2", membershipbinding: "value3" + assert_equal "projects/value0/locations/value1/memberships/value2/bindings/value3", path + end + end + + def test_namespace_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.namespace_path project: "value0", location: "value1", scope: "value2", namespace: "value3" + assert_equal "projects/value0/locations/value1/scopes/value2/namespaces/value3", path + end + end + + def test_rbac_role_binding_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.rbac_role_binding_path project: "value0", location: "value1", scope: "value2", rbacrolebinding: "value3" + assert_equal "projects/value0/locations/value1/scopes/value2/rbacrolebindings/value3", path + + path = client.rbac_role_binding_path project: "value0", location: "value1", membership: "value2", rbacrolebinding: "value3" + assert_equal "projects/value0/locations/value1/memberships/value2/rbacrolebindings/value3", path + end + end + + def test_scope_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.scope_path project: "value0", location: "value1", scope: "value2" + assert_equal "projects/value0/locations/value1/scopes/value2", path + end + end end diff --git a/google-cloud-gke_hub-v1/test/google/cloud/gke_hub/v1/gke_hub_rest_test.rb b/google-cloud-gke_hub-v1/test/google/cloud/gke_hub/v1/gke_hub_rest_test.rb index bf49ee0872cf..de5c1fb50325 100644 --- a/google-cloud-gke_hub-v1/test/google/cloud/gke_hub/v1/gke_hub_rest_test.rb +++ b/google-cloud-gke_hub-v1/test/google/cloud/gke_hub/v1/gke_hub_rest_test.rb @@ -136,6 +136,63 @@ def test_list_memberships end end + def test_list_bound_memberships + # Create test objects. + client_result = ::Google::Cloud::GkeHub::V1::ListBoundMembershipsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + scope_name = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + + list_bound_memberships_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_list_bound_memberships_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_bound_memberships_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_bound_memberships({ scope_name: scope_name, filter: filter, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_bound_memberships scope_name: scope_name, filter: filter, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_bound_memberships ::Google::Cloud::GkeHub::V1::ListBoundMembershipsRequest.new(scope_name: scope_name, filter: filter, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_bound_memberships({ scope_name: scope_name, filter: filter, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_bound_memberships(::Google::Cloud::GkeHub::V1::ListBoundMembershipsRequest.new(scope_name: scope_name, filter: filter, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_bound_memberships_client_stub.call_count + end + end + end + def test_list_features # Create test objects. client_result = ::Google::Cloud::GkeHub::V1::ListFeaturesResponse.new @@ -149,6 +206,7 @@ def test_list_features page_token = "hello world" filter = "hello world" order_by = "hello world" + return_partial_success = true list_features_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| assert options.metadata.key? :"x-goog-api-client" @@ -164,27 +222,27 @@ def test_list_features end # Use hash object - client.list_features({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + client.list_features({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, return_partial_success: return_partial_success }) do |_result, response| assert_equal http_response, response.underlying_op end # Use named arguments - client.list_features parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + client.list_features parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, return_partial_success: return_partial_success do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object - client.list_features ::Google::Cloud::GkeHub::V1::ListFeaturesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + client.list_features ::Google::Cloud::GkeHub::V1::ListFeaturesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, return_partial_success: return_partial_success) do |_result, response| assert_equal http_response, response.underlying_op end # Use hash object with options - client.list_features({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + client.list_features({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, return_partial_success: return_partial_success }, call_options) do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object with options - client.list_features(::Google::Cloud::GkeHub::V1::ListFeaturesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| + client.list_features(::Google::Cloud::GkeHub::V1::ListFeaturesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, return_partial_success: return_partial_success), call_options) do |_result, response| assert_equal http_response, response.underlying_op end @@ -257,6 +315,7 @@ def test_get_feature # Create request parameters for a unary method. name = "hello world" + return_partial_success = true get_feature_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| assert options.metadata.key? :"x-goog-api-client" @@ -272,27 +331,27 @@ def test_get_feature end # Use hash object - client.get_feature({ name: name }) do |_result, response| + client.get_feature({ name: name, return_partial_success: return_partial_success }) do |_result, response| assert_equal http_response, response.underlying_op end # Use named arguments - client.get_feature name: name do |_result, response| + client.get_feature name: name, return_partial_success: return_partial_success do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object - client.get_feature ::Google::Cloud::GkeHub::V1::GetFeatureRequest.new(name: name) do |_result, response| + client.get_feature ::Google::Cloud::GkeHub::V1::GetFeatureRequest.new(name: name, return_partial_success: return_partial_success) do |_result, response| assert_equal http_response, response.underlying_op end # Use hash object with options - client.get_feature({ name: name }, call_options) do |_result, response| + client.get_feature({ name: name, return_partial_success: return_partial_success }, call_options) do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object with options - client.get_feature(::Google::Cloud::GkeHub::V1::GetFeatureRequest.new(name: name), call_options) do |_result, response| + client.get_feature(::Google::Cloud::GkeHub::V1::GetFeatureRequest.new(name: name, return_partial_success: return_partial_success), call_options) do |_result, response| assert_equal http_response, response.underlying_op end @@ -702,6 +761,1768 @@ def test_generate_connect_manifest end end + def test_create_fleet + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + fleet = {} + + create_fleet_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_create_fleet_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_fleet_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_fleet({ parent: parent, fleet: fleet }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_fleet parent: parent, fleet: fleet do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_fleet ::Google::Cloud::GkeHub::V1::CreateFleetRequest.new(parent: parent, fleet: fleet) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_fleet({ parent: parent, fleet: fleet }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_fleet(::Google::Cloud::GkeHub::V1::CreateFleetRequest.new(parent: parent, fleet: fleet), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_fleet_client_stub.call_count + end + end + end + + def test_get_fleet + # Create test objects. + client_result = ::Google::Cloud::GkeHub::V1::Fleet.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_fleet_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_get_fleet_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_fleet_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_fleet({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_fleet name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_fleet ::Google::Cloud::GkeHub::V1::GetFleetRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_fleet({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_fleet(::Google::Cloud::GkeHub::V1::GetFleetRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_fleet_client_stub.call_count + end + end + end + + def test_update_fleet + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + fleet = {} + update_mask = {} + + update_fleet_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_update_fleet_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_fleet_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_fleet({ fleet: fleet, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_fleet fleet: fleet, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_fleet ::Google::Cloud::GkeHub::V1::UpdateFleetRequest.new(fleet: fleet, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_fleet({ fleet: fleet, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_fleet(::Google::Cloud::GkeHub::V1::UpdateFleetRequest.new(fleet: fleet, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_fleet_client_stub.call_count + end + end + end + + def test_delete_fleet + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_fleet_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_delete_fleet_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_fleet_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_fleet({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_fleet name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_fleet ::Google::Cloud::GkeHub::V1::DeleteFleetRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_fleet({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_fleet(::Google::Cloud::GkeHub::V1::DeleteFleetRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_fleet_client_stub.call_count + end + end + end + + def test_list_fleets + # Create test objects. + client_result = ::Google::Cloud::GkeHub::V1::ListFleetsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_token = "hello world" + page_size = 42 + + list_fleets_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_list_fleets_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_fleets_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_fleets({ parent: parent, page_token: page_token, page_size: page_size }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_fleets parent: parent, page_token: page_token, page_size: page_size do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_fleets ::Google::Cloud::GkeHub::V1::ListFleetsRequest.new(parent: parent, page_token: page_token, page_size: page_size) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_fleets({ parent: parent, page_token: page_token, page_size: page_size }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_fleets(::Google::Cloud::GkeHub::V1::ListFleetsRequest.new(parent: parent, page_token: page_token, page_size: page_size), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_fleets_client_stub.call_count + end + end + end + + def test_get_scope_namespace + # Create test objects. + client_result = ::Google::Cloud::GkeHub::V1::Namespace.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_scope_namespace_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_get_scope_namespace_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_scope_namespace_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_scope_namespace({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_scope_namespace name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_scope_namespace ::Google::Cloud::GkeHub::V1::GetScopeNamespaceRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_scope_namespace({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_scope_namespace(::Google::Cloud::GkeHub::V1::GetScopeNamespaceRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_scope_namespace_client_stub.call_count + end + end + end + + def test_create_scope_namespace + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + scope_namespace_id = "hello world" + scope_namespace = {} + + create_scope_namespace_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_create_scope_namespace_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_scope_namespace_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_scope_namespace({ parent: parent, scope_namespace_id: scope_namespace_id, scope_namespace: scope_namespace }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_scope_namespace parent: parent, scope_namespace_id: scope_namespace_id, scope_namespace: scope_namespace do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_scope_namespace ::Google::Cloud::GkeHub::V1::CreateScopeNamespaceRequest.new(parent: parent, scope_namespace_id: scope_namespace_id, scope_namespace: scope_namespace) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_scope_namespace({ parent: parent, scope_namespace_id: scope_namespace_id, scope_namespace: scope_namespace }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_scope_namespace(::Google::Cloud::GkeHub::V1::CreateScopeNamespaceRequest.new(parent: parent, scope_namespace_id: scope_namespace_id, scope_namespace: scope_namespace), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_scope_namespace_client_stub.call_count + end + end + end + + def test_update_scope_namespace + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + scope_namespace = {} + update_mask = {} + + update_scope_namespace_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_update_scope_namespace_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_scope_namespace_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_scope_namespace({ scope_namespace: scope_namespace, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_scope_namespace scope_namespace: scope_namespace, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_scope_namespace ::Google::Cloud::GkeHub::V1::UpdateScopeNamespaceRequest.new(scope_namespace: scope_namespace, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_scope_namespace({ scope_namespace: scope_namespace, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_scope_namespace(::Google::Cloud::GkeHub::V1::UpdateScopeNamespaceRequest.new(scope_namespace: scope_namespace, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_scope_namespace_client_stub.call_count + end + end + end + + def test_delete_scope_namespace + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_scope_namespace_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_delete_scope_namespace_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_scope_namespace_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_scope_namespace({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_scope_namespace name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_scope_namespace ::Google::Cloud::GkeHub::V1::DeleteScopeNamespaceRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_scope_namespace({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_scope_namespace(::Google::Cloud::GkeHub::V1::DeleteScopeNamespaceRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_scope_namespace_client_stub.call_count + end + end + end + + def test_list_scope_namespaces + # Create test objects. + client_result = ::Google::Cloud::GkeHub::V1::ListScopeNamespacesResponse.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_scope_namespaces_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_list_scope_namespaces_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_scope_namespaces_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_scope_namespaces({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_scope_namespaces parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_scope_namespaces ::Google::Cloud::GkeHub::V1::ListScopeNamespacesRequest.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 + client.list_scope_namespaces({ 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 + client.list_scope_namespaces(::Google::Cloud::GkeHub::V1::ListScopeNamespacesRequest.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_scope_namespaces_client_stub.call_count + end + end + end + + def test_get_scope_rbac_role_binding + # Create test objects. + client_result = ::Google::Cloud::GkeHub::V1::RBACRoleBinding.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_scope_rbac_role_binding_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_get_scope_rbac_role_binding_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_scope_rbac_role_binding_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_scope_rbac_role_binding({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_scope_rbac_role_binding name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_scope_rbac_role_binding ::Google::Cloud::GkeHub::V1::GetScopeRBACRoleBindingRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_scope_rbac_role_binding({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_scope_rbac_role_binding(::Google::Cloud::GkeHub::V1::GetScopeRBACRoleBindingRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_scope_rbac_role_binding_client_stub.call_count + end + end + end + + def test_create_scope_rbac_role_binding + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + rbacrolebinding_id = "hello world" + rbacrolebinding = {} + + create_scope_rbac_role_binding_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_create_scope_rbac_role_binding_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_scope_rbac_role_binding_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_scope_rbac_role_binding({ parent: parent, rbacrolebinding_id: rbacrolebinding_id, rbacrolebinding: rbacrolebinding }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_scope_rbac_role_binding parent: parent, rbacrolebinding_id: rbacrolebinding_id, rbacrolebinding: rbacrolebinding do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_scope_rbac_role_binding ::Google::Cloud::GkeHub::V1::CreateScopeRBACRoleBindingRequest.new(parent: parent, rbacrolebinding_id: rbacrolebinding_id, rbacrolebinding: rbacrolebinding) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_scope_rbac_role_binding({ parent: parent, rbacrolebinding_id: rbacrolebinding_id, rbacrolebinding: rbacrolebinding }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_scope_rbac_role_binding(::Google::Cloud::GkeHub::V1::CreateScopeRBACRoleBindingRequest.new(parent: parent, rbacrolebinding_id: rbacrolebinding_id, rbacrolebinding: rbacrolebinding), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_scope_rbac_role_binding_client_stub.call_count + end + end + end + + def test_update_scope_rbac_role_binding + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + rbacrolebinding = {} + update_mask = {} + + update_scope_rbac_role_binding_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_update_scope_rbac_role_binding_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_scope_rbac_role_binding_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_scope_rbac_role_binding({ rbacrolebinding: rbacrolebinding, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_scope_rbac_role_binding rbacrolebinding: rbacrolebinding, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_scope_rbac_role_binding ::Google::Cloud::GkeHub::V1::UpdateScopeRBACRoleBindingRequest.new(rbacrolebinding: rbacrolebinding, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_scope_rbac_role_binding({ rbacrolebinding: rbacrolebinding, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_scope_rbac_role_binding(::Google::Cloud::GkeHub::V1::UpdateScopeRBACRoleBindingRequest.new(rbacrolebinding: rbacrolebinding, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_scope_rbac_role_binding_client_stub.call_count + end + end + end + + def test_delete_scope_rbac_role_binding + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_scope_rbac_role_binding_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_delete_scope_rbac_role_binding_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_scope_rbac_role_binding_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_scope_rbac_role_binding({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_scope_rbac_role_binding name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_scope_rbac_role_binding ::Google::Cloud::GkeHub::V1::DeleteScopeRBACRoleBindingRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_scope_rbac_role_binding({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_scope_rbac_role_binding(::Google::Cloud::GkeHub::V1::DeleteScopeRBACRoleBindingRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_scope_rbac_role_binding_client_stub.call_count + end + end + end + + def test_list_scope_rbac_role_bindings + # Create test objects. + client_result = ::Google::Cloud::GkeHub::V1::ListScopeRBACRoleBindingsResponse.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_scope_rbac_role_bindings_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_list_scope_rbac_role_bindings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_scope_rbac_role_bindings_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_scope_rbac_role_bindings({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_scope_rbac_role_bindings parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_scope_rbac_role_bindings ::Google::Cloud::GkeHub::V1::ListScopeRBACRoleBindingsRequest.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 + client.list_scope_rbac_role_bindings({ 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 + client.list_scope_rbac_role_bindings(::Google::Cloud::GkeHub::V1::ListScopeRBACRoleBindingsRequest.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_scope_rbac_role_bindings_client_stub.call_count + end + end + end + + def test_get_scope + # Create test objects. + client_result = ::Google::Cloud::GkeHub::V1::Scope.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_scope_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_get_scope_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_scope_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_scope({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_scope name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_scope ::Google::Cloud::GkeHub::V1::GetScopeRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_scope({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_scope(::Google::Cloud::GkeHub::V1::GetScopeRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_scope_client_stub.call_count + end + end + end + + def test_create_scope + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + scope_id = "hello world" + scope = {} + + create_scope_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_create_scope_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_scope_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_scope({ parent: parent, scope_id: scope_id, scope: scope }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_scope parent: parent, scope_id: scope_id, scope: scope do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_scope ::Google::Cloud::GkeHub::V1::CreateScopeRequest.new(parent: parent, scope_id: scope_id, scope: scope) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_scope({ parent: parent, scope_id: scope_id, scope: scope }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_scope(::Google::Cloud::GkeHub::V1::CreateScopeRequest.new(parent: parent, scope_id: scope_id, scope: scope), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_scope_client_stub.call_count + end + end + end + + def test_update_scope + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + scope = {} + update_mask = {} + + update_scope_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_update_scope_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_scope_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_scope({ scope: scope, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_scope scope: scope, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_scope ::Google::Cloud::GkeHub::V1::UpdateScopeRequest.new(scope: scope, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_scope({ scope: scope, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_scope(::Google::Cloud::GkeHub::V1::UpdateScopeRequest.new(scope: scope, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_scope_client_stub.call_count + end + end + end + + def test_delete_scope + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_scope_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_delete_scope_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_scope_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_scope({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_scope name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_scope ::Google::Cloud::GkeHub::V1::DeleteScopeRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_scope({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_scope(::Google::Cloud::GkeHub::V1::DeleteScopeRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_scope_client_stub.call_count + end + end + end + + def test_list_scopes + # Create test objects. + client_result = ::Google::Cloud::GkeHub::V1::ListScopesResponse.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_scopes_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_list_scopes_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_scopes_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_scopes({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_scopes parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_scopes ::Google::Cloud::GkeHub::V1::ListScopesRequest.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 + client.list_scopes({ 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 + client.list_scopes(::Google::Cloud::GkeHub::V1::ListScopesRequest.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_scopes_client_stub.call_count + end + end + end + + def test_list_permitted_scopes + # Create test objects. + client_result = ::Google::Cloud::GkeHub::V1::ListPermittedScopesResponse.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_permitted_scopes_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_list_permitted_scopes_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_permitted_scopes_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_permitted_scopes({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_permitted_scopes parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_permitted_scopes ::Google::Cloud::GkeHub::V1::ListPermittedScopesRequest.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 + client.list_permitted_scopes({ 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 + client.list_permitted_scopes(::Google::Cloud::GkeHub::V1::ListPermittedScopesRequest.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_permitted_scopes_client_stub.call_count + end + end + end + + def test_get_membership_binding + # Create test objects. + client_result = ::Google::Cloud::GkeHub::V1::MembershipBinding.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_membership_binding_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_get_membership_binding_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_membership_binding_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_membership_binding({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_membership_binding name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_membership_binding ::Google::Cloud::GkeHub::V1::GetMembershipBindingRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_membership_binding({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_membership_binding(::Google::Cloud::GkeHub::V1::GetMembershipBindingRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_membership_binding_client_stub.call_count + end + end + end + + def test_create_membership_binding + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + membership_binding = {} + membership_binding_id = "hello world" + + create_membership_binding_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_create_membership_binding_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_membership_binding_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_membership_binding({ parent: parent, membership_binding: membership_binding, membership_binding_id: membership_binding_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_membership_binding parent: parent, membership_binding: membership_binding, membership_binding_id: membership_binding_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_membership_binding ::Google::Cloud::GkeHub::V1::CreateMembershipBindingRequest.new(parent: parent, membership_binding: membership_binding, membership_binding_id: membership_binding_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_membership_binding({ parent: parent, membership_binding: membership_binding, membership_binding_id: membership_binding_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_membership_binding(::Google::Cloud::GkeHub::V1::CreateMembershipBindingRequest.new(parent: parent, membership_binding: membership_binding, membership_binding_id: membership_binding_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_membership_binding_client_stub.call_count + end + end + end + + def test_update_membership_binding + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + membership_binding = {} + update_mask = {} + + update_membership_binding_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_update_membership_binding_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_membership_binding_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_membership_binding({ membership_binding: membership_binding, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_membership_binding membership_binding: membership_binding, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_membership_binding ::Google::Cloud::GkeHub::V1::UpdateMembershipBindingRequest.new(membership_binding: membership_binding, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_membership_binding({ membership_binding: membership_binding, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_membership_binding(::Google::Cloud::GkeHub::V1::UpdateMembershipBindingRequest.new(membership_binding: membership_binding, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_membership_binding_client_stub.call_count + end + end + end + + def test_delete_membership_binding + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_membership_binding_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_delete_membership_binding_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_membership_binding_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_membership_binding({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_membership_binding name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_membership_binding ::Google::Cloud::GkeHub::V1::DeleteMembershipBindingRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_membership_binding({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_membership_binding(::Google::Cloud::GkeHub::V1::DeleteMembershipBindingRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_membership_binding_client_stub.call_count + end + end + end + + def test_list_membership_bindings + # Create test objects. + client_result = ::Google::Cloud::GkeHub::V1::ListMembershipBindingsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_membership_bindings_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_list_membership_bindings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_membership_bindings_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_membership_bindings({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_membership_bindings parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_membership_bindings ::Google::Cloud::GkeHub::V1::ListMembershipBindingsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_membership_bindings({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_membership_bindings(::Google::Cloud::GkeHub::V1::ListMembershipBindingsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_membership_bindings_client_stub.call_count + end + end + end + + def test_get_membership_rbac_role_binding + # Create test objects. + client_result = ::Google::Cloud::GkeHub::V1::RBACRoleBinding.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_membership_rbac_role_binding_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_get_membership_rbac_role_binding_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_membership_rbac_role_binding_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_membership_rbac_role_binding({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_membership_rbac_role_binding name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_membership_rbac_role_binding ::Google::Cloud::GkeHub::V1::GetMembershipRBACRoleBindingRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_membership_rbac_role_binding({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_membership_rbac_role_binding(::Google::Cloud::GkeHub::V1::GetMembershipRBACRoleBindingRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_membership_rbac_role_binding_client_stub.call_count + end + end + end + + def test_create_membership_rbac_role_binding + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + rbacrolebinding_id = "hello world" + rbacrolebinding = {} + + create_membership_rbac_role_binding_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_create_membership_rbac_role_binding_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_membership_rbac_role_binding_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_membership_rbac_role_binding({ parent: parent, rbacrolebinding_id: rbacrolebinding_id, rbacrolebinding: rbacrolebinding }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_membership_rbac_role_binding parent: parent, rbacrolebinding_id: rbacrolebinding_id, rbacrolebinding: rbacrolebinding do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_membership_rbac_role_binding ::Google::Cloud::GkeHub::V1::CreateMembershipRBACRoleBindingRequest.new(parent: parent, rbacrolebinding_id: rbacrolebinding_id, rbacrolebinding: rbacrolebinding) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_membership_rbac_role_binding({ parent: parent, rbacrolebinding_id: rbacrolebinding_id, rbacrolebinding: rbacrolebinding }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_membership_rbac_role_binding(::Google::Cloud::GkeHub::V1::CreateMembershipRBACRoleBindingRequest.new(parent: parent, rbacrolebinding_id: rbacrolebinding_id, rbacrolebinding: rbacrolebinding), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_membership_rbac_role_binding_client_stub.call_count + end + end + end + + def test_update_membership_rbac_role_binding + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + rbacrolebinding = {} + update_mask = {} + + update_membership_rbac_role_binding_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_update_membership_rbac_role_binding_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_membership_rbac_role_binding_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_membership_rbac_role_binding({ rbacrolebinding: rbacrolebinding, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_membership_rbac_role_binding rbacrolebinding: rbacrolebinding, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_membership_rbac_role_binding ::Google::Cloud::GkeHub::V1::UpdateMembershipRBACRoleBindingRequest.new(rbacrolebinding: rbacrolebinding, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_membership_rbac_role_binding({ rbacrolebinding: rbacrolebinding, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_membership_rbac_role_binding(::Google::Cloud::GkeHub::V1::UpdateMembershipRBACRoleBindingRequest.new(rbacrolebinding: rbacrolebinding, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_membership_rbac_role_binding_client_stub.call_count + end + end + end + + def test_delete_membership_rbac_role_binding + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_membership_rbac_role_binding_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_delete_membership_rbac_role_binding_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_membership_rbac_role_binding_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_membership_rbac_role_binding({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_membership_rbac_role_binding name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_membership_rbac_role_binding ::Google::Cloud::GkeHub::V1::DeleteMembershipRBACRoleBindingRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_membership_rbac_role_binding({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_membership_rbac_role_binding(::Google::Cloud::GkeHub::V1::DeleteMembershipRBACRoleBindingRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_membership_rbac_role_binding_client_stub.call_count + end + end + end + + def test_list_membership_rbac_role_bindings + # Create test objects. + client_result = ::Google::Cloud::GkeHub::V1::ListMembershipRBACRoleBindingsResponse.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_membership_rbac_role_bindings_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_list_membership_rbac_role_bindings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_membership_rbac_role_bindings_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_membership_rbac_role_bindings({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_membership_rbac_role_bindings parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_membership_rbac_role_bindings ::Google::Cloud::GkeHub::V1::ListMembershipRBACRoleBindingsRequest.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 + client.list_membership_rbac_role_bindings({ 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 + client.list_membership_rbac_role_bindings(::Google::Cloud::GkeHub::V1::ListMembershipRBACRoleBindingsRequest.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_membership_rbac_role_bindings_client_stub.call_count + end + end + end + + def test_generate_membership_rbac_role_binding_yaml + # Create test objects. + client_result = ::Google::Cloud::GkeHub::V1::GenerateMembershipRBACRoleBindingYAMLResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + rbacrolebinding_id = "hello world" + rbacrolebinding = {} + + generate_membership_rbac_role_binding_yaml_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_generate_membership_rbac_role_binding_yaml_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, generate_membership_rbac_role_binding_yaml_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.generate_membership_rbac_role_binding_yaml({ parent: parent, rbacrolebinding_id: rbacrolebinding_id, rbacrolebinding: rbacrolebinding }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.generate_membership_rbac_role_binding_yaml parent: parent, rbacrolebinding_id: rbacrolebinding_id, rbacrolebinding: rbacrolebinding do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.generate_membership_rbac_role_binding_yaml ::Google::Cloud::GkeHub::V1::GenerateMembershipRBACRoleBindingYAMLRequest.new(parent: parent, rbacrolebinding_id: rbacrolebinding_id, rbacrolebinding: rbacrolebinding) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.generate_membership_rbac_role_binding_yaml({ parent: parent, rbacrolebinding_id: rbacrolebinding_id, rbacrolebinding: rbacrolebinding }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.generate_membership_rbac_role_binding_yaml(::Google::Cloud::GkeHub::V1::GenerateMembershipRBACRoleBindingYAMLRequest.new(parent: parent, rbacrolebinding_id: rbacrolebinding_id, rbacrolebinding: rbacrolebinding), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, generate_membership_rbac_role_binding_yaml_client_stub.call_count + end + end + end + def test_configure credentials_token = :dummy_value diff --git a/google-cloud-gke_hub-v1/test/google/cloud/gke_hub/v1/gke_hub_test.rb b/google-cloud-gke_hub-v1/test/google/cloud/gke_hub/v1/gke_hub_test.rb index ceee17018283..322c4edad927 100644 --- a/google-cloud-gke_hub-v1/test/google/cloud/gke_hub/v1/gke_hub_test.rb +++ b/google-cloud-gke_hub-v1/test/google/cloud/gke_hub/v1/gke_hub_test.rb @@ -134,6 +134,75 @@ def test_list_memberships end end + def test_list_bound_memberships + # Create GRPC objects. + grpc_response = ::Google::Cloud::GkeHub::V1::ListBoundMembershipsResponse.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. + scope_name = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + + list_bound_memberships_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_bound_memberships, name + assert_kind_of ::Google::Cloud::GkeHub::V1::ListBoundMembershipsRequest, request + assert_equal "hello world", request["scope_name"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_bound_memberships_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_bound_memberships({ scope_name: scope_name, filter: filter, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_bound_memberships scope_name: scope_name, filter: filter, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_bound_memberships ::Google::Cloud::GkeHub::V1::ListBoundMembershipsRequest.new(scope_name: scope_name, filter: filter, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_bound_memberships({ scope_name: scope_name, filter: filter, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_bound_memberships(::Google::Cloud::GkeHub::V1::ListBoundMembershipsRequest.new(scope_name: scope_name, filter: filter, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_bound_memberships_client_stub.call_rpc_count + end + end + def test_list_features # Create GRPC objects. grpc_response = ::Google::Cloud::GkeHub::V1::ListFeaturesResponse.new @@ -147,6 +216,7 @@ def test_list_features page_token = "hello world" filter = "hello world" order_by = "hello world" + return_partial_success = true list_features_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| assert_equal :list_features, name @@ -156,6 +226,7 @@ def test_list_features assert_equal "hello world", request["page_token"] assert_equal "hello world", request["filter"] assert_equal "hello world", request["order_by"] + assert_equal true, request["return_partial_success"] refute_nil options end @@ -166,35 +237,35 @@ def test_list_features end # Use hash object - client.list_features({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + client.list_features({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, return_partial_success: return_partial_success }) do |response, operation| assert_kind_of Gapic::PagedEnumerable, response assert_equal grpc_response, response.response assert_equal grpc_operation, operation end # Use named arguments - client.list_features parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + client.list_features parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, return_partial_success: return_partial_success do |response, operation| assert_kind_of Gapic::PagedEnumerable, response assert_equal grpc_response, response.response assert_equal grpc_operation, operation end # Use protobuf object - client.list_features ::Google::Cloud::GkeHub::V1::ListFeaturesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + client.list_features ::Google::Cloud::GkeHub::V1::ListFeaturesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, return_partial_success: return_partial_success) 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 - client.list_features({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + client.list_features({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, return_partial_success: return_partial_success }, 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 - client.list_features(::Google::Cloud::GkeHub::V1::ListFeaturesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| + client.list_features(::Google::Cloud::GkeHub::V1::ListFeaturesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, return_partial_success: return_partial_success), grpc_options) do |response, operation| assert_kind_of Gapic::PagedEnumerable, response assert_equal grpc_response, response.response assert_equal grpc_operation, operation @@ -272,11 +343,13 @@ def test_get_feature # Create request parameters for a unary method. name = "hello world" + return_partial_success = true get_feature_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| assert_equal :get_feature, name assert_kind_of ::Google::Cloud::GkeHub::V1::GetFeatureRequest, request assert_equal "hello world", request["name"] + assert_equal true, request["return_partial_success"] refute_nil options end @@ -287,31 +360,31 @@ def test_get_feature end # Use hash object - client.get_feature({ name: name }) do |response, operation| + client.get_feature({ name: name, return_partial_success: return_partial_success }) do |response, operation| assert_equal grpc_response, response assert_equal grpc_operation, operation end # Use named arguments - client.get_feature name: name do |response, operation| + client.get_feature name: name, return_partial_success: return_partial_success do |response, operation| assert_equal grpc_response, response assert_equal grpc_operation, operation end # Use protobuf object - client.get_feature ::Google::Cloud::GkeHub::V1::GetFeatureRequest.new(name: name) do |response, operation| + client.get_feature ::Google::Cloud::GkeHub::V1::GetFeatureRequest.new(name: name, return_partial_success: return_partial_success) do |response, operation| assert_equal grpc_response, response assert_equal grpc_operation, operation end # Use hash object with options - client.get_feature({ name: name }, grpc_options) do |response, operation| + client.get_feature({ name: name, return_partial_success: return_partial_success }, grpc_options) do |response, operation| assert_equal grpc_response, response assert_equal grpc_operation, operation end # Use protobuf object with options - client.get_feature(::Google::Cloud::GkeHub::V1::GetFeatureRequest.new(name: name), grpc_options) do |response, operation| + client.get_feature(::Google::Cloud::GkeHub::V1::GetFeatureRequest.new(name: name, return_partial_success: return_partial_success), grpc_options) do |response, operation| assert_equal grpc_response, response assert_equal grpc_operation, operation end @@ -801,6 +874,2055 @@ def test_generate_connect_manifest end end + def test_create_fleet + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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" + fleet = {} + + create_fleet_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_fleet, name + assert_kind_of ::Google::Cloud::GkeHub::V1::CreateFleetRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GkeHub::V1::Fleet), request["fleet"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_fleet_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_fleet({ parent: parent, fleet: fleet }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_fleet parent: parent, fleet: fleet do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_fleet ::Google::Cloud::GkeHub::V1::CreateFleetRequest.new(parent: parent, fleet: fleet) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_fleet({ parent: parent, fleet: fleet }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_fleet(::Google::Cloud::GkeHub::V1::CreateFleetRequest.new(parent: parent, fleet: fleet), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_fleet_client_stub.call_rpc_count + end + end + + def test_get_fleet + # Create GRPC objects. + grpc_response = ::Google::Cloud::GkeHub::V1::Fleet.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_fleet_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_fleet, name + assert_kind_of ::Google::Cloud::GkeHub::V1::GetFleetRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_fleet_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_fleet({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_fleet name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_fleet ::Google::Cloud::GkeHub::V1::GetFleetRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_fleet({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_fleet(::Google::Cloud::GkeHub::V1::GetFleetRequest.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_fleet_client_stub.call_rpc_count + end + end + + def test_update_fleet + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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. + fleet = {} + update_mask = {} + + update_fleet_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_fleet, name + assert_kind_of ::Google::Cloud::GkeHub::V1::UpdateFleetRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GkeHub::V1::Fleet), request["fleet"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_fleet_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_fleet({ fleet: fleet, update_mask: update_mask }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_fleet fleet: fleet, update_mask: update_mask do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_fleet ::Google::Cloud::GkeHub::V1::UpdateFleetRequest.new(fleet: fleet, update_mask: update_mask) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_fleet({ fleet: fleet, update_mask: update_mask }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_fleet(::Google::Cloud::GkeHub::V1::UpdateFleetRequest.new(fleet: fleet, update_mask: update_mask), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_fleet_client_stub.call_rpc_count + end + end + + def test_delete_fleet + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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_fleet_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_fleet, name + assert_kind_of ::Google::Cloud::GkeHub::V1::DeleteFleetRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_fleet_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_fleet({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_fleet name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_fleet ::Google::Cloud::GkeHub::V1::DeleteFleetRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_fleet({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_fleet(::Google::Cloud::GkeHub::V1::DeleteFleetRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_fleet_client_stub.call_rpc_count + end + end + + def test_list_fleets + # Create GRPC objects. + grpc_response = ::Google::Cloud::GkeHub::V1::ListFleetsResponse.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_token = "hello world" + page_size = 42 + + list_fleets_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_fleets, name + assert_kind_of ::Google::Cloud::GkeHub::V1::ListFleetsRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["page_token"] + assert_equal 42, request["page_size"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_fleets_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_fleets({ parent: parent, page_token: page_token, page_size: page_size }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_fleets parent: parent, page_token: page_token, page_size: page_size do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_fleets ::Google::Cloud::GkeHub::V1::ListFleetsRequest.new(parent: parent, page_token: page_token, page_size: page_size) 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 + client.list_fleets({ parent: parent, page_token: page_token, page_size: page_size }, 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 + client.list_fleets(::Google::Cloud::GkeHub::V1::ListFleetsRequest.new(parent: parent, page_token: page_token, page_size: page_size), 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_fleets_client_stub.call_rpc_count + end + end + + def test_get_scope_namespace + # Create GRPC objects. + grpc_response = ::Google::Cloud::GkeHub::V1::Namespace.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_scope_namespace_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_scope_namespace, name + assert_kind_of ::Google::Cloud::GkeHub::V1::GetScopeNamespaceRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_scope_namespace_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_scope_namespace({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_scope_namespace name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_scope_namespace ::Google::Cloud::GkeHub::V1::GetScopeNamespaceRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_scope_namespace({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_scope_namespace(::Google::Cloud::GkeHub::V1::GetScopeNamespaceRequest.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_scope_namespace_client_stub.call_rpc_count + end + end + + def test_create_scope_namespace + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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" + scope_namespace_id = "hello world" + scope_namespace = {} + + create_scope_namespace_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_scope_namespace, name + assert_kind_of ::Google::Cloud::GkeHub::V1::CreateScopeNamespaceRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["scope_namespace_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GkeHub::V1::Namespace), request["scope_namespace"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_scope_namespace_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_scope_namespace({ parent: parent, scope_namespace_id: scope_namespace_id, scope_namespace: scope_namespace }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_scope_namespace parent: parent, scope_namespace_id: scope_namespace_id, scope_namespace: scope_namespace do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_scope_namespace ::Google::Cloud::GkeHub::V1::CreateScopeNamespaceRequest.new(parent: parent, scope_namespace_id: scope_namespace_id, scope_namespace: scope_namespace) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_scope_namespace({ parent: parent, scope_namespace_id: scope_namespace_id, scope_namespace: scope_namespace }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_scope_namespace(::Google::Cloud::GkeHub::V1::CreateScopeNamespaceRequest.new(parent: parent, scope_namespace_id: scope_namespace_id, scope_namespace: scope_namespace), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_scope_namespace_client_stub.call_rpc_count + end + end + + def test_update_scope_namespace + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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. + scope_namespace = {} + update_mask = {} + + update_scope_namespace_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_scope_namespace, name + assert_kind_of ::Google::Cloud::GkeHub::V1::UpdateScopeNamespaceRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GkeHub::V1::Namespace), request["scope_namespace"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_scope_namespace_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_scope_namespace({ scope_namespace: scope_namespace, update_mask: update_mask }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_scope_namespace scope_namespace: scope_namespace, update_mask: update_mask do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_scope_namespace ::Google::Cloud::GkeHub::V1::UpdateScopeNamespaceRequest.new(scope_namespace: scope_namespace, update_mask: update_mask) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_scope_namespace({ scope_namespace: scope_namespace, update_mask: update_mask }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_scope_namespace(::Google::Cloud::GkeHub::V1::UpdateScopeNamespaceRequest.new(scope_namespace: scope_namespace, update_mask: update_mask), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_scope_namespace_client_stub.call_rpc_count + end + end + + def test_delete_scope_namespace + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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_scope_namespace_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_scope_namespace, name + assert_kind_of ::Google::Cloud::GkeHub::V1::DeleteScopeNamespaceRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_scope_namespace_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_scope_namespace({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_scope_namespace name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_scope_namespace ::Google::Cloud::GkeHub::V1::DeleteScopeNamespaceRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_scope_namespace({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_scope_namespace(::Google::Cloud::GkeHub::V1::DeleteScopeNamespaceRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_scope_namespace_client_stub.call_rpc_count + end + end + + def test_list_scope_namespaces + # Create GRPC objects. + grpc_response = ::Google::Cloud::GkeHub::V1::ListScopeNamespacesResponse.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_scope_namespaces_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_scope_namespaces, name + assert_kind_of ::Google::Cloud::GkeHub::V1::ListScopeNamespacesRequest, 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_scope_namespaces_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_scope_namespaces({ 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 + client.list_scope_namespaces 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 + client.list_scope_namespaces ::Google::Cloud::GkeHub::V1::ListScopeNamespacesRequest.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 + client.list_scope_namespaces({ 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 + client.list_scope_namespaces(::Google::Cloud::GkeHub::V1::ListScopeNamespacesRequest.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_scope_namespaces_client_stub.call_rpc_count + end + end + + def test_get_scope_rbac_role_binding + # Create GRPC objects. + grpc_response = ::Google::Cloud::GkeHub::V1::RBACRoleBinding.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_scope_rbac_role_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_scope_rbac_role_binding, name + assert_kind_of ::Google::Cloud::GkeHub::V1::GetScopeRBACRoleBindingRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_scope_rbac_role_binding_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_scope_rbac_role_binding({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_scope_rbac_role_binding name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_scope_rbac_role_binding ::Google::Cloud::GkeHub::V1::GetScopeRBACRoleBindingRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_scope_rbac_role_binding({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_scope_rbac_role_binding(::Google::Cloud::GkeHub::V1::GetScopeRBACRoleBindingRequest.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_scope_rbac_role_binding_client_stub.call_rpc_count + end + end + + def test_create_scope_rbac_role_binding + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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" + rbacrolebinding_id = "hello world" + rbacrolebinding = {} + + create_scope_rbac_role_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_scope_rbac_role_binding, name + assert_kind_of ::Google::Cloud::GkeHub::V1::CreateScopeRBACRoleBindingRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["rbacrolebinding_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GkeHub::V1::RBACRoleBinding), request["rbacrolebinding"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_scope_rbac_role_binding_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_scope_rbac_role_binding({ parent: parent, rbacrolebinding_id: rbacrolebinding_id, rbacrolebinding: rbacrolebinding }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_scope_rbac_role_binding parent: parent, rbacrolebinding_id: rbacrolebinding_id, rbacrolebinding: rbacrolebinding do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_scope_rbac_role_binding ::Google::Cloud::GkeHub::V1::CreateScopeRBACRoleBindingRequest.new(parent: parent, rbacrolebinding_id: rbacrolebinding_id, rbacrolebinding: rbacrolebinding) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_scope_rbac_role_binding({ parent: parent, rbacrolebinding_id: rbacrolebinding_id, rbacrolebinding: rbacrolebinding }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_scope_rbac_role_binding(::Google::Cloud::GkeHub::V1::CreateScopeRBACRoleBindingRequest.new(parent: parent, rbacrolebinding_id: rbacrolebinding_id, rbacrolebinding: rbacrolebinding), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_scope_rbac_role_binding_client_stub.call_rpc_count + end + end + + def test_update_scope_rbac_role_binding + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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. + rbacrolebinding = {} + update_mask = {} + + update_scope_rbac_role_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_scope_rbac_role_binding, name + assert_kind_of ::Google::Cloud::GkeHub::V1::UpdateScopeRBACRoleBindingRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GkeHub::V1::RBACRoleBinding), request["rbacrolebinding"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_scope_rbac_role_binding_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_scope_rbac_role_binding({ rbacrolebinding: rbacrolebinding, update_mask: update_mask }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_scope_rbac_role_binding rbacrolebinding: rbacrolebinding, update_mask: update_mask do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_scope_rbac_role_binding ::Google::Cloud::GkeHub::V1::UpdateScopeRBACRoleBindingRequest.new(rbacrolebinding: rbacrolebinding, update_mask: update_mask) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_scope_rbac_role_binding({ rbacrolebinding: rbacrolebinding, update_mask: update_mask }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_scope_rbac_role_binding(::Google::Cloud::GkeHub::V1::UpdateScopeRBACRoleBindingRequest.new(rbacrolebinding: rbacrolebinding, update_mask: update_mask), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_scope_rbac_role_binding_client_stub.call_rpc_count + end + end + + def test_delete_scope_rbac_role_binding + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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_scope_rbac_role_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_scope_rbac_role_binding, name + assert_kind_of ::Google::Cloud::GkeHub::V1::DeleteScopeRBACRoleBindingRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_scope_rbac_role_binding_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_scope_rbac_role_binding({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_scope_rbac_role_binding name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_scope_rbac_role_binding ::Google::Cloud::GkeHub::V1::DeleteScopeRBACRoleBindingRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_scope_rbac_role_binding({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_scope_rbac_role_binding(::Google::Cloud::GkeHub::V1::DeleteScopeRBACRoleBindingRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_scope_rbac_role_binding_client_stub.call_rpc_count + end + end + + def test_list_scope_rbac_role_bindings + # Create GRPC objects. + grpc_response = ::Google::Cloud::GkeHub::V1::ListScopeRBACRoleBindingsResponse.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_scope_rbac_role_bindings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_scope_rbac_role_bindings, name + assert_kind_of ::Google::Cloud::GkeHub::V1::ListScopeRBACRoleBindingsRequest, 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_scope_rbac_role_bindings_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_scope_rbac_role_bindings({ 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 + client.list_scope_rbac_role_bindings 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 + client.list_scope_rbac_role_bindings ::Google::Cloud::GkeHub::V1::ListScopeRBACRoleBindingsRequest.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 + client.list_scope_rbac_role_bindings({ 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 + client.list_scope_rbac_role_bindings(::Google::Cloud::GkeHub::V1::ListScopeRBACRoleBindingsRequest.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_scope_rbac_role_bindings_client_stub.call_rpc_count + end + end + + def test_get_scope + # Create GRPC objects. + grpc_response = ::Google::Cloud::GkeHub::V1::Scope.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_scope_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_scope, name + assert_kind_of ::Google::Cloud::GkeHub::V1::GetScopeRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_scope_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_scope({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_scope name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_scope ::Google::Cloud::GkeHub::V1::GetScopeRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_scope({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_scope(::Google::Cloud::GkeHub::V1::GetScopeRequest.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_scope_client_stub.call_rpc_count + end + end + + def test_create_scope + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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" + scope_id = "hello world" + scope = {} + + create_scope_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_scope, name + assert_kind_of ::Google::Cloud::GkeHub::V1::CreateScopeRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["scope_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GkeHub::V1::Scope), request["scope"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_scope_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_scope({ parent: parent, scope_id: scope_id, scope: scope }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_scope parent: parent, scope_id: scope_id, scope: scope do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_scope ::Google::Cloud::GkeHub::V1::CreateScopeRequest.new(parent: parent, scope_id: scope_id, scope: scope) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_scope({ parent: parent, scope_id: scope_id, scope: scope }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_scope(::Google::Cloud::GkeHub::V1::CreateScopeRequest.new(parent: parent, scope_id: scope_id, scope: scope), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_scope_client_stub.call_rpc_count + end + end + + def test_update_scope + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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. + scope = {} + update_mask = {} + + update_scope_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_scope, name + assert_kind_of ::Google::Cloud::GkeHub::V1::UpdateScopeRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GkeHub::V1::Scope), request["scope"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_scope_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_scope({ scope: scope, update_mask: update_mask }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_scope scope: scope, update_mask: update_mask do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_scope ::Google::Cloud::GkeHub::V1::UpdateScopeRequest.new(scope: scope, update_mask: update_mask) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_scope({ scope: scope, update_mask: update_mask }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_scope(::Google::Cloud::GkeHub::V1::UpdateScopeRequest.new(scope: scope, update_mask: update_mask), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_scope_client_stub.call_rpc_count + end + end + + def test_delete_scope + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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_scope_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_scope, name + assert_kind_of ::Google::Cloud::GkeHub::V1::DeleteScopeRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_scope_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_scope({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_scope name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_scope ::Google::Cloud::GkeHub::V1::DeleteScopeRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_scope({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_scope(::Google::Cloud::GkeHub::V1::DeleteScopeRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_scope_client_stub.call_rpc_count + end + end + + def test_list_scopes + # Create GRPC objects. + grpc_response = ::Google::Cloud::GkeHub::V1::ListScopesResponse.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_scopes_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_scopes, name + assert_kind_of ::Google::Cloud::GkeHub::V1::ListScopesRequest, 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_scopes_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_scopes({ 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 + client.list_scopes 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 + client.list_scopes ::Google::Cloud::GkeHub::V1::ListScopesRequest.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 + client.list_scopes({ 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 + client.list_scopes(::Google::Cloud::GkeHub::V1::ListScopesRequest.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_scopes_client_stub.call_rpc_count + end + end + + def test_list_permitted_scopes + # Create GRPC objects. + grpc_response = ::Google::Cloud::GkeHub::V1::ListPermittedScopesResponse.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_permitted_scopes_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_permitted_scopes, name + assert_kind_of ::Google::Cloud::GkeHub::V1::ListPermittedScopesRequest, 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_permitted_scopes_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_permitted_scopes({ 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 + client.list_permitted_scopes 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 + client.list_permitted_scopes ::Google::Cloud::GkeHub::V1::ListPermittedScopesRequest.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 + client.list_permitted_scopes({ 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 + client.list_permitted_scopes(::Google::Cloud::GkeHub::V1::ListPermittedScopesRequest.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_permitted_scopes_client_stub.call_rpc_count + end + end + + def test_get_membership_binding + # Create GRPC objects. + grpc_response = ::Google::Cloud::GkeHub::V1::MembershipBinding.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_membership_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_membership_binding, name + assert_kind_of ::Google::Cloud::GkeHub::V1::GetMembershipBindingRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_membership_binding_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_membership_binding({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_membership_binding name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_membership_binding ::Google::Cloud::GkeHub::V1::GetMembershipBindingRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_membership_binding({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_membership_binding(::Google::Cloud::GkeHub::V1::GetMembershipBindingRequest.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_membership_binding_client_stub.call_rpc_count + end + end + + def test_create_membership_binding + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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" + membership_binding = {} + membership_binding_id = "hello world" + + create_membership_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_membership_binding, name + assert_kind_of ::Google::Cloud::GkeHub::V1::CreateMembershipBindingRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GkeHub::V1::MembershipBinding), request["membership_binding"] + assert_equal "hello world", request["membership_binding_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_membership_binding_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_membership_binding({ parent: parent, membership_binding: membership_binding, membership_binding_id: membership_binding_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_membership_binding parent: parent, membership_binding: membership_binding, membership_binding_id: membership_binding_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_membership_binding ::Google::Cloud::GkeHub::V1::CreateMembershipBindingRequest.new(parent: parent, membership_binding: membership_binding, membership_binding_id: membership_binding_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_membership_binding({ parent: parent, membership_binding: membership_binding, membership_binding_id: membership_binding_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_membership_binding(::Google::Cloud::GkeHub::V1::CreateMembershipBindingRequest.new(parent: parent, membership_binding: membership_binding, membership_binding_id: membership_binding_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_membership_binding_client_stub.call_rpc_count + end + end + + def test_update_membership_binding + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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. + membership_binding = {} + update_mask = {} + + update_membership_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_membership_binding, name + assert_kind_of ::Google::Cloud::GkeHub::V1::UpdateMembershipBindingRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GkeHub::V1::MembershipBinding), request["membership_binding"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_membership_binding_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_membership_binding({ membership_binding: membership_binding, update_mask: update_mask }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_membership_binding membership_binding: membership_binding, update_mask: update_mask do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_membership_binding ::Google::Cloud::GkeHub::V1::UpdateMembershipBindingRequest.new(membership_binding: membership_binding, update_mask: update_mask) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_membership_binding({ membership_binding: membership_binding, update_mask: update_mask }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_membership_binding(::Google::Cloud::GkeHub::V1::UpdateMembershipBindingRequest.new(membership_binding: membership_binding, update_mask: update_mask), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_membership_binding_client_stub.call_rpc_count + end + end + + def test_delete_membership_binding + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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_membership_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_membership_binding, name + assert_kind_of ::Google::Cloud::GkeHub::V1::DeleteMembershipBindingRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_membership_binding_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_membership_binding({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_membership_binding name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_membership_binding ::Google::Cloud::GkeHub::V1::DeleteMembershipBindingRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_membership_binding({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_membership_binding(::Google::Cloud::GkeHub::V1::DeleteMembershipBindingRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_membership_binding_client_stub.call_rpc_count + end + end + + def test_list_membership_bindings + # Create GRPC objects. + grpc_response = ::Google::Cloud::GkeHub::V1::ListMembershipBindingsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + page_size = 42 + page_token = "hello world" + filter = "hello world" + + list_membership_bindings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_membership_bindings, name + assert_kind_of ::Google::Cloud::GkeHub::V1::ListMembershipBindingsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_membership_bindings_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_membership_bindings({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_membership_bindings parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_membership_bindings ::Google::Cloud::GkeHub::V1::ListMembershipBindingsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) 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 + client.list_membership_bindings({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, 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 + client.list_membership_bindings(::Google::Cloud::GkeHub::V1::ListMembershipBindingsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), 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_membership_bindings_client_stub.call_rpc_count + end + end + + def test_get_membership_rbac_role_binding + # Create GRPC objects. + grpc_response = ::Google::Cloud::GkeHub::V1::RBACRoleBinding.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_membership_rbac_role_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_membership_rbac_role_binding, name + assert_kind_of ::Google::Cloud::GkeHub::V1::GetMembershipRBACRoleBindingRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_membership_rbac_role_binding_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_membership_rbac_role_binding({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_membership_rbac_role_binding name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_membership_rbac_role_binding ::Google::Cloud::GkeHub::V1::GetMembershipRBACRoleBindingRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_membership_rbac_role_binding({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_membership_rbac_role_binding(::Google::Cloud::GkeHub::V1::GetMembershipRBACRoleBindingRequest.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_membership_rbac_role_binding_client_stub.call_rpc_count + end + end + + def test_create_membership_rbac_role_binding + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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" + rbacrolebinding_id = "hello world" + rbacrolebinding = {} + + create_membership_rbac_role_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_membership_rbac_role_binding, name + assert_kind_of ::Google::Cloud::GkeHub::V1::CreateMembershipRBACRoleBindingRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["rbacrolebinding_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GkeHub::V1::RBACRoleBinding), request["rbacrolebinding"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_membership_rbac_role_binding_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_membership_rbac_role_binding({ parent: parent, rbacrolebinding_id: rbacrolebinding_id, rbacrolebinding: rbacrolebinding }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_membership_rbac_role_binding parent: parent, rbacrolebinding_id: rbacrolebinding_id, rbacrolebinding: rbacrolebinding do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_membership_rbac_role_binding ::Google::Cloud::GkeHub::V1::CreateMembershipRBACRoleBindingRequest.new(parent: parent, rbacrolebinding_id: rbacrolebinding_id, rbacrolebinding: rbacrolebinding) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_membership_rbac_role_binding({ parent: parent, rbacrolebinding_id: rbacrolebinding_id, rbacrolebinding: rbacrolebinding }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_membership_rbac_role_binding(::Google::Cloud::GkeHub::V1::CreateMembershipRBACRoleBindingRequest.new(parent: parent, rbacrolebinding_id: rbacrolebinding_id, rbacrolebinding: rbacrolebinding), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_membership_rbac_role_binding_client_stub.call_rpc_count + end + end + + def test_update_membership_rbac_role_binding + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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. + rbacrolebinding = {} + update_mask = {} + + update_membership_rbac_role_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_membership_rbac_role_binding, name + assert_kind_of ::Google::Cloud::GkeHub::V1::UpdateMembershipRBACRoleBindingRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GkeHub::V1::RBACRoleBinding), request["rbacrolebinding"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_membership_rbac_role_binding_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_membership_rbac_role_binding({ rbacrolebinding: rbacrolebinding, update_mask: update_mask }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_membership_rbac_role_binding rbacrolebinding: rbacrolebinding, update_mask: update_mask do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_membership_rbac_role_binding ::Google::Cloud::GkeHub::V1::UpdateMembershipRBACRoleBindingRequest.new(rbacrolebinding: rbacrolebinding, update_mask: update_mask) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_membership_rbac_role_binding({ rbacrolebinding: rbacrolebinding, update_mask: update_mask }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_membership_rbac_role_binding(::Google::Cloud::GkeHub::V1::UpdateMembershipRBACRoleBindingRequest.new(rbacrolebinding: rbacrolebinding, update_mask: update_mask), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_membership_rbac_role_binding_client_stub.call_rpc_count + end + end + + def test_delete_membership_rbac_role_binding + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.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_membership_rbac_role_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_membership_rbac_role_binding, name + assert_kind_of ::Google::Cloud::GkeHub::V1::DeleteMembershipRBACRoleBindingRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_membership_rbac_role_binding_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_membership_rbac_role_binding({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_membership_rbac_role_binding name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_membership_rbac_role_binding ::Google::Cloud::GkeHub::V1::DeleteMembershipRBACRoleBindingRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_membership_rbac_role_binding({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_membership_rbac_role_binding(::Google::Cloud::GkeHub::V1::DeleteMembershipRBACRoleBindingRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_membership_rbac_role_binding_client_stub.call_rpc_count + end + end + + def test_list_membership_rbac_role_bindings + # Create GRPC objects. + grpc_response = ::Google::Cloud::GkeHub::V1::ListMembershipRBACRoleBindingsResponse.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_membership_rbac_role_bindings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_membership_rbac_role_bindings, name + assert_kind_of ::Google::Cloud::GkeHub::V1::ListMembershipRBACRoleBindingsRequest, 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_membership_rbac_role_bindings_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_membership_rbac_role_bindings({ 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 + client.list_membership_rbac_role_bindings 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 + client.list_membership_rbac_role_bindings ::Google::Cloud::GkeHub::V1::ListMembershipRBACRoleBindingsRequest.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 + client.list_membership_rbac_role_bindings({ 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 + client.list_membership_rbac_role_bindings(::Google::Cloud::GkeHub::V1::ListMembershipRBACRoleBindingsRequest.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_membership_rbac_role_bindings_client_stub.call_rpc_count + end + end + + def test_generate_membership_rbac_role_binding_yaml + # Create GRPC objects. + grpc_response = ::Google::Cloud::GkeHub::V1::GenerateMembershipRBACRoleBindingYAMLResponse.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" + rbacrolebinding_id = "hello world" + rbacrolebinding = {} + + generate_membership_rbac_role_binding_yaml_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :generate_membership_rbac_role_binding_yaml, name + assert_kind_of ::Google::Cloud::GkeHub::V1::GenerateMembershipRBACRoleBindingYAMLRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["rbacrolebinding_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GkeHub::V1::RBACRoleBinding), request["rbacrolebinding"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, generate_membership_rbac_role_binding_yaml_client_stub do + # Create client + client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.generate_membership_rbac_role_binding_yaml({ parent: parent, rbacrolebinding_id: rbacrolebinding_id, rbacrolebinding: rbacrolebinding }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.generate_membership_rbac_role_binding_yaml parent: parent, rbacrolebinding_id: rbacrolebinding_id, rbacrolebinding: rbacrolebinding do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.generate_membership_rbac_role_binding_yaml ::Google::Cloud::GkeHub::V1::GenerateMembershipRBACRoleBindingYAMLRequest.new(parent: parent, rbacrolebinding_id: rbacrolebinding_id, rbacrolebinding: rbacrolebinding) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.generate_membership_rbac_role_binding_yaml({ parent: parent, rbacrolebinding_id: rbacrolebinding_id, rbacrolebinding: rbacrolebinding }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.generate_membership_rbac_role_binding_yaml(::Google::Cloud::GkeHub::V1::GenerateMembershipRBACRoleBindingYAMLRequest.new(parent: parent, rbacrolebinding_id: rbacrolebinding_id, rbacrolebinding: rbacrolebinding), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, generate_membership_rbac_role_binding_yaml_client_stub.call_rpc_count + end + end + def test_configure grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/.gitignore b/owl-bot-staging/google-cloud-gke_hub-v1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-gke_hub-v1/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -# Ignore bundler lockfiles -Gemfile.lock -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-gke_hub-v1/.repo-metadata.json deleted file mode 100644 index ef9afa064903..000000000000 --- a/owl-bot-staging/google-cloud-gke_hub-v1/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_id": "gkehub.googleapis.com", - "api_shortname": "gkehub", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-gke_hub-v1/latest", - "distribution_name": "google-cloud-gke_hub-v1", - "is_cloud": true, - "language": "ruby", - "name": "gkehub", - "name_pretty": "GKE Hub V1 API", - "product_documentation": "https://cloud.google.com/anthos/clusters/docs", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "The GKE Hub API centrally manages features and services on all your Kubernetes clusters running in a variety of environments, including Google cloud, on premises in customer datacenters, or other third party clouds. Note that google-cloud-gke_hub-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-gke_hub instead. See the readme for more details.", - "ruby-cloud-env-prefix": "GKE_HUB", - "ruby-cloud-product-url": "https://cloud.google.com/anthos/clusters/docs", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/.rubocop.yml b/owl-bot-staging/google-cloud-gke_hub-v1/.rubocop.yml deleted file mode 100644 index 363761232662..000000000000 --- a/owl-bot-staging/google-cloud-gke_hub-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-gke_hub-v1.gemspec" - - "lib/**/*_pb.rb" - - "proto_docs/**/*" - - "test/**/*" - - "acceptance/**/*" - - "samples/acceptance/**/*" - - "Rakefile" - -Layout/LineLength: - Enabled: false -Metrics/AbcSize: - Enabled: false -Metrics/ClassLength: - Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false -Metrics/MethodLength: - Enabled: false -Metrics/ModuleLength: - Enabled: false -Metrics/PerceivedComplexity: - Enabled: false -Naming/AccessorMethodName: - Exclude: - - "snippets/**/*.rb" -Naming/FileName: - Exclude: - - "lib/google-cloud-gke_hub-v1.rb" diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/.toys.rb b/owl-bot-staging/google-cloud-gke_hub-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-gke_hub-v1/.toys.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -toys_version! ">= 0.15.3" - -if ENV["RUBY_COMMON_TOOLS"] - common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] - load File.join(common_tools_dir, "toys", "gapic") -else - load_git remote: "https://github.com/googleapis/ruby-common-tools.git", - path: "toys/gapic", - update: true -end diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/.yardopts b/owl-bot-staging/google-cloud-gke_hub-v1/.yardopts deleted file mode 100644 index 66024980f98d..000000000000 --- a/owl-bot-staging/google-cloud-gke_hub-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="GKE Hub V1 API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -./proto_docs/**/*.rb -- -README.md -LICENSE.md -AUTHENTICATION.md diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-gke_hub-v1/AUTHENTICATION.md deleted file mode 100644 index 04f4d8306d82..000000000000 --- a/owl-bot-staging/google-cloud-gke_hub-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-gke_hub-v1 library is to use -[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). -To review all of your authentication options, see [Credentials lookup](#credential-lookup). - -## Quickstart - -The following example shows how to set up authentication for a local development -environment with your user credentials. - -**NOTE:** This method is _not_ recommended for running in production. User credentials -should be used only during development. - -1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). -2. Set up a local ADC file with your user credentials: - -```sh -gcloud auth application-default login -``` - -3. Write code as if already authenticated. - -For more information about setting up authentication for a local development environment, see -[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). - -## Credential Lookup - -The google-cloud-gke_hub-v1 library provides several mechanisms to configure your system. -Generally, using Application Default Credentials to facilitate automatic -credentials discovery is the easist method. But if you need to explicitly specify -credentials, there are several methods available to you. - -Credentials are accepted in the following ways, in the following order or precedence: - -1. Credentials specified in method arguments -2. Credentials specified in configuration -3. Credentials pointed to or included in environment variables -4. Credentials found in local ADC file -5. Credentials returned by the metadata server for the attached service account (GCP) - -### Configuration - -You can configure a path to a JSON credentials file, either for an individual client object or -globally, for all client objects. The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -To configure a credentials file for an individual client initialization: - -```ruby -require "google/cloud/gke_hub/v1" - -client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/gke_hub/v1" - -::Google::Cloud::GkeHub::V1::GkeHub::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::GkeHub::V1::GkeHub::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-gke_hub-v1 -checks for credentials are: - -* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents -* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file - -```ruby -require "google/cloud/gke_hub/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::GkeHub::V1::GkeHub::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-gke_hub-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-gke_hub-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-gke_hub-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/Gemfile b/owl-bot-staging/google-cloud-gke_hub-v1/Gemfile deleted file mode 100644 index 6442df18fa2f..000000000000 --- a/owl-bot-staging/google-cloud-gke_hub-v1/Gemfile +++ /dev/null @@ -1,11 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.31.1" -gem "minitest", "~> 5.22" -gem "minitest-focus", "~> 1.4" -gem "minitest-rg", "~> 5.3" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/LICENSE.md b/owl-bot-staging/google-cloud-gke_hub-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-gke_hub-v1/LICENSE.md +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/README.md b/owl-bot-staging/google-cloud-gke_hub-v1/README.md deleted file mode 100644 index c701638c767a..000000000000 --- a/owl-bot-staging/google-cloud-gke_hub-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the GKE Hub V1 API - -API Client library for the GKE Hub V1 API - -The GKE Hub API centrally manages features and services on all your Kubernetes clusters running in a variety of environments, including Google cloud, on premises in customer datacenters, or other third party clouds. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the GKE Hub V1 API. Most users should consider using -the main client gem, -[google-cloud-gke_hub](https://rubygems.org/gems/google-cloud-gke_hub). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-gke_hub-v1 -``` - -## Before You Begin - -In order to use this library, you first need to go through the following steps: - -1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) -1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) -1. [Enable the API.](https://console.cloud.google.com/apis/library/gkehub.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/gke_hub/v1" - -client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new -request = ::Google::Cloud::GkeHub::V1::ListMembershipsRequest.new # (request fields as keyword arguments...) -response = client.list_memberships request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-gke_hub-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/anthos/clusters/docs) -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/gke_hub/v1" -require "logger" - -client = ::Google::Cloud::GkeHub::V1::GkeHub::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.0+. - -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-gke_hub`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-gke_hub-v1`. -_In most cases, you should install the main client._ - -### What's the difference between the main client and a versioned client? - -A _versioned client_ provides a basic set of data types and client classes for -a _single version_ of a specific service. (That is, for a service with multiple -versions, there might be a separate versioned client for each service version.) -Most versioned clients are written and maintained by a code generator. - -The _main client_ is designed to provide you with the _recommended_ client -interfaces for the service. There will be only one main client for any given -service, even a service with multiple versions. The main client includes -factory methods for constructing the client objects we recommend for most -users. In some cases, those will be classes provided by an underlying versioned -client; in other cases, they will be handwritten higher-level client objects -with additional capabilities, convenience methods, or best practices built in. -Generally, the main client will default to a recommended service version, -although in some cases you can override this if you need to talk to a specific -service version. - -### Why would I want to use the main client? - -We recommend that most users install the main client gem for a service. You can -identify this gem as the one _without_ a version in its name, e.g. -`google-cloud-gke_hub`. -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-gke_hub-v1`. - -### What about the google-apis- clients? - -Client library gems with names that begin with `google-apis-` are based on an -older code generation technology. They talk to a REST/JSON backend (whereas -most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may -not offer the same performance, features, and ease of use provided by more -modern clients. - -The `google-apis-` clients have wide coverage across Google services, so you -might need to use one if there is no modern client available for the service. -However, if a modern client is available, we generally recommend it over the -older `google-apis-` clients. diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/Rakefile b/owl-bot-staging/google-cloud-gke_hub-v1/Rakefile deleted file mode 100644 index f2cc8478fe6d..000000000000 --- a/owl-bot-staging/google-cloud-gke_hub-v1/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "bundler/setup" -require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = false -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -# Acceptance tests -desc "Run the google-cloud-gke_hub-v1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["GKE_HUB_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["GKE_HUB_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["GKE_HUB_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 GKE_HUB_TEST_PROJECT=test123 GKE_HUB_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/gke_hub/v1/gke_hub/credentials" - ::Google::Cloud::GkeHub::V1::GkeHub::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["GKE_HUB_PROJECT"] = project - ENV["GKE_HUB_TEST_PROJECT"] = project - ENV["GKE_HUB_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-gke_hub-v1 gem has no acceptance tests." - end - end - - desc "Run acceptance cleanup." - task :cleanup do - end -end - -task :samples do - Rake::Task["samples:latest"].invoke -end - -namespace :samples do - task :latest do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-gke_hub-v1 gem has no samples to test." - end - end - - task :master do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-gke_hub-v1 gem has no samples to test." - end - end -end - -require "yard" -require "yard/rake/yardoc_task" -YARD::Rake::YardocTask.new do |y| - y.options << "--fail-on-warning" -end - -desc "Run yard-doctest example tests." -task :doctest do - puts "The google-cloud-gke_hub-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-gke_hub-v1" - header "google-cloud-gke_hub-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-gke_hub-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-gke_hub-v1 test", "*" - Rake::Task[:test].invoke -end - -namespace :ci do - desc "Run the CI build, with smoke tests." - task :smoke_test do - Rake::Task[:ci].invoke - header "google-cloud-gke_hub-v1 smoke_test", "*" - Rake::Task[:smoke_test].invoke - end - desc "Run the CI build, with acceptance tests." - task :acceptance do - Rake::Task[:ci].invoke - header "google-cloud-gke_hub-v1 acceptance", "*" - Rake::Task[:acceptance].invoke - end - task :a do - # This is a handy shortcut to save typing - Rake::Task["ci:acceptance"].invoke - end -end - -task default: :test - -def header str, token = "#" - line_length = str.length + 8 - puts "" - puts token * line_length - puts "#{token * 3} #{str} #{token * 3}" - puts token * line_length - puts "" -end diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-gke_hub-v1/gapic_metadata.json deleted file mode 100644 index 60141aebea27..000000000000 --- a/owl-bot-staging/google-cloud-gke_hub-v1/gapic_metadata.json +++ /dev/null @@ -1,238 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.gkehub.v1", - "libraryPackage": "::Google::Cloud::GkeHub::V1", - "services": { - "GkeHub": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::GkeHub::V1::GkeHub::Client", - "rpcs": { - "ListMemberships": { - "methods": [ - "list_memberships" - ] - }, - "ListBoundMemberships": { - "methods": [ - "list_bound_memberships" - ] - }, - "ListFeatures": { - "methods": [ - "list_features" - ] - }, - "GetMembership": { - "methods": [ - "get_membership" - ] - }, - "GetFeature": { - "methods": [ - "get_feature" - ] - }, - "CreateMembership": { - "methods": [ - "create_membership" - ] - }, - "CreateFeature": { - "methods": [ - "create_feature" - ] - }, - "DeleteMembership": { - "methods": [ - "delete_membership" - ] - }, - "DeleteFeature": { - "methods": [ - "delete_feature" - ] - }, - "UpdateMembership": { - "methods": [ - "update_membership" - ] - }, - "UpdateFeature": { - "methods": [ - "update_feature" - ] - }, - "GenerateConnectManifest": { - "methods": [ - "generate_connect_manifest" - ] - }, - "CreateFleet": { - "methods": [ - "create_fleet" - ] - }, - "GetFleet": { - "methods": [ - "get_fleet" - ] - }, - "UpdateFleet": { - "methods": [ - "update_fleet" - ] - }, - "DeleteFleet": { - "methods": [ - "delete_fleet" - ] - }, - "ListFleets": { - "methods": [ - "list_fleets" - ] - }, - "GetScopeNamespace": { - "methods": [ - "get_scope_namespace" - ] - }, - "CreateScopeNamespace": { - "methods": [ - "create_scope_namespace" - ] - }, - "UpdateScopeNamespace": { - "methods": [ - "update_scope_namespace" - ] - }, - "DeleteScopeNamespace": { - "methods": [ - "delete_scope_namespace" - ] - }, - "ListScopeNamespaces": { - "methods": [ - "list_scope_namespaces" - ] - }, - "GetScopeRBACRoleBinding": { - "methods": [ - "get_scope_rbac_role_binding" - ] - }, - "CreateScopeRBACRoleBinding": { - "methods": [ - "create_scope_rbac_role_binding" - ] - }, - "UpdateScopeRBACRoleBinding": { - "methods": [ - "update_scope_rbac_role_binding" - ] - }, - "DeleteScopeRBACRoleBinding": { - "methods": [ - "delete_scope_rbac_role_binding" - ] - }, - "ListScopeRBACRoleBindings": { - "methods": [ - "list_scope_rbac_role_bindings" - ] - }, - "GetScope": { - "methods": [ - "get_scope" - ] - }, - "CreateScope": { - "methods": [ - "create_scope" - ] - }, - "UpdateScope": { - "methods": [ - "update_scope" - ] - }, - "DeleteScope": { - "methods": [ - "delete_scope" - ] - }, - "ListScopes": { - "methods": [ - "list_scopes" - ] - }, - "ListPermittedScopes": { - "methods": [ - "list_permitted_scopes" - ] - }, - "GetMembershipBinding": { - "methods": [ - "get_membership_binding" - ] - }, - "CreateMembershipBinding": { - "methods": [ - "create_membership_binding" - ] - }, - "UpdateMembershipBinding": { - "methods": [ - "update_membership_binding" - ] - }, - "DeleteMembershipBinding": { - "methods": [ - "delete_membership_binding" - ] - }, - "ListMembershipBindings": { - "methods": [ - "list_membership_bindings" - ] - }, - "GetMembershipRBACRoleBinding": { - "methods": [ - "get_membership_rbac_role_binding" - ] - }, - "CreateMembershipRBACRoleBinding": { - "methods": [ - "create_membership_rbac_role_binding" - ] - }, - "UpdateMembershipRBACRoleBinding": { - "methods": [ - "update_membership_rbac_role_binding" - ] - }, - "DeleteMembershipRBACRoleBinding": { - "methods": [ - "delete_membership_rbac_role_binding" - ] - }, - "ListMembershipRBACRoleBindings": { - "methods": [ - "list_membership_rbac_role_bindings" - ] - }, - "GenerateMembershipRBACRoleBindingYAML": { - "methods": [ - "generate_membership_rbac_role_binding_yaml" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/google-cloud-gke_hub-v1.gemspec b/owl-bot-staging/google-cloud-gke_hub-v1/google-cloud-gke_hub-v1.gemspec deleted file mode 100644 index bdc6cfcf830e..000000000000 --- a/owl-bot-staging/google-cloud-gke_hub-v1/google-cloud-gke_hub-v1.gemspec +++ /dev/null @@ -1,28 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/gke_hub/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-gke_hub-v1" - gem.version = Google::Cloud::GkeHub::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "The GKE Hub API centrally manages features and services on all your Kubernetes clusters running in a variety of environments, including Google cloud, on premises in customer datacenters, or other third party clouds. Note that google-cloud-gke_hub-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-gke_hub instead. See the readme for more details." - gem.summary = "API Client library for the GKE Hub V1 API" - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.1" - - gem.add_dependency "gapic-common", "~> 1.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" -end diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/lib/google-cloud-gke_hub-v1.rb b/owl-bot-staging/google-cloud-gke_hub-v1/lib/google-cloud-gke_hub-v1.rb deleted file mode 100644 index 137bbe89022c..000000000000 --- a/owl-bot-staging/google-cloud-gke_hub-v1/lib/google-cloud-gke_hub-v1.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# This gem does not autoload during Bundler.require. To load this gem, -# issue explicit require statements for the packages desired, e.g.: -# require "google/cloud/gke_hub/v1" diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1.rb b/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1.rb deleted file mode 100644 index a34b927b5f54..000000000000 --- a/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1.rb +++ /dev/null @@ -1,45 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/gke_hub/v1/gke_hub" -require "google/cloud/gke_hub/v1/version" - -module Google - module Cloud - module GkeHub - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/gke_hub/v1" - # client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/gke_hub/v1" - # client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new - # - module V1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/gke_hub/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub.rb b/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub.rb deleted file mode 100644 index 68bb0eaf832b..000000000000 --- a/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub.rb +++ /dev/null @@ -1,72 +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/gke_hub/v1/version" - -require "google/cloud/gke_hub/v1/gke_hub/credentials" -require "google/cloud/gke_hub/v1/gke_hub/paths" -require "google/cloud/gke_hub/v1/gke_hub/operations" -require "google/cloud/gke_hub/v1/gke_hub/client" -require "google/cloud/gke_hub/v1/gke_hub/rest" - -module Google - module Cloud - module GkeHub - module V1 - ## - # The GKE Hub service handles the registration of many Kubernetes clusters to - # Google Cloud, and the management of multi-cluster features over those - # clusters. - # - # The GKE Hub service operates on the following resources: - # - # * {::Google::Cloud::GkeHub::V1::Membership Membership} - # * {::Google::Cloud::GkeHub::V1::Feature Feature} - # - # GKE Hub is currently available in the global region and all regions in - # https://cloud.google.com/compute/docs/regions-zones. Feature is only - # available in global region while membership is global region and all the - # regions. - # - # **Membership management may be non-trivial:** it is recommended to use one - # of the Google-provided client libraries or tools where possible when working - # with Membership resources. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/gke_hub/v1/gke_hub" - # client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/gke_hub/v1/gke_hub/rest" - # client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new - # - module GkeHub - end - end - end - end -end - -helper_path = ::File.join __dir__, "gke_hub", "helpers.rb" -require "google/cloud/gke_hub/v1/gke_hub/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub/client.rb b/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub/client.rb deleted file mode 100644 index 7c1183e4d389..000000000000 --- a/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub/client.rb +++ /dev/null @@ -1,5173 +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/gkehub/v1/service_pb" - -module Google - module Cloud - module GkeHub - module V1 - module GkeHub - ## - # Client for the GkeHub service. - # - # The GKE Hub service handles the registration of many Kubernetes clusters to - # Google Cloud, and the management of multi-cluster features over those - # clusters. - # - # The GKE Hub service operates on the following resources: - # - # * {::Google::Cloud::GkeHub::V1::Membership Membership} - # * {::Google::Cloud::GkeHub::V1::Feature Feature} - # - # GKE Hub is currently available in the global region and all regions in - # https://cloud.google.com/compute/docs/regions-zones. Feature is only - # available in global region while membership is global region and all the - # regions. - # - # **Membership management may be non-trivial:** it is recommended to use one - # of the Google-provided client libraries or tools where possible when working - # with Membership resources. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "gkehub.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :gke_hub_stub - - ## - # Configure the GkeHub Client class. - # - # See {::Google::Cloud::GkeHub::V1::GkeHub::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all GkeHub clients - # ::Google::Cloud::GkeHub::V1::GkeHub::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", "GkeHub", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the GkeHub 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::GkeHub::V1::GkeHub::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 - @gke_hub_stub.universe_domain - end - - ## - # Create a new GkeHub client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the GkeHub 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/gkehub/v1/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 - - @operations_client = Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @gke_hub_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::GkeHub::V1::GkeHub::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 - ) - - @gke_hub_stub.stub_logger&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::GkeHub::V1::GkeHub::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @gke_hub_stub.logger - end - - # Service calls - - ## - # Lists Memberships in a given project and location. - # - # @overload list_memberships(request, options = nil) - # Pass arguments to `list_memberships` via a request object, either of type - # {::Google::Cloud::GkeHub::V1::ListMembershipsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeHub::V1::ListMembershipsRequest, ::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_memberships(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_memberships` 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 (project and location) where the Memberships will be - # listed. Specified in the format `projects/*/locations/*`. - # `projects/*/locations/-` list memberships in all the regions. - # @param page_size [::Integer] - # Optional. When requesting a 'page' of resources, `page_size` specifies - # number of resources to return. If unspecified or set to 0, all resources - # will be returned. - # @param page_token [::String] - # Optional. Token returned by previous call to `ListMemberships` which - # specifies the position in the list from where to continue listing the - # resources. - # @param filter [::String] - # Optional. Lists Memberships that match the filter expression, following the - # syntax outlined in https://google.aip.dev/160. - # - # Examples: - # - # - Name is `bar` in project `foo-proj` and location `global`: - # - # name = "projects/foo-proj/locations/global/membership/bar" - # - # - Memberships that have a label called `foo`: - # - # labels.foo:* - # - # - Memberships that have a label called `foo` whose value is `bar`: - # - # labels.foo = bar - # - # - Memberships in the CREATING state: - # - # state = CREATING - # @param order_by [::String] - # Optional. One or more fields to compare and use to sort the output. - # See https://google.aip.dev/132#ordering. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GkeHub::V1::Membership>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::GkeHub::V1::Membership>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/gke_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeHub::V1::ListMembershipsRequest.new - # - # # Call the list_memberships method. - # result = client.list_memberships 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::GkeHub::V1::Membership. - # p item - # end - # - def list_memberships request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::ListMembershipsRequest - - # 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_memberships.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::GkeHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_memberships.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_memberships.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gke_hub_stub.call_rpc :list_memberships, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @gke_hub_stub, :list_memberships, 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 - - ## - # Lists Memberships bound to a Scope. The response includes relevant - # Memberships from all regions. - # - # @overload list_bound_memberships(request, options = nil) - # Pass arguments to `list_bound_memberships` via a request object, either of type - # {::Google::Cloud::GkeHub::V1::ListBoundMembershipsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeHub::V1::ListBoundMembershipsRequest, ::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_bound_memberships(scope_name: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_bound_memberships` 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 scope_name [::String] - # Required. Name of the Scope, in the format - # `projects/*/locations/global/scopes/*`, to which the Memberships are bound. - # @param filter [::String] - # Optional. Lists Memberships that match the filter expression, following the - # syntax outlined in https://google.aip.dev/160. Currently, filtering - # can be done only based on Memberships's `name`, `labels`, `create_time`, - # `update_time`, and `unique_id`. - # @param page_size [::Integer] - # Optional. When requesting a 'page' of resources, `page_size` specifies - # number of resources to return. If unspecified or set to 0, all resources - # will be returned. Pagination is currently not supported; therefore, setting - # this field does not have any impact for now. - # @param page_token [::String] - # Optional. Token returned by previous call to `ListBoundMemberships` which - # specifies the position in the list from where to continue listing the - # resources. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GkeHub::V1::Membership>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::GkeHub::V1::Membership>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/gke_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeHub::V1::ListBoundMembershipsRequest.new - # - # # Call the list_bound_memberships method. - # result = client.list_bound_memberships 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::GkeHub::V1::Membership. - # p item - # end - # - def list_bound_memberships request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::ListBoundMembershipsRequest - - # 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_bound_memberships.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::GkeHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.scope_name - header_params["scope_name"] = request.scope_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.list_bound_memberships.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_bound_memberships.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gke_hub_stub.call_rpc :list_bound_memberships, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @gke_hub_stub, :list_bound_memberships, 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 - - ## - # Lists Features in a given project and location. - # - # @overload list_features(request, options = nil) - # Pass arguments to `list_features` via a request object, either of type - # {::Google::Cloud::GkeHub::V1::ListFeaturesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeHub::V1::ListFeaturesRequest, ::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_features(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, return_partial_success: nil) - # Pass arguments to `list_features` 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 (project and location) where the Features will be - # listed. Specified in the format `projects/*/locations/*`. - # @param page_size [::Integer] - # When requesting a 'page' of resources, `page_size` specifies number of - # resources to return. If unspecified or set to 0, all resources will - # be returned. - # @param page_token [::String] - # Token returned by previous call to `ListFeatures` which - # specifies the position in the list from where to continue listing the - # resources. - # @param filter [::String] - # Lists Features that match the filter expression, following the syntax - # outlined in https://google.aip.dev/160. - # - # Examples: - # - # - Feature with the name "servicemesh" in project "foo-proj": - # - # name = "projects/foo-proj/locations/global/features/servicemesh" - # - # - Features that have a label called `foo`: - # - # labels.foo:* - # - # - Features that have a label called `foo` whose value is `bar`: - # - # labels.foo = bar - # @param order_by [::String] - # One or more fields to compare and use to sort the output. - # See https://google.aip.dev/132#ordering. - # @param return_partial_success [::Boolean] - # Optional. If set to true, the response will return partial results when - # some regions are unreachable and the unreachable field in Feature proto - # will be populated. If set to false, the request will fail when some regions - # are unreachable. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GkeHub::V1::Feature>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::GkeHub::V1::Feature>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/gke_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeHub::V1::ListFeaturesRequest.new - # - # # Call the list_features method. - # result = client.list_features 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::GkeHub::V1::Feature. - # p item - # end - # - def list_features request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::ListFeaturesRequest - - # 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_features.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::GkeHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_features.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_features.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gke_hub_stub.call_rpc :list_features, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @gke_hub_stub, :list_features, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the details of a Membership. - # - # @overload get_membership(request, options = nil) - # Pass arguments to `get_membership` via a request object, either of type - # {::Google::Cloud::GkeHub::V1::GetMembershipRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeHub::V1::GetMembershipRequest, ::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_membership(name: nil) - # Pass arguments to `get_membership` 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 Membership resource name in the format - # `projects/*/locations/*/memberships/*`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::GkeHub::V1::Membership] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::GkeHub::V1::Membership] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/gke_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeHub::V1::GetMembershipRequest.new - # - # # Call the get_membership method. - # result = client.get_membership request - # - # # The returned object is of type Google::Cloud::GkeHub::V1::Membership. - # p result - # - def get_membership request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::GetMembershipRequest - - # 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_membership.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::GkeHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_membership.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_membership.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gke_hub_stub.call_rpc :get_membership, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single Feature. - # - # @overload get_feature(request, options = nil) - # Pass arguments to `get_feature` via a request object, either of type - # {::Google::Cloud::GkeHub::V1::GetFeatureRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeHub::V1::GetFeatureRequest, ::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_feature(name: nil, return_partial_success: nil) - # Pass arguments to `get_feature` 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 Feature resource name in the format - # `projects/*/locations/*/features/*` - # @param return_partial_success [::Boolean] - # Optional. If set to true, the response will return partial results when - # some regions are unreachable and the unreachable field in Feature proto - # will be populated. If set to false, the request will fail when some regions - # are unreachable. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::GkeHub::V1::Feature] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::GkeHub::V1::Feature] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/gke_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeHub::V1::GetFeatureRequest.new - # - # # Call the get_feature method. - # result = client.get_feature request - # - # # The returned object is of type Google::Cloud::GkeHub::V1::Feature. - # p result - # - def get_feature request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::GetFeatureRequest - - # 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_feature.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::GkeHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_feature.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_feature.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gke_hub_stub.call_rpc :get_feature, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new Membership. - # - # **This is currently only supported for GKE clusters on Google Cloud**. - # To register other clusters, follow the instructions at - # https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster. - # - # @overload create_membership(request, options = nil) - # Pass arguments to `create_membership` via a request object, either of type - # {::Google::Cloud::GkeHub::V1::CreateMembershipRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeHub::V1::CreateMembershipRequest, ::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_membership(parent: nil, membership_id: nil, resource: nil, request_id: nil) - # Pass arguments to `create_membership` 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 (project and location) where the Memberships will be - # created. Specified in the format `projects/*/locations/*`. - # @param membership_id [::String] - # Required. Client chosen ID for the membership. `membership_id` must be a - # valid RFC 1123 compliant DNS label: - # - # 1. At most 63 characters in length - # 2. It must consist of lower case alphanumeric characters or `-` - # 3. It must start and end with an alphanumeric character - # - # Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, - # with a maximum length of 63 characters. - # @param resource [::Google::Cloud::GkeHub::V1::Membership, ::Hash] - # Required. The membership to create. - # @param request_id [::String] - # Optional. A request ID to identify requests. Specify a unique request ID - # so that if you must retry your request, the server will know to ignore - # the request if it has already been completed. The server will guarantee - # that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/gke_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeHub::V1::CreateMembershipRequest.new - # - # # Call the create_membership method. - # result = client.create_membership request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_membership request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::CreateMembershipRequest - - # 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_membership.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::GkeHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_membership.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_membership.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gke_hub_stub.call_rpc :create_membership, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Adds a new Feature. - # - # @overload create_feature(request, options = nil) - # Pass arguments to `create_feature` via a request object, either of type - # {::Google::Cloud::GkeHub::V1::CreateFeatureRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeHub::V1::CreateFeatureRequest, ::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_feature(parent: nil, feature_id: nil, resource: nil, request_id: nil) - # Pass arguments to `create_feature` 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 (project and location) where the Feature will be - # created. Specified in the format `projects/*/locations/*`. - # @param feature_id [::String] - # The ID of the feature to create. - # @param resource [::Google::Cloud::GkeHub::V1::Feature, ::Hash] - # The Feature resource to create. - # @param request_id [::String] - # A request ID to identify requests. Specify a unique request ID - # so that if you must retry your request, the server will know to ignore - # the request if it has already been completed. The server will guarantee - # that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/gke_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeHub::V1::CreateFeatureRequest.new - # - # # Call the create_feature method. - # result = client.create_feature request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_feature request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::CreateFeatureRequest - - # 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_feature.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::GkeHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_feature.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_feature.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gke_hub_stub.call_rpc :create_feature, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Removes a Membership. - # - # **This is currently only supported for GKE clusters on Google Cloud**. - # To unregister other clusters, follow the instructions at - # https://cloud.google.com/anthos/multicluster-management/connect/unregistering-a-cluster. - # - # @overload delete_membership(request, options = nil) - # Pass arguments to `delete_membership` via a request object, either of type - # {::Google::Cloud::GkeHub::V1::DeleteMembershipRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeHub::V1::DeleteMembershipRequest, ::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_membership(name: nil, request_id: nil, force: nil) - # Pass arguments to `delete_membership` 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 Membership resource name in the format - # `projects/*/locations/*/memberships/*`. - # @param request_id [::String] - # Optional. A request ID to identify requests. Specify a unique request ID - # so that if you must retry your request, the server will know to ignore - # the request if it has already been completed. The server will guarantee - # that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @param force [::Boolean] - # Optional. If set to true, any subresource from this Membership will also be - # deleted. Otherwise, the request will only work if the Membership has no - # subresource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/gke_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeHub::V1::DeleteMembershipRequest.new - # - # # Call the delete_membership method. - # result = client.delete_membership request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_membership request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::DeleteMembershipRequest - - # 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_membership.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::GkeHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_membership.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_membership.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gke_hub_stub.call_rpc :delete_membership, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Removes a Feature. - # - # @overload delete_feature(request, options = nil) - # Pass arguments to `delete_feature` via a request object, either of type - # {::Google::Cloud::GkeHub::V1::DeleteFeatureRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeHub::V1::DeleteFeatureRequest, ::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_feature(name: nil, force: nil, request_id: nil) - # Pass arguments to `delete_feature` 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 Feature resource name in the format - # `projects/*/locations/*/features/*`. - # @param force [::Boolean] - # If set to true, the delete will ignore any outstanding resources for - # this Feature (that is, `FeatureState.has_resources` is set to true). These - # resources will NOT be cleaned up or modified in any way. - # @param request_id [::String] - # Optional. A request ID to identify requests. Specify a unique request ID - # so that if you must retry your request, the server will know to ignore - # the request if it has already been completed. The server will guarantee - # that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/gke_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeHub::V1::DeleteFeatureRequest.new - # - # # Call the delete_feature method. - # result = client.delete_feature request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_feature request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::DeleteFeatureRequest - - # 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_feature.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::GkeHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_feature.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_feature.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gke_hub_stub.call_rpc :delete_feature, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an existing Membership. - # - # @overload update_membership(request, options = nil) - # Pass arguments to `update_membership` via a request object, either of type - # {::Google::Cloud::GkeHub::V1::UpdateMembershipRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeHub::V1::UpdateMembershipRequest, ::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_membership(name: nil, update_mask: nil, resource: nil, request_id: nil) - # Pass arguments to `update_membership` 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 Membership resource name in the format - # `projects/*/locations/*/memberships/*`. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask of fields to update. - # @param resource [::Google::Cloud::GkeHub::V1::Membership, ::Hash] - # Required. Only fields specified in update_mask are updated. - # If you specify a field in the update_mask but don't specify its value here - # that field will be deleted. - # If you are updating a map field, set the value of a key to null or empty - # string to delete the key from the map. It's not possible to update a key's - # value to the empty string. - # If you specify the update_mask to be a special path "*", fully replaces all - # user-modifiable fields to match `resource`. - # @param request_id [::String] - # Optional. A request ID to identify requests. Specify a unique request ID - # so that if you must retry your request, the server will know to ignore - # the request if it has already been completed. The server will guarantee - # that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/gke_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeHub::V1::UpdateMembershipRequest.new - # - # # Call the update_membership method. - # result = client.update_membership request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_membership request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::UpdateMembershipRequest - - # 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_membership.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::GkeHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_membership.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_membership.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gke_hub_stub.call_rpc :update_membership, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an existing Feature. - # - # @overload update_feature(request, options = nil) - # Pass arguments to `update_feature` via a request object, either of type - # {::Google::Cloud::GkeHub::V1::UpdateFeatureRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeHub::V1::UpdateFeatureRequest, ::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_feature(name: nil, update_mask: nil, resource: nil, request_id: nil) - # Pass arguments to `update_feature` 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 Feature resource name in the format - # `projects/*/locations/*/features/*`. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Mask of fields to update. - # @param resource [::Google::Cloud::GkeHub::V1::Feature, ::Hash] - # Only fields specified in update_mask are updated. - # If you specify a field in the update_mask but don't specify its value here - # that field will be deleted. - # If you are updating a map field, set the value of a key to null or empty - # string to delete the key from the map. It's not possible to update a key's - # value to the empty string. - # If you specify the update_mask to be a special path "*", fully replaces all - # user-modifiable fields to match `resource`. - # @param request_id [::String] - # A request ID to identify requests. Specify a unique request ID - # so that if you must retry your request, the server will know to ignore - # the request if it has already been completed. The server will guarantee - # that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/gke_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeHub::V1::UpdateFeatureRequest.new - # - # # Call the update_feature method. - # result = client.update_feature request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_feature request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::UpdateFeatureRequest - - # 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_feature.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::GkeHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_feature.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_feature.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gke_hub_stub.call_rpc :update_feature, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Generates the manifest for deployment of the GKE connect agent. - # - # **This method is used internally by Google-provided libraries.** - # Most clients should not need to call this method directly. - # - # @overload generate_connect_manifest(request, options = nil) - # Pass arguments to `generate_connect_manifest` via a request object, either of type - # {::Google::Cloud::GkeHub::V1::GenerateConnectManifestRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeHub::V1::GenerateConnectManifestRequest, ::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 generate_connect_manifest(name: nil, namespace: nil, proxy: nil, version: nil, is_upgrade: nil, registry: nil, image_pull_secret_content: nil) - # Pass arguments to `generate_connect_manifest` 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 Membership resource name the Agent will associate with, in - # the format `projects/*/locations/*/memberships/*`. - # @param namespace [::String] - # Optional. Namespace for GKE Connect agent resources. Defaults to - # `gke-connect`. - # - # The Connect Agent is authorized automatically when run in the default - # namespace. Otherwise, explicit authorization must be granted with an - # additional IAM binding. - # @param proxy [::String] - # Optional. URI of a proxy if connectivity from the agent to - # gkeconnect.googleapis.com requires the use of a proxy. Format must be in - # the form `http(s)://{proxy_address}`, depending on the HTTP/HTTPS protocol - # supported by the proxy. This will direct the connect agent's outbound - # traffic through a HTTP(S) proxy. - # @param version [::String] - # Optional. The Connect agent version to use. Defaults to the most current - # version. - # @param is_upgrade [::Boolean] - # Optional. If true, generate the resources for upgrade only. Some resources - # generated only for installation (e.g. secrets) will be excluded. - # @param registry [::String] - # Optional. The registry to fetch the connect agent image from. Defaults to - # gcr.io/gkeconnect. - # @param image_pull_secret_content [::String] - # Optional. The image pull secret content for the registry, if not public. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::GkeHub::V1::GenerateConnectManifestResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::GkeHub::V1::GenerateConnectManifestResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/gke_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeHub::V1::GenerateConnectManifestRequest.new - # - # # Call the generate_connect_manifest method. - # result = client.generate_connect_manifest request - # - # # The returned object is of type Google::Cloud::GkeHub::V1::GenerateConnectManifestResponse. - # p result - # - def generate_connect_manifest request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::GenerateConnectManifestRequest - - # 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.generate_connect_manifest.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::GkeHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.generate_connect_manifest.timeout, - metadata: metadata, - retry_policy: @config.rpcs.generate_connect_manifest.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gke_hub_stub.call_rpc :generate_connect_manifest, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a fleet. - # - # @overload create_fleet(request, options = nil) - # Pass arguments to `create_fleet` via a request object, either of type - # {::Google::Cloud::GkeHub::V1::CreateFleetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeHub::V1::CreateFleetRequest, ::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_fleet(parent: nil, fleet: nil) - # Pass arguments to `create_fleet` 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 (project and location) where the Fleet will be - # created. Specified in the format `projects/*/locations/*`. - # @param fleet [::Google::Cloud::GkeHub::V1::Fleet, ::Hash] - # Required. The fleet to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/gke_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeHub::V1::CreateFleetRequest.new - # - # # Call the create_fleet method. - # result = client.create_fleet request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_fleet request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::CreateFleetRequest - - # 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_fleet.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::GkeHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_fleet.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_fleet.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gke_hub_stub.call_rpc :create_fleet, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns the details of a fleet. - # - # @overload get_fleet(request, options = nil) - # Pass arguments to `get_fleet` via a request object, either of type - # {::Google::Cloud::GkeHub::V1::GetFleetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeHub::V1::GetFleetRequest, ::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_fleet(name: nil) - # Pass arguments to `get_fleet` 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 Fleet resource name in the format - # `projects/*/locations/*/fleets/*`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::GkeHub::V1::Fleet] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::GkeHub::V1::Fleet] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/gke_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeHub::V1::GetFleetRequest.new - # - # # Call the get_fleet method. - # result = client.get_fleet request - # - # # The returned object is of type Google::Cloud::GkeHub::V1::Fleet. - # p result - # - def get_fleet request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::GetFleetRequest - - # 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_fleet.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::GkeHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_fleet.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_fleet.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gke_hub_stub.call_rpc :get_fleet, 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 a fleet. - # - # @overload update_fleet(request, options = nil) - # Pass arguments to `update_fleet` via a request object, either of type - # {::Google::Cloud::GkeHub::V1::UpdateFleetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeHub::V1::UpdateFleetRequest, ::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_fleet(fleet: nil, update_mask: nil) - # Pass arguments to `update_fleet` 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 fleet [::Google::Cloud::GkeHub::V1::Fleet, ::Hash] - # Required. The Fleet to update. - # - # The `name` field of the Fleet object identifies which fleet will be - # updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The fields to be updated; - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/gke_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeHub::V1::UpdateFleetRequest.new - # - # # Call the update_fleet method. - # result = client.update_fleet request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_fleet request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::UpdateFleetRequest - - # 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_fleet.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::GkeHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.fleet&.name - header_params["fleet.name"] = request.fleet.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_fleet.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_fleet.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gke_hub_stub.call_rpc :update_fleet, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Removes a Fleet. There must be no memberships remaining in the Fleet. - # - # @overload delete_fleet(request, options = nil) - # Pass arguments to `delete_fleet` via a request object, either of type - # {::Google::Cloud::GkeHub::V1::DeleteFleetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeHub::V1::DeleteFleetRequest, ::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_fleet(name: nil) - # Pass arguments to `delete_fleet` 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 Fleet resource name in the format - # `projects/*/locations/*/fleets/*`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/gke_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeHub::V1::DeleteFleetRequest.new - # - # # Call the delete_fleet method. - # result = client.delete_fleet request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_fleet request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::DeleteFleetRequest - - # 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_fleet.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::GkeHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_fleet.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_fleet.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gke_hub_stub.call_rpc :delete_fleet, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns all fleets within an organization or a project that the caller has - # access to. - # - # @overload list_fleets(request, options = nil) - # Pass arguments to `list_fleets` via a request object, either of type - # {::Google::Cloud::GkeHub::V1::ListFleetsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeHub::V1::ListFleetsRequest, ::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_fleets(parent: nil, page_token: nil, page_size: nil) - # Pass arguments to `list_fleets` 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 organization or project to list for Fleets under, in the - # format `organizations/*/locations/*` or `projects/*/locations/*`. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListFleets` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListFleets` must match - # the call that provided the page token. - # @param page_size [::Integer] - # Optional. The maximum number of fleets to return. The service may return - # fewer than this value. If unspecified, at most 200 fleets will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GkeHub::V1::Fleet>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::GkeHub::V1::Fleet>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/gke_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeHub::V1::ListFleetsRequest.new - # - # # Call the list_fleets method. - # result = client.list_fleets 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::GkeHub::V1::Fleet. - # p item - # end - # - def list_fleets request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::ListFleetsRequest - - # 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_fleets.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::GkeHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_fleets.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_fleets.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gke_hub_stub.call_rpc :list_fleets, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @gke_hub_stub, :list_fleets, 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 - - ## - # Returns the details of a fleet namespace. - # - # @overload get_scope_namespace(request, options = nil) - # Pass arguments to `get_scope_namespace` via a request object, either of type - # {::Google::Cloud::GkeHub::V1::GetScopeNamespaceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeHub::V1::GetScopeNamespaceRequest, ::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_scope_namespace(name: nil) - # Pass arguments to `get_scope_namespace` 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 Namespace resource name in the format - # `projects/*/locations/*/scopes/*/namespaces/*`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::GkeHub::V1::Namespace] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::GkeHub::V1::Namespace] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/gke_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeHub::V1::GetScopeNamespaceRequest.new - # - # # Call the get_scope_namespace method. - # result = client.get_scope_namespace request - # - # # The returned object is of type Google::Cloud::GkeHub::V1::Namespace. - # p result - # - def get_scope_namespace request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::GetScopeNamespaceRequest - - # 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_scope_namespace.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::GkeHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_scope_namespace.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_scope_namespace.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gke_hub_stub.call_rpc :get_scope_namespace, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a fleet namespace. - # - # @overload create_scope_namespace(request, options = nil) - # Pass arguments to `create_scope_namespace` via a request object, either of type - # {::Google::Cloud::GkeHub::V1::CreateScopeNamespaceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeHub::V1::CreateScopeNamespaceRequest, ::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_scope_namespace(parent: nil, scope_namespace_id: nil, scope_namespace: nil) - # Pass arguments to `create_scope_namespace` 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 (project and location) where the Namespace will be - # created. Specified in the format `projects/*/locations/*/scopes/*`. - # @param scope_namespace_id [::String] - # Required. Client chosen ID for the Namespace. `namespace_id` must be a - # valid RFC 1123 compliant DNS label: - # - # 1. At most 63 characters in length - # 2. It must consist of lower case alphanumeric characters or `-` - # 3. It must start and end with an alphanumeric character - # - # Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, - # with a maximum length of 63 characters. - # @param scope_namespace [::Google::Cloud::GkeHub::V1::Namespace, ::Hash] - # Required. The fleet namespace to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/gke_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeHub::V1::CreateScopeNamespaceRequest.new - # - # # Call the create_scope_namespace method. - # result = client.create_scope_namespace request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_scope_namespace request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::CreateScopeNamespaceRequest - - # 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_scope_namespace.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::GkeHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_scope_namespace.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_scope_namespace.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gke_hub_stub.call_rpc :create_scope_namespace, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a fleet namespace. - # - # @overload update_scope_namespace(request, options = nil) - # Pass arguments to `update_scope_namespace` via a request object, either of type - # {::Google::Cloud::GkeHub::V1::UpdateScopeNamespaceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeHub::V1::UpdateScopeNamespaceRequest, ::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_scope_namespace(scope_namespace: nil, update_mask: nil) - # Pass arguments to `update_scope_namespace` 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 scope_namespace [::Google::Cloud::GkeHub::V1::Namespace, ::Hash] - # Required. A namespace with fields updated. The 'name' field in this - # namespace is used to identify the resource to update. Given 'updated' - # prefix to follow go/proto-best-practices-checkers#keyword_conflict - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The fields to be updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/gke_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeHub::V1::UpdateScopeNamespaceRequest.new - # - # # Call the update_scope_namespace method. - # result = client.update_scope_namespace request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_scope_namespace request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::UpdateScopeNamespaceRequest - - # 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_scope_namespace.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::GkeHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.scope_namespace&.name - header_params["scope_namespace.name"] = request.scope_namespace.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_scope_namespace.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_scope_namespace.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gke_hub_stub.call_rpc :update_scope_namespace, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a fleet namespace. - # - # @overload delete_scope_namespace(request, options = nil) - # Pass arguments to `delete_scope_namespace` via a request object, either of type - # {::Google::Cloud::GkeHub::V1::DeleteScopeNamespaceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeHub::V1::DeleteScopeNamespaceRequest, ::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_scope_namespace(name: nil) - # Pass arguments to `delete_scope_namespace` 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 Namespace resource name in the format - # `projects/*/locations/*/scopes/*/namespaces/*`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/gke_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeHub::V1::DeleteScopeNamespaceRequest.new - # - # # Call the delete_scope_namespace method. - # result = client.delete_scope_namespace request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_scope_namespace request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::DeleteScopeNamespaceRequest - - # 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_scope_namespace.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::GkeHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_scope_namespace.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_scope_namespace.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gke_hub_stub.call_rpc :delete_scope_namespace, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists fleet namespaces. - # - # @overload list_scope_namespaces(request, options = nil) - # Pass arguments to `list_scope_namespaces` via a request object, either of type - # {::Google::Cloud::GkeHub::V1::ListScopeNamespacesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeHub::V1::ListScopeNamespacesRequest, ::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_scope_namespaces(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_scope_namespaces` 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 (project and location) where the Features will be - # listed. Specified in the format `projects/*/locations/*/scopes/*`. - # @param page_size [::Integer] - # Optional. When requesting a 'page' of resources, `page_size` specifies - # number of resources to return. If unspecified or set to 0, all resources - # will be returned. - # @param page_token [::String] - # Optional. Token returned by previous call to `ListFeatures` which - # specifies the position in the list from where to continue listing the - # resources. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GkeHub::V1::Namespace>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::GkeHub::V1::Namespace>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/gke_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeHub::V1::ListScopeNamespacesRequest.new - # - # # Call the list_scope_namespaces method. - # result = client.list_scope_namespaces 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::GkeHub::V1::Namespace. - # p item - # end - # - def list_scope_namespaces request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::ListScopeNamespacesRequest - - # 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_scope_namespaces.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::GkeHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_scope_namespaces.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_scope_namespaces.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gke_hub_stub.call_rpc :list_scope_namespaces, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @gke_hub_stub, :list_scope_namespaces, 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 - - ## - # Returns the details of a Scope RBACRoleBinding. - # - # @overload get_scope_rbac_role_binding(request, options = nil) - # Pass arguments to `get_scope_rbac_role_binding` via a request object, either of type - # {::Google::Cloud::GkeHub::V1::GetScopeRBACRoleBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeHub::V1::GetScopeRBACRoleBindingRequest, ::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_scope_rbac_role_binding(name: nil) - # Pass arguments to `get_scope_rbac_role_binding` 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 RBACRoleBinding resource name in the format - # `projects/*/locations/*/scopes/*/rbacrolebindings/*`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::GkeHub::V1::RBACRoleBinding] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::GkeHub::V1::RBACRoleBinding] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/gke_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeHub::V1::GetScopeRBACRoleBindingRequest.new - # - # # Call the get_scope_rbac_role_binding method. - # result = client.get_scope_rbac_role_binding request - # - # # The returned object is of type Google::Cloud::GkeHub::V1::RBACRoleBinding. - # p result - # - def get_scope_rbac_role_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::GetScopeRBACRoleBindingRequest - - # 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_scope_rbac_role_binding.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::GkeHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_scope_rbac_role_binding.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_scope_rbac_role_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gke_hub_stub.call_rpc :get_scope_rbac_role_binding, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a Scope RBACRoleBinding. - # - # @overload create_scope_rbac_role_binding(request, options = nil) - # Pass arguments to `create_scope_rbac_role_binding` via a request object, either of type - # {::Google::Cloud::GkeHub::V1::CreateScopeRBACRoleBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeHub::V1::CreateScopeRBACRoleBindingRequest, ::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_scope_rbac_role_binding(parent: nil, rbacrolebinding_id: nil, rbacrolebinding: nil) - # Pass arguments to `create_scope_rbac_role_binding` 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 (project and location) where the RBACRoleBinding will - # be created. Specified in the format `projects/*/locations/*/scopes/*`. - # @param rbacrolebinding_id [::String] - # Required. Client chosen ID for the RBACRoleBinding. `rbacrolebinding_id` - # must be a valid RFC 1123 compliant DNS label: - # - # 1. At most 63 characters in length - # 2. It must consist of lower case alphanumeric characters or `-` - # 3. It must start and end with an alphanumeric character - # - # Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, - # with a maximum length of 63 characters. - # @param rbacrolebinding [::Google::Cloud::GkeHub::V1::RBACRoleBinding, ::Hash] - # Required. The rbacrolebindings to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/gke_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeHub::V1::CreateScopeRBACRoleBindingRequest.new - # - # # Call the create_scope_rbac_role_binding method. - # result = client.create_scope_rbac_role_binding request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_scope_rbac_role_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::CreateScopeRBACRoleBindingRequest - - # 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_scope_rbac_role_binding.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::GkeHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_scope_rbac_role_binding.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_scope_rbac_role_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gke_hub_stub.call_rpc :create_scope_rbac_role_binding, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a Scope RBACRoleBinding. - # - # @overload update_scope_rbac_role_binding(request, options = nil) - # Pass arguments to `update_scope_rbac_role_binding` via a request object, either of type - # {::Google::Cloud::GkeHub::V1::UpdateScopeRBACRoleBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeHub::V1::UpdateScopeRBACRoleBindingRequest, ::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_scope_rbac_role_binding(rbacrolebinding: nil, update_mask: nil) - # Pass arguments to `update_scope_rbac_role_binding` 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 rbacrolebinding [::Google::Cloud::GkeHub::V1::RBACRoleBinding, ::Hash] - # Required. A rbacrolebinding with fields updated. The 'name' field in this - # rbacrolebinding is used to identify the resource to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The fields to be updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/gke_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeHub::V1::UpdateScopeRBACRoleBindingRequest.new - # - # # Call the update_scope_rbac_role_binding method. - # result = client.update_scope_rbac_role_binding request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_scope_rbac_role_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::UpdateScopeRBACRoleBindingRequest - - # 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_scope_rbac_role_binding.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::GkeHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.rbacrolebinding&.name - header_params["rbacrolebinding.name"] = request.rbacrolebinding.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_scope_rbac_role_binding.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_scope_rbac_role_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gke_hub_stub.call_rpc :update_scope_rbac_role_binding, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a Scope RBACRoleBinding. - # - # @overload delete_scope_rbac_role_binding(request, options = nil) - # Pass arguments to `delete_scope_rbac_role_binding` via a request object, either of type - # {::Google::Cloud::GkeHub::V1::DeleteScopeRBACRoleBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeHub::V1::DeleteScopeRBACRoleBindingRequest, ::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_scope_rbac_role_binding(name: nil) - # Pass arguments to `delete_scope_rbac_role_binding` 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 RBACRoleBinding resource name in the format - # `projects/*/locations/*/scopes/*/rbacrolebindings/*`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/gke_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeHub::V1::DeleteScopeRBACRoleBindingRequest.new - # - # # Call the delete_scope_rbac_role_binding method. - # result = client.delete_scope_rbac_role_binding request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_scope_rbac_role_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::DeleteScopeRBACRoleBindingRequest - - # 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_scope_rbac_role_binding.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::GkeHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_scope_rbac_role_binding.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_scope_rbac_role_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gke_hub_stub.call_rpc :delete_scope_rbac_role_binding, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all Scope RBACRoleBindings. - # - # @overload list_scope_rbac_role_bindings(request, options = nil) - # Pass arguments to `list_scope_rbac_role_bindings` via a request object, either of type - # {::Google::Cloud::GkeHub::V1::ListScopeRBACRoleBindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeHub::V1::ListScopeRBACRoleBindingsRequest, ::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_scope_rbac_role_bindings(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_scope_rbac_role_bindings` 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 (project and location) where the Features will be - # listed. Specified in the format `projects/*/locations/*/scopes/*`. - # @param page_size [::Integer] - # Optional. When requesting a 'page' of resources, `page_size` specifies - # number of resources to return. If unspecified or set to 0, all resources - # will be returned. - # @param page_token [::String] - # Optional. Token returned by previous call to `ListScopeRBACRoleBindings` - # which specifies the position in the list from where to continue listing the - # resources. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GkeHub::V1::RBACRoleBinding>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::GkeHub::V1::RBACRoleBinding>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/gke_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeHub::V1::ListScopeRBACRoleBindingsRequest.new - # - # # Call the list_scope_rbac_role_bindings method. - # result = client.list_scope_rbac_role_bindings 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::GkeHub::V1::RBACRoleBinding. - # p item - # end - # - def list_scope_rbac_role_bindings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::ListScopeRBACRoleBindingsRequest - - # 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_scope_rbac_role_bindings.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::GkeHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_scope_rbac_role_bindings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_scope_rbac_role_bindings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gke_hub_stub.call_rpc :list_scope_rbac_role_bindings, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @gke_hub_stub, :list_scope_rbac_role_bindings, 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 - - ## - # Returns the details of a Scope. - # - # @overload get_scope(request, options = nil) - # Pass arguments to `get_scope` via a request object, either of type - # {::Google::Cloud::GkeHub::V1::GetScopeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeHub::V1::GetScopeRequest, ::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_scope(name: nil) - # Pass arguments to `get_scope` 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 Scope resource name in the format - # `projects/*/locations/*/scopes/*`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::GkeHub::V1::Scope] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::GkeHub::V1::Scope] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/gke_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeHub::V1::GetScopeRequest.new - # - # # Call the get_scope method. - # result = client.get_scope request - # - # # The returned object is of type Google::Cloud::GkeHub::V1::Scope. - # p result - # - def get_scope request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::GetScopeRequest - - # 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_scope.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::GkeHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_scope.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_scope.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gke_hub_stub.call_rpc :get_scope, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a Scope. - # - # @overload create_scope(request, options = nil) - # Pass arguments to `create_scope` via a request object, either of type - # {::Google::Cloud::GkeHub::V1::CreateScopeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeHub::V1::CreateScopeRequest, ::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_scope(parent: nil, scope_id: nil, scope: nil) - # Pass arguments to `create_scope` 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 (project and location) where the Scope will be - # created. Specified in the format `projects/*/locations/*`. - # @param scope_id [::String] - # Required. Client chosen ID for the Scope. `scope_id` must be a - # ???? - # @param scope [::Google::Cloud::GkeHub::V1::Scope, ::Hash] - # Required. The Scope to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/gke_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeHub::V1::CreateScopeRequest.new - # - # # Call the create_scope method. - # result = client.create_scope request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_scope request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::CreateScopeRequest - - # 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_scope.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::GkeHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_scope.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_scope.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gke_hub_stub.call_rpc :create_scope, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a scopes. - # - # @overload update_scope(request, options = nil) - # Pass arguments to `update_scope` via a request object, either of type - # {::Google::Cloud::GkeHub::V1::UpdateScopeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeHub::V1::UpdateScopeRequest, ::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_scope(scope: nil, update_mask: nil) - # Pass arguments to `update_scope` 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 scope [::Google::Cloud::GkeHub::V1::Scope, ::Hash] - # Required. A Scope with fields updated. The 'name' field in this - # namespace is used to identify the resource to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The fields to be updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/gke_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeHub::V1::UpdateScopeRequest.new - # - # # Call the update_scope method. - # result = client.update_scope request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_scope request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::UpdateScopeRequest - - # 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_scope.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::GkeHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.scope&.name - header_params["scope.name"] = request.scope.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_scope.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_scope.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gke_hub_stub.call_rpc :update_scope, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a Scope. - # - # @overload delete_scope(request, options = nil) - # Pass arguments to `delete_scope` via a request object, either of type - # {::Google::Cloud::GkeHub::V1::DeleteScopeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeHub::V1::DeleteScopeRequest, ::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_scope(name: nil) - # Pass arguments to `delete_scope` 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 Scope resource name in the format - # `projects/*/locations/*/scopes/*`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/gke_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeHub::V1::DeleteScopeRequest.new - # - # # Call the delete_scope method. - # result = client.delete_scope request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_scope request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::DeleteScopeRequest - - # 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_scope.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::GkeHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_scope.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_scope.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gke_hub_stub.call_rpc :delete_scope, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists Scopes. - # - # @overload list_scopes(request, options = nil) - # Pass arguments to `list_scopes` via a request object, either of type - # {::Google::Cloud::GkeHub::V1::ListScopesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeHub::V1::ListScopesRequest, ::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_scopes(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_scopes` 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 (project and location) where the Scope will be listed. - # Specified in the format `projects/*/locations/*`. - # @param page_size [::Integer] - # Optional. When requesting a 'page' of resources, `page_size` specifies - # number of resources to return. If unspecified or set to 0, all resources - # will be returned. - # @param page_token [::String] - # Optional. Token returned by previous call to `ListScopes` which - # specifies the position in the list from where to continue listing the - # resources. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GkeHub::V1::Scope>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::GkeHub::V1::Scope>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/gke_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeHub::V1::ListScopesRequest.new - # - # # Call the list_scopes method. - # result = client.list_scopes 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::GkeHub::V1::Scope. - # p item - # end - # - def list_scopes request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::ListScopesRequest - - # 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_scopes.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::GkeHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_scopes.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_scopes.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gke_hub_stub.call_rpc :list_scopes, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @gke_hub_stub, :list_scopes, 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 - - ## - # Lists permitted Scopes. - # - # @overload list_permitted_scopes(request, options = nil) - # Pass arguments to `list_permitted_scopes` via a request object, either of type - # {::Google::Cloud::GkeHub::V1::ListPermittedScopesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeHub::V1::ListPermittedScopesRequest, ::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_permitted_scopes(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_permitted_scopes` 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 (project and location) where the Scope will be listed. - # Specified in the format `projects/*/locations/*`. - # @param page_size [::Integer] - # Optional. When requesting a 'page' of resources, `page_size` specifies - # number of resources to return. If unspecified or set to 0, all resources - # will be returned. - # @param page_token [::String] - # Optional. Token returned by previous call to `ListPermittedScopes` which - # specifies the position in the list from where to continue listing the - # resources. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GkeHub::V1::Scope>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::GkeHub::V1::Scope>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/gke_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeHub::V1::ListPermittedScopesRequest.new - # - # # Call the list_permitted_scopes method. - # result = client.list_permitted_scopes 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::GkeHub::V1::Scope. - # p item - # end - # - def list_permitted_scopes request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::ListPermittedScopesRequest - - # 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_permitted_scopes.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::GkeHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_permitted_scopes.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_permitted_scopes.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gke_hub_stub.call_rpc :list_permitted_scopes, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @gke_hub_stub, :list_permitted_scopes, 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 - - ## - # Returns the details of a MembershipBinding. - # - # @overload get_membership_binding(request, options = nil) - # Pass arguments to `get_membership_binding` via a request object, either of type - # {::Google::Cloud::GkeHub::V1::GetMembershipBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeHub::V1::GetMembershipBindingRequest, ::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_membership_binding(name: nil) - # Pass arguments to `get_membership_binding` 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 MembershipBinding resource name in the format - # `projects/*/locations/*/memberships/*/bindings/*`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::GkeHub::V1::MembershipBinding] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::GkeHub::V1::MembershipBinding] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/gke_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeHub::V1::GetMembershipBindingRequest.new - # - # # Call the get_membership_binding method. - # result = client.get_membership_binding request - # - # # The returned object is of type Google::Cloud::GkeHub::V1::MembershipBinding. - # p result - # - def get_membership_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::GetMembershipBindingRequest - - # 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_membership_binding.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::GkeHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_membership_binding.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_membership_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gke_hub_stub.call_rpc :get_membership_binding, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a MembershipBinding. - # - # @overload create_membership_binding(request, options = nil) - # Pass arguments to `create_membership_binding` via a request object, either of type - # {::Google::Cloud::GkeHub::V1::CreateMembershipBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeHub::V1::CreateMembershipBindingRequest, ::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_membership_binding(parent: nil, membership_binding: nil, membership_binding_id: nil) - # Pass arguments to `create_membership_binding` 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 (project and location) where the MembershipBinding - # will be created. Specified in the format - # `projects/*/locations/*/memberships/*`. - # @param membership_binding [::Google::Cloud::GkeHub::V1::MembershipBinding, ::Hash] - # Required. The MembershipBinding to create. - # @param membership_binding_id [::String] - # Required. The ID to use for the MembershipBinding. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/gke_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeHub::V1::CreateMembershipBindingRequest.new - # - # # Call the create_membership_binding method. - # result = client.create_membership_binding request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_membership_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::CreateMembershipBindingRequest - - # 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_membership_binding.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::GkeHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_membership_binding.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_membership_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gke_hub_stub.call_rpc :create_membership_binding, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a MembershipBinding. - # - # @overload update_membership_binding(request, options = nil) - # Pass arguments to `update_membership_binding` via a request object, either of type - # {::Google::Cloud::GkeHub::V1::UpdateMembershipBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeHub::V1::UpdateMembershipBindingRequest, ::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_membership_binding(membership_binding: nil, update_mask: nil) - # Pass arguments to `update_membership_binding` 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 membership_binding [::Google::Cloud::GkeHub::V1::MembershipBinding, ::Hash] - # Required. The MembershipBinding object with fields updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The fields to be updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/gke_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeHub::V1::UpdateMembershipBindingRequest.new - # - # # Call the update_membership_binding method. - # result = client.update_membership_binding request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_membership_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::UpdateMembershipBindingRequest - - # 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_membership_binding.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::GkeHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.membership_binding&.name - header_params["membership_binding.name"] = request.membership_binding.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_membership_binding.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_membership_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gke_hub_stub.call_rpc :update_membership_binding, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a MembershipBinding. - # - # @overload delete_membership_binding(request, options = nil) - # Pass arguments to `delete_membership_binding` via a request object, either of type - # {::Google::Cloud::GkeHub::V1::DeleteMembershipBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeHub::V1::DeleteMembershipBindingRequest, ::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_membership_binding(name: nil) - # Pass arguments to `delete_membership_binding` 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 MembershipBinding resource name in the format - # `projects/*/locations/*/memberships/*/bindings/*`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/gke_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeHub::V1::DeleteMembershipBindingRequest.new - # - # # Call the delete_membership_binding method. - # result = client.delete_membership_binding request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_membership_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::DeleteMembershipBindingRequest - - # 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_membership_binding.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::GkeHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_membership_binding.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_membership_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gke_hub_stub.call_rpc :delete_membership_binding, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists MembershipBindings. - # - # @overload list_membership_bindings(request, options = nil) - # Pass arguments to `list_membership_bindings` via a request object, either of type - # {::Google::Cloud::GkeHub::V1::ListMembershipBindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeHub::V1::ListMembershipBindingsRequest, ::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_membership_bindings(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_membership_bindings` 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 Membership for which the MembershipBindings will be - # listed. Specified in the format `projects/*/locations/*/memberships/*`. - # @param page_size [::Integer] - # Optional. When requesting a 'page' of resources, `page_size` specifies - # number of resources to return. If unspecified or set to 0, all resources - # will be returned. - # @param page_token [::String] - # Optional. Token returned by previous call to `ListMembershipBindings` which - # specifies the position in the list from where to continue listing the - # resources. - # @param filter [::String] - # Optional. Lists MembershipBindings that match the filter expression, - # following the syntax outlined in https://google.aip.dev/160. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GkeHub::V1::MembershipBinding>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::GkeHub::V1::MembershipBinding>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/gke_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeHub::V1::ListMembershipBindingsRequest.new - # - # # Call the list_membership_bindings method. - # result = client.list_membership_bindings 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::GkeHub::V1::MembershipBinding. - # p item - # end - # - def list_membership_bindings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::ListMembershipBindingsRequest - - # 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_membership_bindings.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::GkeHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_membership_bindings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_membership_bindings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gke_hub_stub.call_rpc :list_membership_bindings, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @gke_hub_stub, :list_membership_bindings, 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 - - ## - # Returns the details of a Membership RBACRoleBinding. - # - # @overload get_membership_rbac_role_binding(request, options = nil) - # Pass arguments to `get_membership_rbac_role_binding` via a request object, either of type - # {::Google::Cloud::GkeHub::V1::GetMembershipRBACRoleBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeHub::V1::GetMembershipRBACRoleBindingRequest, ::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_membership_rbac_role_binding(name: nil) - # Pass arguments to `get_membership_rbac_role_binding` 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 RBACRoleBinding resource name in the format - # `projects/*/locations/*/memberships/*/rbacrolebindings/*`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::GkeHub::V1::RBACRoleBinding] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::GkeHub::V1::RBACRoleBinding] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/gke_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeHub::V1::GetMembershipRBACRoleBindingRequest.new - # - # # Call the get_membership_rbac_role_binding method. - # result = client.get_membership_rbac_role_binding request - # - # # The returned object is of type Google::Cloud::GkeHub::V1::RBACRoleBinding. - # p result - # - def get_membership_rbac_role_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::GetMembershipRBACRoleBindingRequest - - # 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_membership_rbac_role_binding.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::GkeHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_membership_rbac_role_binding.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_membership_rbac_role_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gke_hub_stub.call_rpc :get_membership_rbac_role_binding, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a Membership RBACRoleBinding. - # - # @overload create_membership_rbac_role_binding(request, options = nil) - # Pass arguments to `create_membership_rbac_role_binding` via a request object, either of type - # {::Google::Cloud::GkeHub::V1::CreateMembershipRBACRoleBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeHub::V1::CreateMembershipRBACRoleBindingRequest, ::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_membership_rbac_role_binding(parent: nil, rbacrolebinding_id: nil, rbacrolebinding: nil) - # Pass arguments to `create_membership_rbac_role_binding` 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 (project and location) where the RBACRoleBinding will - # be created. Specified in the format `projects/*/locations/*/memberships/*`. - # @param rbacrolebinding_id [::String] - # Required. Client chosen ID for the RBACRoleBinding. `rbacrolebinding_id` - # must be a valid RFC 1123 compliant DNS label: - # - # 1. At most 63 characters in length - # 2. It must consist of lower case alphanumeric characters or `-` - # 3. It must start and end with an alphanumeric character - # - # Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, - # with a maximum length of 63 characters. - # @param rbacrolebinding [::Google::Cloud::GkeHub::V1::RBACRoleBinding, ::Hash] - # Required. The rbacrolebindings to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/gke_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeHub::V1::CreateMembershipRBACRoleBindingRequest.new - # - # # Call the create_membership_rbac_role_binding method. - # result = client.create_membership_rbac_role_binding request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_membership_rbac_role_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::CreateMembershipRBACRoleBindingRequest - - # 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_membership_rbac_role_binding.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::GkeHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_membership_rbac_role_binding.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_membership_rbac_role_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gke_hub_stub.call_rpc :create_membership_rbac_role_binding, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a Membership RBACRoleBinding. - # - # @overload update_membership_rbac_role_binding(request, options = nil) - # Pass arguments to `update_membership_rbac_role_binding` via a request object, either of type - # {::Google::Cloud::GkeHub::V1::UpdateMembershipRBACRoleBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeHub::V1::UpdateMembershipRBACRoleBindingRequest, ::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_membership_rbac_role_binding(rbacrolebinding: nil, update_mask: nil) - # Pass arguments to `update_membership_rbac_role_binding` 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 rbacrolebinding [::Google::Cloud::GkeHub::V1::RBACRoleBinding, ::Hash] - # Required. A rbacrolebinding with fields updated. The 'name' field in this - # rbacrolebinding is used to identify the resource to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The fields to be updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/gke_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeHub::V1::UpdateMembershipRBACRoleBindingRequest.new - # - # # Call the update_membership_rbac_role_binding method. - # result = client.update_membership_rbac_role_binding request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_membership_rbac_role_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::UpdateMembershipRBACRoleBindingRequest - - # 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_membership_rbac_role_binding.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::GkeHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.rbacrolebinding&.name - header_params["rbacrolebinding.name"] = request.rbacrolebinding.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_membership_rbac_role_binding.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_membership_rbac_role_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gke_hub_stub.call_rpc :update_membership_rbac_role_binding, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a Membership RBACRoleBinding. - # - # @overload delete_membership_rbac_role_binding(request, options = nil) - # Pass arguments to `delete_membership_rbac_role_binding` via a request object, either of type - # {::Google::Cloud::GkeHub::V1::DeleteMembershipRBACRoleBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeHub::V1::DeleteMembershipRBACRoleBindingRequest, ::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_membership_rbac_role_binding(name: nil) - # Pass arguments to `delete_membership_rbac_role_binding` 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 RBACRoleBinding resource name in the format - # `projects/*/locations/*/memberships/*/rbacrolebindings/*`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/gke_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeHub::V1::DeleteMembershipRBACRoleBindingRequest.new - # - # # Call the delete_membership_rbac_role_binding method. - # result = client.delete_membership_rbac_role_binding request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_membership_rbac_role_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::DeleteMembershipRBACRoleBindingRequest - - # 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_membership_rbac_role_binding.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::GkeHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_membership_rbac_role_binding.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_membership_rbac_role_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gke_hub_stub.call_rpc :delete_membership_rbac_role_binding, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all Membership RBACRoleBindings. - # - # @overload list_membership_rbac_role_bindings(request, options = nil) - # Pass arguments to `list_membership_rbac_role_bindings` via a request object, either of type - # {::Google::Cloud::GkeHub::V1::ListMembershipRBACRoleBindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeHub::V1::ListMembershipRBACRoleBindingsRequest, ::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_membership_rbac_role_bindings(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_membership_rbac_role_bindings` 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 (project and location) where the Features will be - # listed. Specified in the format `projects/*/locations/*/memberships/*`. - # @param page_size [::Integer] - # Optional. When requesting a 'page' of resources, `page_size` specifies - # number of resources to return. If unspecified or set to 0, all resources - # will be returned. - # @param page_token [::String] - # Optional. Token returned by previous call to - # `ListMembershipRBACRoleBindings` which specifies the position in the list - # from where to continue listing the resources. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GkeHub::V1::RBACRoleBinding>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::GkeHub::V1::RBACRoleBinding>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/gke_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeHub::V1::ListMembershipRBACRoleBindingsRequest.new - # - # # Call the list_membership_rbac_role_bindings method. - # result = client.list_membership_rbac_role_bindings 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::GkeHub::V1::RBACRoleBinding. - # p item - # end - # - def list_membership_rbac_role_bindings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::ListMembershipRBACRoleBindingsRequest - - # 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_membership_rbac_role_bindings.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::GkeHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_membership_rbac_role_bindings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_membership_rbac_role_bindings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gke_hub_stub.call_rpc :list_membership_rbac_role_bindings, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @gke_hub_stub, :list_membership_rbac_role_bindings, 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 - - ## - # Generates a YAML of the RBAC policies for the specified - # RoleBinding and its associated impersonation resources. - # - # @overload generate_membership_rbac_role_binding_yaml(request, options = nil) - # Pass arguments to `generate_membership_rbac_role_binding_yaml` via a request object, either of type - # {::Google::Cloud::GkeHub::V1::GenerateMembershipRBACRoleBindingYAMLRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeHub::V1::GenerateMembershipRBACRoleBindingYAMLRequest, ::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 generate_membership_rbac_role_binding_yaml(parent: nil, rbacrolebinding_id: nil, rbacrolebinding: nil) - # Pass arguments to `generate_membership_rbac_role_binding_yaml` 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 (project and location) where the RBACRoleBinding will - # be created. Specified in the format `projects/*/locations/*/memberships/*`. - # @param rbacrolebinding_id [::String] - # Required. Client chosen ID for the RBACRoleBinding. `rbacrolebinding_id` - # must be a valid RFC 1123 compliant DNS label: - # - # 1. At most 63 characters in length - # 2. It must consist of lower case alphanumeric characters or `-` - # 3. It must start and end with an alphanumeric character - # - # Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, - # with a maximum length of 63 characters. - # @param rbacrolebinding [::Google::Cloud::GkeHub::V1::RBACRoleBinding, ::Hash] - # Required. The rbacrolebindings to generate the YAML for. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::GkeHub::V1::GenerateMembershipRBACRoleBindingYAMLResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::GkeHub::V1::GenerateMembershipRBACRoleBindingYAMLResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/gke_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeHub::V1::GkeHub::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeHub::V1::GenerateMembershipRBACRoleBindingYAMLRequest.new - # - # # Call the generate_membership_rbac_role_binding_yaml method. - # result = client.generate_membership_rbac_role_binding_yaml request - # - # # The returned object is of type Google::Cloud::GkeHub::V1::GenerateMembershipRBACRoleBindingYAMLResponse. - # p result - # - def generate_membership_rbac_role_binding_yaml request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::GenerateMembershipRBACRoleBindingYAMLRequest - - # 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.generate_membership_rbac_role_binding_yaml.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::GkeHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.generate_membership_rbac_role_binding_yaml.timeout, - metadata: metadata, - retry_policy: @config.rpcs.generate_membership_rbac_role_binding_yaml.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gke_hub_stub.call_rpc :generate_membership_rbac_role_binding_yaml, 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 GkeHub API. - # - # This class represents the configuration for GkeHub, - # 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::GkeHub::V1::GkeHub::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_memberships to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::GkeHub::V1::GkeHub::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_memberships.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_memberships.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::GkeHub::V1::GkeHub::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. - # * `: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 = "gkehub.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 GkeHub 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. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_memberships` - # @return [::Gapic::Config::Method] - # - attr_reader :list_memberships - ## - # RPC-specific configuration for `list_bound_memberships` - # @return [::Gapic::Config::Method] - # - attr_reader :list_bound_memberships - ## - # RPC-specific configuration for `list_features` - # @return [::Gapic::Config::Method] - # - attr_reader :list_features - ## - # RPC-specific configuration for `get_membership` - # @return [::Gapic::Config::Method] - # - attr_reader :get_membership - ## - # RPC-specific configuration for `get_feature` - # @return [::Gapic::Config::Method] - # - attr_reader :get_feature - ## - # RPC-specific configuration for `create_membership` - # @return [::Gapic::Config::Method] - # - attr_reader :create_membership - ## - # RPC-specific configuration for `create_feature` - # @return [::Gapic::Config::Method] - # - attr_reader :create_feature - ## - # RPC-specific configuration for `delete_membership` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_membership - ## - # RPC-specific configuration for `delete_feature` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_feature - ## - # RPC-specific configuration for `update_membership` - # @return [::Gapic::Config::Method] - # - attr_reader :update_membership - ## - # RPC-specific configuration for `update_feature` - # @return [::Gapic::Config::Method] - # - attr_reader :update_feature - ## - # RPC-specific configuration for `generate_connect_manifest` - # @return [::Gapic::Config::Method] - # - attr_reader :generate_connect_manifest - ## - # RPC-specific configuration for `create_fleet` - # @return [::Gapic::Config::Method] - # - attr_reader :create_fleet - ## - # RPC-specific configuration for `get_fleet` - # @return [::Gapic::Config::Method] - # - attr_reader :get_fleet - ## - # RPC-specific configuration for `update_fleet` - # @return [::Gapic::Config::Method] - # - attr_reader :update_fleet - ## - # RPC-specific configuration for `delete_fleet` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_fleet - ## - # RPC-specific configuration for `list_fleets` - # @return [::Gapic::Config::Method] - # - attr_reader :list_fleets - ## - # RPC-specific configuration for `get_scope_namespace` - # @return [::Gapic::Config::Method] - # - attr_reader :get_scope_namespace - ## - # RPC-specific configuration for `create_scope_namespace` - # @return [::Gapic::Config::Method] - # - attr_reader :create_scope_namespace - ## - # RPC-specific configuration for `update_scope_namespace` - # @return [::Gapic::Config::Method] - # - attr_reader :update_scope_namespace - ## - # RPC-specific configuration for `delete_scope_namespace` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_scope_namespace - ## - # RPC-specific configuration for `list_scope_namespaces` - # @return [::Gapic::Config::Method] - # - attr_reader :list_scope_namespaces - ## - # RPC-specific configuration for `get_scope_rbac_role_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :get_scope_rbac_role_binding - ## - # RPC-specific configuration for `create_scope_rbac_role_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :create_scope_rbac_role_binding - ## - # RPC-specific configuration for `update_scope_rbac_role_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :update_scope_rbac_role_binding - ## - # RPC-specific configuration for `delete_scope_rbac_role_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_scope_rbac_role_binding - ## - # RPC-specific configuration for `list_scope_rbac_role_bindings` - # @return [::Gapic::Config::Method] - # - attr_reader :list_scope_rbac_role_bindings - ## - # RPC-specific configuration for `get_scope` - # @return [::Gapic::Config::Method] - # - attr_reader :get_scope - ## - # RPC-specific configuration for `create_scope` - # @return [::Gapic::Config::Method] - # - attr_reader :create_scope - ## - # RPC-specific configuration for `update_scope` - # @return [::Gapic::Config::Method] - # - attr_reader :update_scope - ## - # RPC-specific configuration for `delete_scope` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_scope - ## - # RPC-specific configuration for `list_scopes` - # @return [::Gapic::Config::Method] - # - attr_reader :list_scopes - ## - # RPC-specific configuration for `list_permitted_scopes` - # @return [::Gapic::Config::Method] - # - attr_reader :list_permitted_scopes - ## - # RPC-specific configuration for `get_membership_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :get_membership_binding - ## - # RPC-specific configuration for `create_membership_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :create_membership_binding - ## - # RPC-specific configuration for `update_membership_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :update_membership_binding - ## - # RPC-specific configuration for `delete_membership_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_membership_binding - ## - # RPC-specific configuration for `list_membership_bindings` - # @return [::Gapic::Config::Method] - # - attr_reader :list_membership_bindings - ## - # RPC-specific configuration for `get_membership_rbac_role_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :get_membership_rbac_role_binding - ## - # RPC-specific configuration for `create_membership_rbac_role_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :create_membership_rbac_role_binding - ## - # RPC-specific configuration for `update_membership_rbac_role_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :update_membership_rbac_role_binding - ## - # RPC-specific configuration for `delete_membership_rbac_role_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_membership_rbac_role_binding - ## - # RPC-specific configuration for `list_membership_rbac_role_bindings` - # @return [::Gapic::Config::Method] - # - attr_reader :list_membership_rbac_role_bindings - ## - # RPC-specific configuration for `generate_membership_rbac_role_binding_yaml` - # @return [::Gapic::Config::Method] - # - attr_reader :generate_membership_rbac_role_binding_yaml - - # @private - def initialize parent_rpcs = nil - list_memberships_config = parent_rpcs.list_memberships if parent_rpcs.respond_to? :list_memberships - @list_memberships = ::Gapic::Config::Method.new list_memberships_config - list_bound_memberships_config = parent_rpcs.list_bound_memberships if parent_rpcs.respond_to? :list_bound_memberships - @list_bound_memberships = ::Gapic::Config::Method.new list_bound_memberships_config - list_features_config = parent_rpcs.list_features if parent_rpcs.respond_to? :list_features - @list_features = ::Gapic::Config::Method.new list_features_config - get_membership_config = parent_rpcs.get_membership if parent_rpcs.respond_to? :get_membership - @get_membership = ::Gapic::Config::Method.new get_membership_config - get_feature_config = parent_rpcs.get_feature if parent_rpcs.respond_to? :get_feature - @get_feature = ::Gapic::Config::Method.new get_feature_config - create_membership_config = parent_rpcs.create_membership if parent_rpcs.respond_to? :create_membership - @create_membership = ::Gapic::Config::Method.new create_membership_config - create_feature_config = parent_rpcs.create_feature if parent_rpcs.respond_to? :create_feature - @create_feature = ::Gapic::Config::Method.new create_feature_config - delete_membership_config = parent_rpcs.delete_membership if parent_rpcs.respond_to? :delete_membership - @delete_membership = ::Gapic::Config::Method.new delete_membership_config - delete_feature_config = parent_rpcs.delete_feature if parent_rpcs.respond_to? :delete_feature - @delete_feature = ::Gapic::Config::Method.new delete_feature_config - update_membership_config = parent_rpcs.update_membership if parent_rpcs.respond_to? :update_membership - @update_membership = ::Gapic::Config::Method.new update_membership_config - update_feature_config = parent_rpcs.update_feature if parent_rpcs.respond_to? :update_feature - @update_feature = ::Gapic::Config::Method.new update_feature_config - generate_connect_manifest_config = parent_rpcs.generate_connect_manifest if parent_rpcs.respond_to? :generate_connect_manifest - @generate_connect_manifest = ::Gapic::Config::Method.new generate_connect_manifest_config - create_fleet_config = parent_rpcs.create_fleet if parent_rpcs.respond_to? :create_fleet - @create_fleet = ::Gapic::Config::Method.new create_fleet_config - get_fleet_config = parent_rpcs.get_fleet if parent_rpcs.respond_to? :get_fleet - @get_fleet = ::Gapic::Config::Method.new get_fleet_config - update_fleet_config = parent_rpcs.update_fleet if parent_rpcs.respond_to? :update_fleet - @update_fleet = ::Gapic::Config::Method.new update_fleet_config - delete_fleet_config = parent_rpcs.delete_fleet if parent_rpcs.respond_to? :delete_fleet - @delete_fleet = ::Gapic::Config::Method.new delete_fleet_config - list_fleets_config = parent_rpcs.list_fleets if parent_rpcs.respond_to? :list_fleets - @list_fleets = ::Gapic::Config::Method.new list_fleets_config - get_scope_namespace_config = parent_rpcs.get_scope_namespace if parent_rpcs.respond_to? :get_scope_namespace - @get_scope_namespace = ::Gapic::Config::Method.new get_scope_namespace_config - create_scope_namespace_config = parent_rpcs.create_scope_namespace if parent_rpcs.respond_to? :create_scope_namespace - @create_scope_namespace = ::Gapic::Config::Method.new create_scope_namespace_config - update_scope_namespace_config = parent_rpcs.update_scope_namespace if parent_rpcs.respond_to? :update_scope_namespace - @update_scope_namespace = ::Gapic::Config::Method.new update_scope_namespace_config - delete_scope_namespace_config = parent_rpcs.delete_scope_namespace if parent_rpcs.respond_to? :delete_scope_namespace - @delete_scope_namespace = ::Gapic::Config::Method.new delete_scope_namespace_config - list_scope_namespaces_config = parent_rpcs.list_scope_namespaces if parent_rpcs.respond_to? :list_scope_namespaces - @list_scope_namespaces = ::Gapic::Config::Method.new list_scope_namespaces_config - get_scope_rbac_role_binding_config = parent_rpcs.get_scope_rbac_role_binding if parent_rpcs.respond_to? :get_scope_rbac_role_binding - @get_scope_rbac_role_binding = ::Gapic::Config::Method.new get_scope_rbac_role_binding_config - create_scope_rbac_role_binding_config = parent_rpcs.create_scope_rbac_role_binding if parent_rpcs.respond_to? :create_scope_rbac_role_binding - @create_scope_rbac_role_binding = ::Gapic::Config::Method.new create_scope_rbac_role_binding_config - update_scope_rbac_role_binding_config = parent_rpcs.update_scope_rbac_role_binding if parent_rpcs.respond_to? :update_scope_rbac_role_binding - @update_scope_rbac_role_binding = ::Gapic::Config::Method.new update_scope_rbac_role_binding_config - delete_scope_rbac_role_binding_config = parent_rpcs.delete_scope_rbac_role_binding if parent_rpcs.respond_to? :delete_scope_rbac_role_binding - @delete_scope_rbac_role_binding = ::Gapic::Config::Method.new delete_scope_rbac_role_binding_config - list_scope_rbac_role_bindings_config = parent_rpcs.list_scope_rbac_role_bindings if parent_rpcs.respond_to? :list_scope_rbac_role_bindings - @list_scope_rbac_role_bindings = ::Gapic::Config::Method.new list_scope_rbac_role_bindings_config - get_scope_config = parent_rpcs.get_scope if parent_rpcs.respond_to? :get_scope - @get_scope = ::Gapic::Config::Method.new get_scope_config - create_scope_config = parent_rpcs.create_scope if parent_rpcs.respond_to? :create_scope - @create_scope = ::Gapic::Config::Method.new create_scope_config - update_scope_config = parent_rpcs.update_scope if parent_rpcs.respond_to? :update_scope - @update_scope = ::Gapic::Config::Method.new update_scope_config - delete_scope_config = parent_rpcs.delete_scope if parent_rpcs.respond_to? :delete_scope - @delete_scope = ::Gapic::Config::Method.new delete_scope_config - list_scopes_config = parent_rpcs.list_scopes if parent_rpcs.respond_to? :list_scopes - @list_scopes = ::Gapic::Config::Method.new list_scopes_config - list_permitted_scopes_config = parent_rpcs.list_permitted_scopes if parent_rpcs.respond_to? :list_permitted_scopes - @list_permitted_scopes = ::Gapic::Config::Method.new list_permitted_scopes_config - get_membership_binding_config = parent_rpcs.get_membership_binding if parent_rpcs.respond_to? :get_membership_binding - @get_membership_binding = ::Gapic::Config::Method.new get_membership_binding_config - create_membership_binding_config = parent_rpcs.create_membership_binding if parent_rpcs.respond_to? :create_membership_binding - @create_membership_binding = ::Gapic::Config::Method.new create_membership_binding_config - update_membership_binding_config = parent_rpcs.update_membership_binding if parent_rpcs.respond_to? :update_membership_binding - @update_membership_binding = ::Gapic::Config::Method.new update_membership_binding_config - delete_membership_binding_config = parent_rpcs.delete_membership_binding if parent_rpcs.respond_to? :delete_membership_binding - @delete_membership_binding = ::Gapic::Config::Method.new delete_membership_binding_config - list_membership_bindings_config = parent_rpcs.list_membership_bindings if parent_rpcs.respond_to? :list_membership_bindings - @list_membership_bindings = ::Gapic::Config::Method.new list_membership_bindings_config - get_membership_rbac_role_binding_config = parent_rpcs.get_membership_rbac_role_binding if parent_rpcs.respond_to? :get_membership_rbac_role_binding - @get_membership_rbac_role_binding = ::Gapic::Config::Method.new get_membership_rbac_role_binding_config - create_membership_rbac_role_binding_config = parent_rpcs.create_membership_rbac_role_binding if parent_rpcs.respond_to? :create_membership_rbac_role_binding - @create_membership_rbac_role_binding = ::Gapic::Config::Method.new create_membership_rbac_role_binding_config - update_membership_rbac_role_binding_config = parent_rpcs.update_membership_rbac_role_binding if parent_rpcs.respond_to? :update_membership_rbac_role_binding - @update_membership_rbac_role_binding = ::Gapic::Config::Method.new update_membership_rbac_role_binding_config - delete_membership_rbac_role_binding_config = parent_rpcs.delete_membership_rbac_role_binding if parent_rpcs.respond_to? :delete_membership_rbac_role_binding - @delete_membership_rbac_role_binding = ::Gapic::Config::Method.new delete_membership_rbac_role_binding_config - list_membership_rbac_role_bindings_config = parent_rpcs.list_membership_rbac_role_bindings if parent_rpcs.respond_to? :list_membership_rbac_role_bindings - @list_membership_rbac_role_bindings = ::Gapic::Config::Method.new list_membership_rbac_role_bindings_config - generate_membership_rbac_role_binding_yaml_config = parent_rpcs.generate_membership_rbac_role_binding_yaml if parent_rpcs.respond_to? :generate_membership_rbac_role_binding_yaml - @generate_membership_rbac_role_binding_yaml = ::Gapic::Config::Method.new generate_membership_rbac_role_binding_yaml_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub/credentials.rb b/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub/credentials.rb deleted file mode 100644 index b6ef30824fd3..000000000000 --- a/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub/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 GkeHub - module V1 - module GkeHub - # Credentials for the GkeHub API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "GKE_HUB_CREDENTIALS", - "GKE_HUB_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "GKE_HUB_CREDENTIALS_JSON", - "GKE_HUB_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-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub/operations.rb b/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub/operations.rb deleted file mode 100644 index 65bcf6952705..000000000000 --- a/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub/operations.rb +++ /dev/null @@ -1,841 +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/operation" -require "google/longrunning/operations_pb" - -module Google - module Cloud - module GkeHub - module V1 - module GkeHub - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "gkehub.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the GkeHub Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the GkeHub Operations 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 {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::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/longrunning/operations_services_pb" - - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - 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 - - @operations_stub = ::Gapic::ServiceStub.new( - ::Google::Longrunning::Operations::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 - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::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_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_operations` 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] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # @param return_partial_success [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Gapic::Operation>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Gapic::Operation>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations 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::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # 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_operations.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::GkeHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :list_operations, request, options: options do |response, operation| - wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client } - response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the latest state of a long-running operation. Clients can use this - # method to poll the operation result at intervals as recommended by the API - # service. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::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_operation(name: nil) - # Pass arguments to `get_operation` 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] - # The name of the operation resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # 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_operation.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::GkeHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :get_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes a long-running operation. This method indicates that the client is - # no longer interested in the operation result. It does not cancel the - # operation. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::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_operation(name: nil) - # Pass arguments to `delete_operation` 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] - # The name of the operation resource to be deleted. - # - # @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/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # 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_operation.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::GkeHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :delete_operation, 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 - - ## - # Starts asynchronous cancellation on a long-running operation. The server - # makes a best effort to cancel the operation, but success is not - # guaranteed. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. Clients can use - # Operations.GetOperation or - # other methods to check whether the cancellation succeeded or whether the - # operation completed despite cancellation. On successful cancellation, - # the operation is not deleted; instead, it becomes an operation with - # an {::Google::Longrunning::Operation#error Operation.error} value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to - # `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` 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] - # The name of the operation resource to be cancelled. - # - # @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/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.cancel_operation.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::GkeHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :cancel_operation, 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 - - ## - # Waits until the specified long-running operation is done or reaches at most - # a specified timeout, returning the latest state. If the operation is - # already done, the latest state is immediately returned. If the timeout - # specified is greater than the default HTTP/RPC timeout, the HTTP/RPC - # timeout is used. If the server does not support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # Note that this method is on a best-effort basis. It may return the latest - # state before the specified timeout (including immediately), meaning even an - # immediate response is no guarantee that the operation is done. - # - # @overload wait_operation(request, options = nil) - # Pass arguments to `wait_operation` via a request object, either of type - # {::Google::Longrunning::WaitOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::WaitOperationRequest, ::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 wait_operation(name: nil, timeout: nil) - # Pass arguments to `wait_operation` 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] - # The name of the operation resource to wait on. - # @param timeout [::Google::Protobuf::Duration, ::Hash] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::WaitOperationRequest.new - # - # # Call the wait_operation method. - # result = client.wait_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def wait_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::WaitOperationRequest - - # 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.wait_operation.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::GkeHub::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.wait_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations API. - # - # This class represents the configuration for Operations, - # 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::Longrunning::Operations::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.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::Longrunning::Operations::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. - # * `: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 = "gkehub.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 Operations 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. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub/paths.rb b/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub/paths.rb deleted file mode 100644 index 336c8bdbdb5f..000000000000 --- a/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub/paths.rb +++ /dev/null @@ -1,239 +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 GkeHub - module V1 - module GkeHub - # Path helper methods for the GkeHub API. - module Paths - ## - # Create a fully-qualified Feature resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/features/{feature}` - # - # @param project [String] - # @param location [String] - # @param feature [String] - # - # @return [::String] - def feature_path project:, location:, feature: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/features/#{feature}" - end - - ## - # Create a fully-qualified Fleet resource string. - # - # @overload fleet_path(project:, location:, fleet:) - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/fleets/{fleet}` - # - # @param project [String] - # @param location [String] - # @param fleet [String] - # - # @overload fleet_path(organization:, location:, fleet:) - # The resource will be in the following format: - # - # `organizations/{organization}/locations/{location}/fleets/{fleet}` - # - # @param organization [String] - # @param location [String] - # @param fleet [String] - # - # @return [::String] - def fleet_path **args - resources = { - "fleet:location:project" => (proc do |project:, location:, fleet:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/fleets/#{fleet}" - end), - "fleet:location:organization" => (proc do |organization:, location:, fleet:| - raise ::ArgumentError, "organization cannot contain /" if organization.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "organizations/#{organization}/locations/#{location}/fleets/#{fleet}" - 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 Location resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}` - # - # @param project [String] - # @param location [String] - # - # @return [::String] - def location_path project:, location: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/locations/#{location}" - end - - ## - # Create a fully-qualified Membership resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/memberships/{membership}` - # - # @param project [String] - # @param location [String] - # @param membership [String] - # - # @return [::String] - def membership_path project:, location:, membership: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/memberships/#{membership}" - end - - ## - # Create a fully-qualified MembershipBinding resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/memberships/{membership}/bindings/{membershipbinding}` - # - # @param project [String] - # @param location [String] - # @param membership [String] - # @param membershipbinding [String] - # - # @return [::String] - def membership_binding_path project:, location:, membership:, membershipbinding: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "membership cannot contain /" if membership.to_s.include? "/" - - "projects/#{project}/locations/#{location}/memberships/#{membership}/bindings/#{membershipbinding}" - end - - ## - # Create a fully-qualified Namespace resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/scopes/{scope}/namespaces/{namespace}` - # - # @param project [String] - # @param location [String] - # @param scope [String] - # @param namespace [String] - # - # @return [::String] - def namespace_path project:, location:, scope:, namespace: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "scope cannot contain /" if scope.to_s.include? "/" - - "projects/#{project}/locations/#{location}/scopes/#{scope}/namespaces/#{namespace}" - end - - ## - # Create a fully-qualified RBACRoleBinding resource string. - # - # @overload rbac_role_binding_path(project:, location:, scope:, rbacrolebinding:) - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/scopes/{scope}/rbacrolebindings/{rbacrolebinding}` - # - # @param project [String] - # @param location [String] - # @param scope [String] - # @param rbacrolebinding [String] - # - # @overload rbac_role_binding_path(project:, location:, membership:, rbacrolebinding:) - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/memberships/{membership}/rbacrolebindings/{rbacrolebinding}` - # - # @param project [String] - # @param location [String] - # @param membership [String] - # @param rbacrolebinding [String] - # - # @return [::String] - def rbac_role_binding_path **args - resources = { - "location:project:rbacrolebinding:scope" => (proc do |project:, location:, scope:, rbacrolebinding:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "scope cannot contain /" if scope.to_s.include? "/" - - "projects/#{project}/locations/#{location}/scopes/#{scope}/rbacrolebindings/#{rbacrolebinding}" - end), - "location:membership:project:rbacrolebinding" => (proc do |project:, location:, membership:, rbacrolebinding:| - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "membership cannot contain /" if membership.to_s.include? "/" - - "projects/#{project}/locations/#{location}/memberships/#{membership}/rbacrolebindings/#{rbacrolebinding}" - 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 Scope resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/scopes/{scope}` - # - # @param project [String] - # @param location [String] - # @param scope [String] - # - # @return [::String] - def scope_path project:, location:, scope: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/scopes/#{scope}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub/rest.rb b/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub/rest.rb deleted file mode 100644 index bf8b6db9660b..000000000000 --- a/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub/rest.rb +++ /dev/null @@ -1,69 +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/gke_hub/v1/version" - -require "google/cloud/gke_hub/v1/gke_hub/credentials" -require "google/cloud/gke_hub/v1/gke_hub/paths" -require "google/cloud/gke_hub/v1/gke_hub/rest/operations" -require "google/cloud/gke_hub/v1/gke_hub/rest/client" - -module Google - module Cloud - module GkeHub - module V1 - ## - # The GKE Hub service handles the registration of many Kubernetes clusters to - # Google Cloud, and the management of multi-cluster features over those - # clusters. - # - # The GKE Hub service operates on the following resources: - # - # * {::Google::Cloud::GkeHub::V1::Membership Membership} - # * {::Google::Cloud::GkeHub::V1::Feature Feature} - # - # GKE Hub is currently available in the global region and all regions in - # https://cloud.google.com/compute/docs/regions-zones. Feature is only - # available in global region while membership is global region and all the - # regions. - # - # **Membership management may be non-trivial:** it is recommended to use one - # of the Google-provided client libraries or tools where possible when working - # with Membership resources. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/gke_hub/v1/gke_hub/rest" - # client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new - # - module GkeHub - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/gke_hub/v1/gke_hub/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub/rest/client.rb b/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub/rest/client.rb deleted file mode 100644 index 29454987bd41..000000000000 --- a/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub/rest/client.rb +++ /dev/null @@ -1,4822 +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/gkehub/v1/service_pb" -require "google/cloud/gke_hub/v1/gke_hub/rest/service_stub" - -module Google - module Cloud - module GkeHub - module V1 - module GkeHub - module Rest - ## - # REST client for the GkeHub service. - # - # The GKE Hub service handles the registration of many Kubernetes clusters to - # Google Cloud, and the management of multi-cluster features over those - # clusters. - # - # The GKE Hub service operates on the following resources: - # - # * {::Google::Cloud::GkeHub::V1::Membership Membership} - # * {::Google::Cloud::GkeHub::V1::Feature Feature} - # - # GKE Hub is currently available in the global region and all regions in - # https://cloud.google.com/compute/docs/regions-zones. Feature is only - # available in global region while membership is global region and all the - # regions. - # - # **Membership management may be non-trivial:** it is recommended to use one - # of the Google-provided client libraries or tools where possible when working - # with Membership resources. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "gkehub.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :gke_hub_stub - - ## - # Configure the GkeHub Client class. - # - # See {::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all GkeHub clients - # ::Google::Cloud::GkeHub::V1::GkeHub::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", "GkeHub", "V1"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.timeout = 60.0 - default_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the GkeHub 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::GkeHub::V1::GkeHub::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 - @gke_hub_stub.universe_domain - end - - ## - # Create a new GkeHub REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the GkeHub 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 - - @operations_client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Operations.new do |config| - config.credentials = credentials - config.quota_project = @quota_project_id - config.endpoint = @config.endpoint - config.universe_domain = @config.universe_domain - end - - @gke_hub_stub = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @gke_hub_stub.logger(stub: true)&.info do |entry| - entry.set_system_name - entry.set_service - entry.message = "Created client for #{entry.service}" - entry.set_credentials_fields credentials - entry.set "customEndpoint", @config.endpoint if @config.endpoint - entry.set "defaultTimeout", @config.timeout if @config.timeout - entry.set "quotaProject", @quota_project_id if @quota_project_id - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::GkeHub::V1::GkeHub::Rest::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @gke_hub_stub.logger - end - - # Service calls - - ## - # Lists Memberships in a given project and location. - # - # @overload list_memberships(request, options = nil) - # Pass arguments to `list_memberships` via a request object, either of type - # {::Google::Cloud::GkeHub::V1::ListMembershipsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeHub::V1::ListMembershipsRequest, ::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_memberships(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_memberships` 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 (project and location) where the Memberships will be - # listed. Specified in the format `projects/*/locations/*`. - # `projects/*/locations/-` list memberships in all the regions. - # @param page_size [::Integer] - # Optional. When requesting a 'page' of resources, `page_size` specifies - # number of resources to return. If unspecified or set to 0, all resources - # will be returned. - # @param page_token [::String] - # Optional. Token returned by previous call to `ListMemberships` which - # specifies the position in the list from where to continue listing the - # resources. - # @param filter [::String] - # Optional. Lists Memberships that match the filter expression, following the - # syntax outlined in https://google.aip.dev/160. - # - # Examples: - # - # - Name is `bar` in project `foo-proj` and location `global`: - # - # name = "projects/foo-proj/locations/global/membership/bar" - # - # - Memberships that have a label called `foo`: - # - # labels.foo:* - # - # - Memberships that have a label called `foo` whose value is `bar`: - # - # labels.foo = bar - # - # - Memberships in the CREATING state: - # - # state = CREATING - # @param order_by [::String] - # Optional. One or more fields to compare and use to sort the output. - # See https://google.aip.dev/132#ordering. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeHub::V1::Membership>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeHub::V1::Membership>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/gke_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeHub::V1::ListMembershipsRequest.new - # - # # Call the list_memberships method. - # result = client.list_memberships 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::GkeHub::V1::Membership. - # p item - # end - # - def list_memberships request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::ListMembershipsRequest - - # 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_memberships.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::GkeHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_memberships.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_memberships.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gke_hub_stub.list_memberships request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @gke_hub_stub, :list_memberships, "resources", 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 - - ## - # Lists Memberships bound to a Scope. The response includes relevant - # Memberships from all regions. - # - # @overload list_bound_memberships(request, options = nil) - # Pass arguments to `list_bound_memberships` via a request object, either of type - # {::Google::Cloud::GkeHub::V1::ListBoundMembershipsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeHub::V1::ListBoundMembershipsRequest, ::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_bound_memberships(scope_name: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_bound_memberships` 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 scope_name [::String] - # Required. Name of the Scope, in the format - # `projects/*/locations/global/scopes/*`, to which the Memberships are bound. - # @param filter [::String] - # Optional. Lists Memberships that match the filter expression, following the - # syntax outlined in https://google.aip.dev/160. Currently, filtering - # can be done only based on Memberships's `name`, `labels`, `create_time`, - # `update_time`, and `unique_id`. - # @param page_size [::Integer] - # Optional. When requesting a 'page' of resources, `page_size` specifies - # number of resources to return. If unspecified or set to 0, all resources - # will be returned. Pagination is currently not supported; therefore, setting - # this field does not have any impact for now. - # @param page_token [::String] - # Optional. Token returned by previous call to `ListBoundMemberships` which - # specifies the position in the list from where to continue listing the - # resources. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeHub::V1::Membership>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeHub::V1::Membership>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/gke_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeHub::V1::ListBoundMembershipsRequest.new - # - # # Call the list_bound_memberships method. - # result = client.list_bound_memberships 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::GkeHub::V1::Membership. - # p item - # end - # - def list_bound_memberships request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::ListBoundMembershipsRequest - - # 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_bound_memberships.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::GkeHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_bound_memberships.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_bound_memberships.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gke_hub_stub.list_bound_memberships request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @gke_hub_stub, :list_bound_memberships, "memberships", 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 - - ## - # Lists Features in a given project and location. - # - # @overload list_features(request, options = nil) - # Pass arguments to `list_features` via a request object, either of type - # {::Google::Cloud::GkeHub::V1::ListFeaturesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeHub::V1::ListFeaturesRequest, ::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_features(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, return_partial_success: nil) - # Pass arguments to `list_features` 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 (project and location) where the Features will be - # listed. Specified in the format `projects/*/locations/*`. - # @param page_size [::Integer] - # When requesting a 'page' of resources, `page_size` specifies number of - # resources to return. If unspecified or set to 0, all resources will - # be returned. - # @param page_token [::String] - # Token returned by previous call to `ListFeatures` which - # specifies the position in the list from where to continue listing the - # resources. - # @param filter [::String] - # Lists Features that match the filter expression, following the syntax - # outlined in https://google.aip.dev/160. - # - # Examples: - # - # - Feature with the name "servicemesh" in project "foo-proj": - # - # name = "projects/foo-proj/locations/global/features/servicemesh" - # - # - Features that have a label called `foo`: - # - # labels.foo:* - # - # - Features that have a label called `foo` whose value is `bar`: - # - # labels.foo = bar - # @param order_by [::String] - # One or more fields to compare and use to sort the output. - # See https://google.aip.dev/132#ordering. - # @param return_partial_success [::Boolean] - # Optional. If set to true, the response will return partial results when - # some regions are unreachable and the unreachable field in Feature proto - # will be populated. If set to false, the request will fail when some regions - # are unreachable. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeHub::V1::Feature>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeHub::V1::Feature>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/gke_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeHub::V1::ListFeaturesRequest.new - # - # # Call the list_features method. - # result = client.list_features 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::GkeHub::V1::Feature. - # p item - # end - # - def list_features request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::ListFeaturesRequest - - # 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_features.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::GkeHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_features.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_features.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gke_hub_stub.list_features request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @gke_hub_stub, :list_features, "resources", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the details of a Membership. - # - # @overload get_membership(request, options = nil) - # Pass arguments to `get_membership` via a request object, either of type - # {::Google::Cloud::GkeHub::V1::GetMembershipRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeHub::V1::GetMembershipRequest, ::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_membership(name: nil) - # Pass arguments to `get_membership` 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 Membership resource name in the format - # `projects/*/locations/*/memberships/*`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::GkeHub::V1::Membership] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GkeHub::V1::Membership] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/gke_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeHub::V1::GetMembershipRequest.new - # - # # Call the get_membership method. - # result = client.get_membership request - # - # # The returned object is of type Google::Cloud::GkeHub::V1::Membership. - # p result - # - def get_membership request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::GetMembershipRequest - - # 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_membership.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::GkeHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_membership.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_membership.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gke_hub_stub.get_membership request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets details of a single Feature. - # - # @overload get_feature(request, options = nil) - # Pass arguments to `get_feature` via a request object, either of type - # {::Google::Cloud::GkeHub::V1::GetFeatureRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeHub::V1::GetFeatureRequest, ::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_feature(name: nil, return_partial_success: nil) - # Pass arguments to `get_feature` 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 Feature resource name in the format - # `projects/*/locations/*/features/*` - # @param return_partial_success [::Boolean] - # Optional. If set to true, the response will return partial results when - # some regions are unreachable and the unreachable field in Feature proto - # will be populated. If set to false, the request will fail when some regions - # are unreachable. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::GkeHub::V1::Feature] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GkeHub::V1::Feature] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/gke_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeHub::V1::GetFeatureRequest.new - # - # # Call the get_feature method. - # result = client.get_feature request - # - # # The returned object is of type Google::Cloud::GkeHub::V1::Feature. - # p result - # - def get_feature request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::GetFeatureRequest - - # 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_feature.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::GkeHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_feature.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_feature.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gke_hub_stub.get_feature request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a new Membership. - # - # **This is currently only supported for GKE clusters on Google Cloud**. - # To register other clusters, follow the instructions at - # https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster. - # - # @overload create_membership(request, options = nil) - # Pass arguments to `create_membership` via a request object, either of type - # {::Google::Cloud::GkeHub::V1::CreateMembershipRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeHub::V1::CreateMembershipRequest, ::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_membership(parent: nil, membership_id: nil, resource: nil, request_id: nil) - # Pass arguments to `create_membership` 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 (project and location) where the Memberships will be - # created. Specified in the format `projects/*/locations/*`. - # @param membership_id [::String] - # Required. Client chosen ID for the membership. `membership_id` must be a - # valid RFC 1123 compliant DNS label: - # - # 1. At most 63 characters in length - # 2. It must consist of lower case alphanumeric characters or `-` - # 3. It must start and end with an alphanumeric character - # - # Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, - # with a maximum length of 63 characters. - # @param resource [::Google::Cloud::GkeHub::V1::Membership, ::Hash] - # Required. The membership to create. - # @param request_id [::String] - # Optional. A request ID to identify requests. Specify a unique request ID - # so that if you must retry your request, the server will know to ignore - # the request if it has already been completed. The server will guarantee - # that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/gke_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeHub::V1::CreateMembershipRequest.new - # - # # Call the create_membership method. - # result = client.create_membership request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_membership request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::CreateMembershipRequest - - # 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_membership.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::GkeHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_membership.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_membership.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gke_hub_stub.create_membership request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Adds a new Feature. - # - # @overload create_feature(request, options = nil) - # Pass arguments to `create_feature` via a request object, either of type - # {::Google::Cloud::GkeHub::V1::CreateFeatureRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeHub::V1::CreateFeatureRequest, ::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_feature(parent: nil, feature_id: nil, resource: nil, request_id: nil) - # Pass arguments to `create_feature` 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 (project and location) where the Feature will be - # created. Specified in the format `projects/*/locations/*`. - # @param feature_id [::String] - # The ID of the feature to create. - # @param resource [::Google::Cloud::GkeHub::V1::Feature, ::Hash] - # The Feature resource to create. - # @param request_id [::String] - # A request ID to identify requests. Specify a unique request ID - # so that if you must retry your request, the server will know to ignore - # the request if it has already been completed. The server will guarantee - # that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/gke_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeHub::V1::CreateFeatureRequest.new - # - # # Call the create_feature method. - # result = client.create_feature request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_feature request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::CreateFeatureRequest - - # 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_feature.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::GkeHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_feature.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_feature.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gke_hub_stub.create_feature request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Removes a Membership. - # - # **This is currently only supported for GKE clusters on Google Cloud**. - # To unregister other clusters, follow the instructions at - # https://cloud.google.com/anthos/multicluster-management/connect/unregistering-a-cluster. - # - # @overload delete_membership(request, options = nil) - # Pass arguments to `delete_membership` via a request object, either of type - # {::Google::Cloud::GkeHub::V1::DeleteMembershipRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeHub::V1::DeleteMembershipRequest, ::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_membership(name: nil, request_id: nil, force: nil) - # Pass arguments to `delete_membership` 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 Membership resource name in the format - # `projects/*/locations/*/memberships/*`. - # @param request_id [::String] - # Optional. A request ID to identify requests. Specify a unique request ID - # so that if you must retry your request, the server will know to ignore - # the request if it has already been completed. The server will guarantee - # that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @param force [::Boolean] - # Optional. If set to true, any subresource from this Membership will also be - # deleted. Otherwise, the request will only work if the Membership has no - # subresource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/gke_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeHub::V1::DeleteMembershipRequest.new - # - # # Call the delete_membership method. - # result = client.delete_membership request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_membership request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::DeleteMembershipRequest - - # 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_membership.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::GkeHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_membership.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_membership.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gke_hub_stub.delete_membership request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Removes a Feature. - # - # @overload delete_feature(request, options = nil) - # Pass arguments to `delete_feature` via a request object, either of type - # {::Google::Cloud::GkeHub::V1::DeleteFeatureRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeHub::V1::DeleteFeatureRequest, ::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_feature(name: nil, force: nil, request_id: nil) - # Pass arguments to `delete_feature` 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 Feature resource name in the format - # `projects/*/locations/*/features/*`. - # @param force [::Boolean] - # If set to true, the delete will ignore any outstanding resources for - # this Feature (that is, `FeatureState.has_resources` is set to true). These - # resources will NOT be cleaned up or modified in any way. - # @param request_id [::String] - # Optional. A request ID to identify requests. Specify a unique request ID - # so that if you must retry your request, the server will know to ignore - # the request if it has already been completed. The server will guarantee - # that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/gke_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeHub::V1::DeleteFeatureRequest.new - # - # # Call the delete_feature method. - # result = client.delete_feature request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_feature request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::DeleteFeatureRequest - - # 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_feature.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::GkeHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_feature.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_feature.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gke_hub_stub.delete_feature request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an existing Membership. - # - # @overload update_membership(request, options = nil) - # Pass arguments to `update_membership` via a request object, either of type - # {::Google::Cloud::GkeHub::V1::UpdateMembershipRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeHub::V1::UpdateMembershipRequest, ::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_membership(name: nil, update_mask: nil, resource: nil, request_id: nil) - # Pass arguments to `update_membership` 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 Membership resource name in the format - # `projects/*/locations/*/memberships/*`. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask of fields to update. - # @param resource [::Google::Cloud::GkeHub::V1::Membership, ::Hash] - # Required. Only fields specified in update_mask are updated. - # If you specify a field in the update_mask but don't specify its value here - # that field will be deleted. - # If you are updating a map field, set the value of a key to null or empty - # string to delete the key from the map. It's not possible to update a key's - # value to the empty string. - # If you specify the update_mask to be a special path "*", fully replaces all - # user-modifiable fields to match `resource`. - # @param request_id [::String] - # Optional. A request ID to identify requests. Specify a unique request ID - # so that if you must retry your request, the server will know to ignore - # the request if it has already been completed. The server will guarantee - # that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/gke_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeHub::V1::UpdateMembershipRequest.new - # - # # Call the update_membership method. - # result = client.update_membership request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_membership request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::UpdateMembershipRequest - - # 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_membership.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::GkeHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_membership.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_membership.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gke_hub_stub.update_membership request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an existing Feature. - # - # @overload update_feature(request, options = nil) - # Pass arguments to `update_feature` via a request object, either of type - # {::Google::Cloud::GkeHub::V1::UpdateFeatureRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeHub::V1::UpdateFeatureRequest, ::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_feature(name: nil, update_mask: nil, resource: nil, request_id: nil) - # Pass arguments to `update_feature` 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 Feature resource name in the format - # `projects/*/locations/*/features/*`. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Mask of fields to update. - # @param resource [::Google::Cloud::GkeHub::V1::Feature, ::Hash] - # Only fields specified in update_mask are updated. - # If you specify a field in the update_mask but don't specify its value here - # that field will be deleted. - # If you are updating a map field, set the value of a key to null or empty - # string to delete the key from the map. It's not possible to update a key's - # value to the empty string. - # If you specify the update_mask to be a special path "*", fully replaces all - # user-modifiable fields to match `resource`. - # @param request_id [::String] - # A request ID to identify requests. Specify a unique request ID - # so that if you must retry your request, the server will know to ignore - # the request if it has already been completed. The server will guarantee - # that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/gke_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeHub::V1::UpdateFeatureRequest.new - # - # # Call the update_feature method. - # result = client.update_feature request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_feature request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::UpdateFeatureRequest - - # 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_feature.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::GkeHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_feature.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_feature.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gke_hub_stub.update_feature request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Generates the manifest for deployment of the GKE connect agent. - # - # **This method is used internally by Google-provided libraries.** - # Most clients should not need to call this method directly. - # - # @overload generate_connect_manifest(request, options = nil) - # Pass arguments to `generate_connect_manifest` via a request object, either of type - # {::Google::Cloud::GkeHub::V1::GenerateConnectManifestRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeHub::V1::GenerateConnectManifestRequest, ::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 generate_connect_manifest(name: nil, namespace: nil, proxy: nil, version: nil, is_upgrade: nil, registry: nil, image_pull_secret_content: nil) - # Pass arguments to `generate_connect_manifest` 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 Membership resource name the Agent will associate with, in - # the format `projects/*/locations/*/memberships/*`. - # @param namespace [::String] - # Optional. Namespace for GKE Connect agent resources. Defaults to - # `gke-connect`. - # - # The Connect Agent is authorized automatically when run in the default - # namespace. Otherwise, explicit authorization must be granted with an - # additional IAM binding. - # @param proxy [::String] - # Optional. URI of a proxy if connectivity from the agent to - # gkeconnect.googleapis.com requires the use of a proxy. Format must be in - # the form `http(s)://{proxy_address}`, depending on the HTTP/HTTPS protocol - # supported by the proxy. This will direct the connect agent's outbound - # traffic through a HTTP(S) proxy. - # @param version [::String] - # Optional. The Connect agent version to use. Defaults to the most current - # version. - # @param is_upgrade [::Boolean] - # Optional. If true, generate the resources for upgrade only. Some resources - # generated only for installation (e.g. secrets) will be excluded. - # @param registry [::String] - # Optional. The registry to fetch the connect agent image from. Defaults to - # gcr.io/gkeconnect. - # @param image_pull_secret_content [::String] - # Optional. The image pull secret content for the registry, if not public. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::GkeHub::V1::GenerateConnectManifestResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GkeHub::V1::GenerateConnectManifestResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/gke_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeHub::V1::GenerateConnectManifestRequest.new - # - # # Call the generate_connect_manifest method. - # result = client.generate_connect_manifest request - # - # # The returned object is of type Google::Cloud::GkeHub::V1::GenerateConnectManifestResponse. - # p result - # - def generate_connect_manifest request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::GenerateConnectManifestRequest - - # 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.generate_connect_manifest.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::GkeHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.generate_connect_manifest.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.generate_connect_manifest.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gke_hub_stub.generate_connect_manifest request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a fleet. - # - # @overload create_fleet(request, options = nil) - # Pass arguments to `create_fleet` via a request object, either of type - # {::Google::Cloud::GkeHub::V1::CreateFleetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeHub::V1::CreateFleetRequest, ::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_fleet(parent: nil, fleet: nil) - # Pass arguments to `create_fleet` 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 (project and location) where the Fleet will be - # created. Specified in the format `projects/*/locations/*`. - # @param fleet [::Google::Cloud::GkeHub::V1::Fleet, ::Hash] - # Required. The fleet to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/gke_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeHub::V1::CreateFleetRequest.new - # - # # Call the create_fleet method. - # result = client.create_fleet request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_fleet request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::CreateFleetRequest - - # 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_fleet.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::GkeHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_fleet.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_fleet.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gke_hub_stub.create_fleet request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns the details of a fleet. - # - # @overload get_fleet(request, options = nil) - # Pass arguments to `get_fleet` via a request object, either of type - # {::Google::Cloud::GkeHub::V1::GetFleetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeHub::V1::GetFleetRequest, ::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_fleet(name: nil) - # Pass arguments to `get_fleet` 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 Fleet resource name in the format - # `projects/*/locations/*/fleets/*`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::GkeHub::V1::Fleet] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GkeHub::V1::Fleet] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/gke_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeHub::V1::GetFleetRequest.new - # - # # Call the get_fleet method. - # result = client.get_fleet request - # - # # The returned object is of type Google::Cloud::GkeHub::V1::Fleet. - # p result - # - def get_fleet request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::GetFleetRequest - - # 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_fleet.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::GkeHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_fleet.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_fleet.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gke_hub_stub.get_fleet 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 a fleet. - # - # @overload update_fleet(request, options = nil) - # Pass arguments to `update_fleet` via a request object, either of type - # {::Google::Cloud::GkeHub::V1::UpdateFleetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeHub::V1::UpdateFleetRequest, ::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_fleet(fleet: nil, update_mask: nil) - # Pass arguments to `update_fleet` 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 fleet [::Google::Cloud::GkeHub::V1::Fleet, ::Hash] - # Required. The Fleet to update. - # - # The `name` field of the Fleet object identifies which fleet will be - # updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The fields to be updated; - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/gke_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeHub::V1::UpdateFleetRequest.new - # - # # Call the update_fleet method. - # result = client.update_fleet request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_fleet request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::UpdateFleetRequest - - # 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_fleet.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::GkeHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_fleet.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_fleet.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gke_hub_stub.update_fleet request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Removes a Fleet. There must be no memberships remaining in the Fleet. - # - # @overload delete_fleet(request, options = nil) - # Pass arguments to `delete_fleet` via a request object, either of type - # {::Google::Cloud::GkeHub::V1::DeleteFleetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeHub::V1::DeleteFleetRequest, ::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_fleet(name: nil) - # Pass arguments to `delete_fleet` 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 Fleet resource name in the format - # `projects/*/locations/*/fleets/*`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/gke_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeHub::V1::DeleteFleetRequest.new - # - # # Call the delete_fleet method. - # result = client.delete_fleet request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_fleet request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::DeleteFleetRequest - - # 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_fleet.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::GkeHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_fleet.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_fleet.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gke_hub_stub.delete_fleet request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns all fleets within an organization or a project that the caller has - # access to. - # - # @overload list_fleets(request, options = nil) - # Pass arguments to `list_fleets` via a request object, either of type - # {::Google::Cloud::GkeHub::V1::ListFleetsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeHub::V1::ListFleetsRequest, ::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_fleets(parent: nil, page_token: nil, page_size: nil) - # Pass arguments to `list_fleets` 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 organization or project to list for Fleets under, in the - # format `organizations/*/locations/*` or `projects/*/locations/*`. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListFleets` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListFleets` must match - # the call that provided the page token. - # @param page_size [::Integer] - # Optional. The maximum number of fleets to return. The service may return - # fewer than this value. If unspecified, at most 200 fleets will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeHub::V1::Fleet>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeHub::V1::Fleet>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/gke_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeHub::V1::ListFleetsRequest.new - # - # # Call the list_fleets method. - # result = client.list_fleets 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::GkeHub::V1::Fleet. - # p item - # end - # - def list_fleets request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::ListFleetsRequest - - # 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_fleets.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::GkeHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_fleets.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_fleets.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gke_hub_stub.list_fleets request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @gke_hub_stub, :list_fleets, "fleets", 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 - - ## - # Returns the details of a fleet namespace. - # - # @overload get_scope_namespace(request, options = nil) - # Pass arguments to `get_scope_namespace` via a request object, either of type - # {::Google::Cloud::GkeHub::V1::GetScopeNamespaceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeHub::V1::GetScopeNamespaceRequest, ::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_scope_namespace(name: nil) - # Pass arguments to `get_scope_namespace` 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 Namespace resource name in the format - # `projects/*/locations/*/scopes/*/namespaces/*`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::GkeHub::V1::Namespace] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GkeHub::V1::Namespace] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/gke_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeHub::V1::GetScopeNamespaceRequest.new - # - # # Call the get_scope_namespace method. - # result = client.get_scope_namespace request - # - # # The returned object is of type Google::Cloud::GkeHub::V1::Namespace. - # p result - # - def get_scope_namespace request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::GetScopeNamespaceRequest - - # 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_scope_namespace.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::GkeHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_scope_namespace.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_scope_namespace.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gke_hub_stub.get_scope_namespace request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a fleet namespace. - # - # @overload create_scope_namespace(request, options = nil) - # Pass arguments to `create_scope_namespace` via a request object, either of type - # {::Google::Cloud::GkeHub::V1::CreateScopeNamespaceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeHub::V1::CreateScopeNamespaceRequest, ::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_scope_namespace(parent: nil, scope_namespace_id: nil, scope_namespace: nil) - # Pass arguments to `create_scope_namespace` 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 (project and location) where the Namespace will be - # created. Specified in the format `projects/*/locations/*/scopes/*`. - # @param scope_namespace_id [::String] - # Required. Client chosen ID for the Namespace. `namespace_id` must be a - # valid RFC 1123 compliant DNS label: - # - # 1. At most 63 characters in length - # 2. It must consist of lower case alphanumeric characters or `-` - # 3. It must start and end with an alphanumeric character - # - # Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, - # with a maximum length of 63 characters. - # @param scope_namespace [::Google::Cloud::GkeHub::V1::Namespace, ::Hash] - # Required. The fleet namespace to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/gke_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeHub::V1::CreateScopeNamespaceRequest.new - # - # # Call the create_scope_namespace method. - # result = client.create_scope_namespace request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_scope_namespace request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::CreateScopeNamespaceRequest - - # 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_scope_namespace.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::GkeHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_scope_namespace.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_scope_namespace.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gke_hub_stub.create_scope_namespace request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a fleet namespace. - # - # @overload update_scope_namespace(request, options = nil) - # Pass arguments to `update_scope_namespace` via a request object, either of type - # {::Google::Cloud::GkeHub::V1::UpdateScopeNamespaceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeHub::V1::UpdateScopeNamespaceRequest, ::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_scope_namespace(scope_namespace: nil, update_mask: nil) - # Pass arguments to `update_scope_namespace` 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 scope_namespace [::Google::Cloud::GkeHub::V1::Namespace, ::Hash] - # Required. A namespace with fields updated. The 'name' field in this - # namespace is used to identify the resource to update. Given 'updated' - # prefix to follow go/proto-best-practices-checkers#keyword_conflict - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The fields to be updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/gke_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeHub::V1::UpdateScopeNamespaceRequest.new - # - # # Call the update_scope_namespace method. - # result = client.update_scope_namespace request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_scope_namespace request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::UpdateScopeNamespaceRequest - - # 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_scope_namespace.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::GkeHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_scope_namespace.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_scope_namespace.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gke_hub_stub.update_scope_namespace request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 a fleet namespace. - # - # @overload delete_scope_namespace(request, options = nil) - # Pass arguments to `delete_scope_namespace` via a request object, either of type - # {::Google::Cloud::GkeHub::V1::DeleteScopeNamespaceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeHub::V1::DeleteScopeNamespaceRequest, ::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_scope_namespace(name: nil) - # Pass arguments to `delete_scope_namespace` 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 Namespace resource name in the format - # `projects/*/locations/*/scopes/*/namespaces/*`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/gke_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeHub::V1::DeleteScopeNamespaceRequest.new - # - # # Call the delete_scope_namespace method. - # result = client.delete_scope_namespace request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_scope_namespace request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::DeleteScopeNamespaceRequest - - # 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_scope_namespace.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::GkeHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_scope_namespace.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_scope_namespace.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gke_hub_stub.delete_scope_namespace request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists fleet namespaces. - # - # @overload list_scope_namespaces(request, options = nil) - # Pass arguments to `list_scope_namespaces` via a request object, either of type - # {::Google::Cloud::GkeHub::V1::ListScopeNamespacesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeHub::V1::ListScopeNamespacesRequest, ::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_scope_namespaces(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_scope_namespaces` 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 (project and location) where the Features will be - # listed. Specified in the format `projects/*/locations/*/scopes/*`. - # @param page_size [::Integer] - # Optional. When requesting a 'page' of resources, `page_size` specifies - # number of resources to return. If unspecified or set to 0, all resources - # will be returned. - # @param page_token [::String] - # Optional. Token returned by previous call to `ListFeatures` which - # specifies the position in the list from where to continue listing the - # resources. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeHub::V1::Namespace>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeHub::V1::Namespace>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/gke_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeHub::V1::ListScopeNamespacesRequest.new - # - # # Call the list_scope_namespaces method. - # result = client.list_scope_namespaces 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::GkeHub::V1::Namespace. - # p item - # end - # - def list_scope_namespaces request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::ListScopeNamespacesRequest - - # 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_scope_namespaces.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::GkeHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_scope_namespaces.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_scope_namespaces.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gke_hub_stub.list_scope_namespaces request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @gke_hub_stub, :list_scope_namespaces, "scope_namespaces", 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 - - ## - # Returns the details of a Scope RBACRoleBinding. - # - # @overload get_scope_rbac_role_binding(request, options = nil) - # Pass arguments to `get_scope_rbac_role_binding` via a request object, either of type - # {::Google::Cloud::GkeHub::V1::GetScopeRBACRoleBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeHub::V1::GetScopeRBACRoleBindingRequest, ::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_scope_rbac_role_binding(name: nil) - # Pass arguments to `get_scope_rbac_role_binding` 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 RBACRoleBinding resource name in the format - # `projects/*/locations/*/scopes/*/rbacrolebindings/*`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::GkeHub::V1::RBACRoleBinding] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GkeHub::V1::RBACRoleBinding] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/gke_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeHub::V1::GetScopeRBACRoleBindingRequest.new - # - # # Call the get_scope_rbac_role_binding method. - # result = client.get_scope_rbac_role_binding request - # - # # The returned object is of type Google::Cloud::GkeHub::V1::RBACRoleBinding. - # p result - # - def get_scope_rbac_role_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::GetScopeRBACRoleBindingRequest - - # 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_scope_rbac_role_binding.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::GkeHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_scope_rbac_role_binding.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_scope_rbac_role_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gke_hub_stub.get_scope_rbac_role_binding request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a Scope RBACRoleBinding. - # - # @overload create_scope_rbac_role_binding(request, options = nil) - # Pass arguments to `create_scope_rbac_role_binding` via a request object, either of type - # {::Google::Cloud::GkeHub::V1::CreateScopeRBACRoleBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeHub::V1::CreateScopeRBACRoleBindingRequest, ::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_scope_rbac_role_binding(parent: nil, rbacrolebinding_id: nil, rbacrolebinding: nil) - # Pass arguments to `create_scope_rbac_role_binding` 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 (project and location) where the RBACRoleBinding will - # be created. Specified in the format `projects/*/locations/*/scopes/*`. - # @param rbacrolebinding_id [::String] - # Required. Client chosen ID for the RBACRoleBinding. `rbacrolebinding_id` - # must be a valid RFC 1123 compliant DNS label: - # - # 1. At most 63 characters in length - # 2. It must consist of lower case alphanumeric characters or `-` - # 3. It must start and end with an alphanumeric character - # - # Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, - # with a maximum length of 63 characters. - # @param rbacrolebinding [::Google::Cloud::GkeHub::V1::RBACRoleBinding, ::Hash] - # Required. The rbacrolebindings to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/gke_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeHub::V1::CreateScopeRBACRoleBindingRequest.new - # - # # Call the create_scope_rbac_role_binding method. - # result = client.create_scope_rbac_role_binding request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_scope_rbac_role_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::CreateScopeRBACRoleBindingRequest - - # 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_scope_rbac_role_binding.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::GkeHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_scope_rbac_role_binding.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_scope_rbac_role_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gke_hub_stub.create_scope_rbac_role_binding request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a Scope RBACRoleBinding. - # - # @overload update_scope_rbac_role_binding(request, options = nil) - # Pass arguments to `update_scope_rbac_role_binding` via a request object, either of type - # {::Google::Cloud::GkeHub::V1::UpdateScopeRBACRoleBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeHub::V1::UpdateScopeRBACRoleBindingRequest, ::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_scope_rbac_role_binding(rbacrolebinding: nil, update_mask: nil) - # Pass arguments to `update_scope_rbac_role_binding` 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 rbacrolebinding [::Google::Cloud::GkeHub::V1::RBACRoleBinding, ::Hash] - # Required. A rbacrolebinding with fields updated. The 'name' field in this - # rbacrolebinding is used to identify the resource to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The fields to be updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/gke_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeHub::V1::UpdateScopeRBACRoleBindingRequest.new - # - # # Call the update_scope_rbac_role_binding method. - # result = client.update_scope_rbac_role_binding request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_scope_rbac_role_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::UpdateScopeRBACRoleBindingRequest - - # 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_scope_rbac_role_binding.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::GkeHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_scope_rbac_role_binding.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_scope_rbac_role_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gke_hub_stub.update_scope_rbac_role_binding request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 a Scope RBACRoleBinding. - # - # @overload delete_scope_rbac_role_binding(request, options = nil) - # Pass arguments to `delete_scope_rbac_role_binding` via a request object, either of type - # {::Google::Cloud::GkeHub::V1::DeleteScopeRBACRoleBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeHub::V1::DeleteScopeRBACRoleBindingRequest, ::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_scope_rbac_role_binding(name: nil) - # Pass arguments to `delete_scope_rbac_role_binding` 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 RBACRoleBinding resource name in the format - # `projects/*/locations/*/scopes/*/rbacrolebindings/*`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/gke_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeHub::V1::DeleteScopeRBACRoleBindingRequest.new - # - # # Call the delete_scope_rbac_role_binding method. - # result = client.delete_scope_rbac_role_binding request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_scope_rbac_role_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::DeleteScopeRBACRoleBindingRequest - - # 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_scope_rbac_role_binding.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::GkeHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_scope_rbac_role_binding.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_scope_rbac_role_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gke_hub_stub.delete_scope_rbac_role_binding request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all Scope RBACRoleBindings. - # - # @overload list_scope_rbac_role_bindings(request, options = nil) - # Pass arguments to `list_scope_rbac_role_bindings` via a request object, either of type - # {::Google::Cloud::GkeHub::V1::ListScopeRBACRoleBindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeHub::V1::ListScopeRBACRoleBindingsRequest, ::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_scope_rbac_role_bindings(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_scope_rbac_role_bindings` 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 (project and location) where the Features will be - # listed. Specified in the format `projects/*/locations/*/scopes/*`. - # @param page_size [::Integer] - # Optional. When requesting a 'page' of resources, `page_size` specifies - # number of resources to return. If unspecified or set to 0, all resources - # will be returned. - # @param page_token [::String] - # Optional. Token returned by previous call to `ListScopeRBACRoleBindings` - # which specifies the position in the list from where to continue listing the - # resources. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeHub::V1::RBACRoleBinding>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeHub::V1::RBACRoleBinding>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/gke_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeHub::V1::ListScopeRBACRoleBindingsRequest.new - # - # # Call the list_scope_rbac_role_bindings method. - # result = client.list_scope_rbac_role_bindings 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::GkeHub::V1::RBACRoleBinding. - # p item - # end - # - def list_scope_rbac_role_bindings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::ListScopeRBACRoleBindingsRequest - - # 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_scope_rbac_role_bindings.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::GkeHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_scope_rbac_role_bindings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_scope_rbac_role_bindings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gke_hub_stub.list_scope_rbac_role_bindings request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @gke_hub_stub, :list_scope_rbac_role_bindings, "rbacrolebindings", 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 - - ## - # Returns the details of a Scope. - # - # @overload get_scope(request, options = nil) - # Pass arguments to `get_scope` via a request object, either of type - # {::Google::Cloud::GkeHub::V1::GetScopeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeHub::V1::GetScopeRequest, ::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_scope(name: nil) - # Pass arguments to `get_scope` 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 Scope resource name in the format - # `projects/*/locations/*/scopes/*`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::GkeHub::V1::Scope] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GkeHub::V1::Scope] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/gke_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeHub::V1::GetScopeRequest.new - # - # # Call the get_scope method. - # result = client.get_scope request - # - # # The returned object is of type Google::Cloud::GkeHub::V1::Scope. - # p result - # - def get_scope request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::GetScopeRequest - - # 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_scope.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::GkeHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_scope.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_scope.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gke_hub_stub.get_scope request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a Scope. - # - # @overload create_scope(request, options = nil) - # Pass arguments to `create_scope` via a request object, either of type - # {::Google::Cloud::GkeHub::V1::CreateScopeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeHub::V1::CreateScopeRequest, ::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_scope(parent: nil, scope_id: nil, scope: nil) - # Pass arguments to `create_scope` 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 (project and location) where the Scope will be - # created. Specified in the format `projects/*/locations/*`. - # @param scope_id [::String] - # Required. Client chosen ID for the Scope. `scope_id` must be a - # ???? - # @param scope [::Google::Cloud::GkeHub::V1::Scope, ::Hash] - # Required. The Scope to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/gke_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeHub::V1::CreateScopeRequest.new - # - # # Call the create_scope method. - # result = client.create_scope request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_scope request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::CreateScopeRequest - - # 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_scope.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::GkeHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_scope.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_scope.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gke_hub_stub.create_scope request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a scopes. - # - # @overload update_scope(request, options = nil) - # Pass arguments to `update_scope` via a request object, either of type - # {::Google::Cloud::GkeHub::V1::UpdateScopeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeHub::V1::UpdateScopeRequest, ::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_scope(scope: nil, update_mask: nil) - # Pass arguments to `update_scope` 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 scope [::Google::Cloud::GkeHub::V1::Scope, ::Hash] - # Required. A Scope with fields updated. The 'name' field in this - # namespace is used to identify the resource to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The fields to be updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/gke_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeHub::V1::UpdateScopeRequest.new - # - # # Call the update_scope method. - # result = client.update_scope request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_scope request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::UpdateScopeRequest - - # 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_scope.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::GkeHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_scope.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_scope.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gke_hub_stub.update_scope request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 a Scope. - # - # @overload delete_scope(request, options = nil) - # Pass arguments to `delete_scope` via a request object, either of type - # {::Google::Cloud::GkeHub::V1::DeleteScopeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeHub::V1::DeleteScopeRequest, ::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_scope(name: nil) - # Pass arguments to `delete_scope` 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 Scope resource name in the format - # `projects/*/locations/*/scopes/*`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/gke_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeHub::V1::DeleteScopeRequest.new - # - # # Call the delete_scope method. - # result = client.delete_scope request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_scope request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::DeleteScopeRequest - - # 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_scope.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::GkeHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_scope.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_scope.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gke_hub_stub.delete_scope request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists Scopes. - # - # @overload list_scopes(request, options = nil) - # Pass arguments to `list_scopes` via a request object, either of type - # {::Google::Cloud::GkeHub::V1::ListScopesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeHub::V1::ListScopesRequest, ::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_scopes(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_scopes` 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 (project and location) where the Scope will be listed. - # Specified in the format `projects/*/locations/*`. - # @param page_size [::Integer] - # Optional. When requesting a 'page' of resources, `page_size` specifies - # number of resources to return. If unspecified or set to 0, all resources - # will be returned. - # @param page_token [::String] - # Optional. Token returned by previous call to `ListScopes` which - # specifies the position in the list from where to continue listing the - # resources. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeHub::V1::Scope>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeHub::V1::Scope>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/gke_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeHub::V1::ListScopesRequest.new - # - # # Call the list_scopes method. - # result = client.list_scopes 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::GkeHub::V1::Scope. - # p item - # end - # - def list_scopes request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::ListScopesRequest - - # 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_scopes.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::GkeHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_scopes.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_scopes.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gke_hub_stub.list_scopes request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @gke_hub_stub, :list_scopes, "scopes", 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 - - ## - # Lists permitted Scopes. - # - # @overload list_permitted_scopes(request, options = nil) - # Pass arguments to `list_permitted_scopes` via a request object, either of type - # {::Google::Cloud::GkeHub::V1::ListPermittedScopesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeHub::V1::ListPermittedScopesRequest, ::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_permitted_scopes(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_permitted_scopes` 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 (project and location) where the Scope will be listed. - # Specified in the format `projects/*/locations/*`. - # @param page_size [::Integer] - # Optional. When requesting a 'page' of resources, `page_size` specifies - # number of resources to return. If unspecified or set to 0, all resources - # will be returned. - # @param page_token [::String] - # Optional. Token returned by previous call to `ListPermittedScopes` which - # specifies the position in the list from where to continue listing the - # resources. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeHub::V1::Scope>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeHub::V1::Scope>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/gke_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeHub::V1::ListPermittedScopesRequest.new - # - # # Call the list_permitted_scopes method. - # result = client.list_permitted_scopes 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::GkeHub::V1::Scope. - # p item - # end - # - def list_permitted_scopes request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::ListPermittedScopesRequest - - # 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_permitted_scopes.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::GkeHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_permitted_scopes.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_permitted_scopes.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gke_hub_stub.list_permitted_scopes request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @gke_hub_stub, :list_permitted_scopes, "scopes", 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 - - ## - # Returns the details of a MembershipBinding. - # - # @overload get_membership_binding(request, options = nil) - # Pass arguments to `get_membership_binding` via a request object, either of type - # {::Google::Cloud::GkeHub::V1::GetMembershipBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeHub::V1::GetMembershipBindingRequest, ::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_membership_binding(name: nil) - # Pass arguments to `get_membership_binding` 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 MembershipBinding resource name in the format - # `projects/*/locations/*/memberships/*/bindings/*`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::GkeHub::V1::MembershipBinding] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GkeHub::V1::MembershipBinding] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/gke_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeHub::V1::GetMembershipBindingRequest.new - # - # # Call the get_membership_binding method. - # result = client.get_membership_binding request - # - # # The returned object is of type Google::Cloud::GkeHub::V1::MembershipBinding. - # p result - # - def get_membership_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::GetMembershipBindingRequest - - # 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_membership_binding.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::GkeHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_membership_binding.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_membership_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gke_hub_stub.get_membership_binding request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a MembershipBinding. - # - # @overload create_membership_binding(request, options = nil) - # Pass arguments to `create_membership_binding` via a request object, either of type - # {::Google::Cloud::GkeHub::V1::CreateMembershipBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeHub::V1::CreateMembershipBindingRequest, ::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_membership_binding(parent: nil, membership_binding: nil, membership_binding_id: nil) - # Pass arguments to `create_membership_binding` 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 (project and location) where the MembershipBinding - # will be created. Specified in the format - # `projects/*/locations/*/memberships/*`. - # @param membership_binding [::Google::Cloud::GkeHub::V1::MembershipBinding, ::Hash] - # Required. The MembershipBinding to create. - # @param membership_binding_id [::String] - # Required. The ID to use for the MembershipBinding. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/gke_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeHub::V1::CreateMembershipBindingRequest.new - # - # # Call the create_membership_binding method. - # result = client.create_membership_binding request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_membership_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::CreateMembershipBindingRequest - - # 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_membership_binding.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::GkeHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_membership_binding.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_membership_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gke_hub_stub.create_membership_binding request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a MembershipBinding. - # - # @overload update_membership_binding(request, options = nil) - # Pass arguments to `update_membership_binding` via a request object, either of type - # {::Google::Cloud::GkeHub::V1::UpdateMembershipBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeHub::V1::UpdateMembershipBindingRequest, ::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_membership_binding(membership_binding: nil, update_mask: nil) - # Pass arguments to `update_membership_binding` 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 membership_binding [::Google::Cloud::GkeHub::V1::MembershipBinding, ::Hash] - # Required. The MembershipBinding object with fields updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The fields to be updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/gke_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeHub::V1::UpdateMembershipBindingRequest.new - # - # # Call the update_membership_binding method. - # result = client.update_membership_binding request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_membership_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::UpdateMembershipBindingRequest - - # 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_membership_binding.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::GkeHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_membership_binding.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_membership_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gke_hub_stub.update_membership_binding request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 a MembershipBinding. - # - # @overload delete_membership_binding(request, options = nil) - # Pass arguments to `delete_membership_binding` via a request object, either of type - # {::Google::Cloud::GkeHub::V1::DeleteMembershipBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeHub::V1::DeleteMembershipBindingRequest, ::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_membership_binding(name: nil) - # Pass arguments to `delete_membership_binding` 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 MembershipBinding resource name in the format - # `projects/*/locations/*/memberships/*/bindings/*`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/gke_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeHub::V1::DeleteMembershipBindingRequest.new - # - # # Call the delete_membership_binding method. - # result = client.delete_membership_binding request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_membership_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::DeleteMembershipBindingRequest - - # 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_membership_binding.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::GkeHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_membership_binding.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_membership_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gke_hub_stub.delete_membership_binding request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists MembershipBindings. - # - # @overload list_membership_bindings(request, options = nil) - # Pass arguments to `list_membership_bindings` via a request object, either of type - # {::Google::Cloud::GkeHub::V1::ListMembershipBindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeHub::V1::ListMembershipBindingsRequest, ::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_membership_bindings(parent: nil, page_size: nil, page_token: nil, filter: nil) - # Pass arguments to `list_membership_bindings` 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 Membership for which the MembershipBindings will be - # listed. Specified in the format `projects/*/locations/*/memberships/*`. - # @param page_size [::Integer] - # Optional. When requesting a 'page' of resources, `page_size` specifies - # number of resources to return. If unspecified or set to 0, all resources - # will be returned. - # @param page_token [::String] - # Optional. Token returned by previous call to `ListMembershipBindings` which - # specifies the position in the list from where to continue listing the - # resources. - # @param filter [::String] - # Optional. Lists MembershipBindings that match the filter expression, - # following the syntax outlined in https://google.aip.dev/160. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeHub::V1::MembershipBinding>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeHub::V1::MembershipBinding>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/gke_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeHub::V1::ListMembershipBindingsRequest.new - # - # # Call the list_membership_bindings method. - # result = client.list_membership_bindings 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::GkeHub::V1::MembershipBinding. - # p item - # end - # - def list_membership_bindings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::ListMembershipBindingsRequest - - # 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_membership_bindings.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::GkeHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_membership_bindings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_membership_bindings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gke_hub_stub.list_membership_bindings request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @gke_hub_stub, :list_membership_bindings, "membership_bindings", 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 - - ## - # Returns the details of a Membership RBACRoleBinding. - # - # @overload get_membership_rbac_role_binding(request, options = nil) - # Pass arguments to `get_membership_rbac_role_binding` via a request object, either of type - # {::Google::Cloud::GkeHub::V1::GetMembershipRBACRoleBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeHub::V1::GetMembershipRBACRoleBindingRequest, ::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_membership_rbac_role_binding(name: nil) - # Pass arguments to `get_membership_rbac_role_binding` 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 RBACRoleBinding resource name in the format - # `projects/*/locations/*/memberships/*/rbacrolebindings/*`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::GkeHub::V1::RBACRoleBinding] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GkeHub::V1::RBACRoleBinding] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/gke_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeHub::V1::GetMembershipRBACRoleBindingRequest.new - # - # # Call the get_membership_rbac_role_binding method. - # result = client.get_membership_rbac_role_binding request - # - # # The returned object is of type Google::Cloud::GkeHub::V1::RBACRoleBinding. - # p result - # - def get_membership_rbac_role_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::GetMembershipRBACRoleBindingRequest - - # 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_membership_rbac_role_binding.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::GkeHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_membership_rbac_role_binding.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_membership_rbac_role_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gke_hub_stub.get_membership_rbac_role_binding request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Creates a Membership RBACRoleBinding. - # - # @overload create_membership_rbac_role_binding(request, options = nil) - # Pass arguments to `create_membership_rbac_role_binding` via a request object, either of type - # {::Google::Cloud::GkeHub::V1::CreateMembershipRBACRoleBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeHub::V1::CreateMembershipRBACRoleBindingRequest, ::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_membership_rbac_role_binding(parent: nil, rbacrolebinding_id: nil, rbacrolebinding: nil) - # Pass arguments to `create_membership_rbac_role_binding` 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 (project and location) where the RBACRoleBinding will - # be created. Specified in the format `projects/*/locations/*/memberships/*`. - # @param rbacrolebinding_id [::String] - # Required. Client chosen ID for the RBACRoleBinding. `rbacrolebinding_id` - # must be a valid RFC 1123 compliant DNS label: - # - # 1. At most 63 characters in length - # 2. It must consist of lower case alphanumeric characters or `-` - # 3. It must start and end with an alphanumeric character - # - # Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, - # with a maximum length of 63 characters. - # @param rbacrolebinding [::Google::Cloud::GkeHub::V1::RBACRoleBinding, ::Hash] - # Required. The rbacrolebindings to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/gke_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeHub::V1::CreateMembershipRBACRoleBindingRequest.new - # - # # Call the create_membership_rbac_role_binding method. - # result = client.create_membership_rbac_role_binding request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_membership_rbac_role_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::CreateMembershipRBACRoleBindingRequest - - # 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_membership_rbac_role_binding.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::GkeHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.create_membership_rbac_role_binding.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_membership_rbac_role_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gke_hub_stub.create_membership_rbac_role_binding request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a Membership RBACRoleBinding. - # - # @overload update_membership_rbac_role_binding(request, options = nil) - # Pass arguments to `update_membership_rbac_role_binding` via a request object, either of type - # {::Google::Cloud::GkeHub::V1::UpdateMembershipRBACRoleBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeHub::V1::UpdateMembershipRBACRoleBindingRequest, ::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_membership_rbac_role_binding(rbacrolebinding: nil, update_mask: nil) - # Pass arguments to `update_membership_rbac_role_binding` 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 rbacrolebinding [::Google::Cloud::GkeHub::V1::RBACRoleBinding, ::Hash] - # Required. A rbacrolebinding with fields updated. The 'name' field in this - # rbacrolebinding is used to identify the resource to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The fields to be updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/gke_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeHub::V1::UpdateMembershipRBACRoleBindingRequest.new - # - # # Call the update_membership_rbac_role_binding method. - # result = client.update_membership_rbac_role_binding request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_membership_rbac_role_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::UpdateMembershipRBACRoleBindingRequest - - # 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_membership_rbac_role_binding.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::GkeHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_membership_rbac_role_binding.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_membership_rbac_role_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gke_hub_stub.update_membership_rbac_role_binding request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 a Membership RBACRoleBinding. - # - # @overload delete_membership_rbac_role_binding(request, options = nil) - # Pass arguments to `delete_membership_rbac_role_binding` via a request object, either of type - # {::Google::Cloud::GkeHub::V1::DeleteMembershipRBACRoleBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeHub::V1::DeleteMembershipRBACRoleBindingRequest, ::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_membership_rbac_role_binding(name: nil) - # Pass arguments to `delete_membership_rbac_role_binding` 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 RBACRoleBinding resource name in the format - # `projects/*/locations/*/memberships/*/rbacrolebindings/*`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/gke_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeHub::V1::DeleteMembershipRBACRoleBindingRequest.new - # - # # Call the delete_membership_rbac_role_binding method. - # result = client.delete_membership_rbac_role_binding request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_membership_rbac_role_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::DeleteMembershipRBACRoleBindingRequest - - # 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_membership_rbac_role_binding.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::GkeHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_membership_rbac_role_binding.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_membership_rbac_role_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gke_hub_stub.delete_membership_rbac_role_binding request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists all Membership RBACRoleBindings. - # - # @overload list_membership_rbac_role_bindings(request, options = nil) - # Pass arguments to `list_membership_rbac_role_bindings` via a request object, either of type - # {::Google::Cloud::GkeHub::V1::ListMembershipRBACRoleBindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeHub::V1::ListMembershipRBACRoleBindingsRequest, ::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_membership_rbac_role_bindings(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_membership_rbac_role_bindings` 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 (project and location) where the Features will be - # listed. Specified in the format `projects/*/locations/*/memberships/*`. - # @param page_size [::Integer] - # Optional. When requesting a 'page' of resources, `page_size` specifies - # number of resources to return. If unspecified or set to 0, all resources - # will be returned. - # @param page_token [::String] - # Optional. Token returned by previous call to - # `ListMembershipRBACRoleBindings` which specifies the position in the list - # from where to continue listing the resources. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeHub::V1::RBACRoleBinding>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeHub::V1::RBACRoleBinding>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/gke_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeHub::V1::ListMembershipRBACRoleBindingsRequest.new - # - # # Call the list_membership_rbac_role_bindings method. - # result = client.list_membership_rbac_role_bindings 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::GkeHub::V1::RBACRoleBinding. - # p item - # end - # - def list_membership_rbac_role_bindings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::ListMembershipRBACRoleBindingsRequest - - # 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_membership_rbac_role_bindings.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::GkeHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_membership_rbac_role_bindings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_membership_rbac_role_bindings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gke_hub_stub.list_membership_rbac_role_bindings request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @gke_hub_stub, :list_membership_rbac_role_bindings, "rbacrolebindings", 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 - - ## - # Generates a YAML of the RBAC policies for the specified - # RoleBinding and its associated impersonation resources. - # - # @overload generate_membership_rbac_role_binding_yaml(request, options = nil) - # Pass arguments to `generate_membership_rbac_role_binding_yaml` via a request object, either of type - # {::Google::Cloud::GkeHub::V1::GenerateMembershipRBACRoleBindingYAMLRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeHub::V1::GenerateMembershipRBACRoleBindingYAMLRequest, ::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 generate_membership_rbac_role_binding_yaml(parent: nil, rbacrolebinding_id: nil, rbacrolebinding: nil) - # Pass arguments to `generate_membership_rbac_role_binding_yaml` 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 (project and location) where the RBACRoleBinding will - # be created. Specified in the format `projects/*/locations/*/memberships/*`. - # @param rbacrolebinding_id [::String] - # Required. Client chosen ID for the RBACRoleBinding. `rbacrolebinding_id` - # must be a valid RFC 1123 compliant DNS label: - # - # 1. At most 63 characters in length - # 2. It must consist of lower case alphanumeric characters or `-` - # 3. It must start and end with an alphanumeric character - # - # Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, - # with a maximum length of 63 characters. - # @param rbacrolebinding [::Google::Cloud::GkeHub::V1::RBACRoleBinding, ::Hash] - # Required. The rbacrolebindings to generate the YAML for. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::GkeHub::V1::GenerateMembershipRBACRoleBindingYAMLResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GkeHub::V1::GenerateMembershipRBACRoleBindingYAMLResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/gke_hub/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeHub::V1::GenerateMembershipRBACRoleBindingYAMLRequest.new - # - # # Call the generate_membership_rbac_role_binding_yaml method. - # result = client.generate_membership_rbac_role_binding_yaml request - # - # # The returned object is of type Google::Cloud::GkeHub::V1::GenerateMembershipRBACRoleBindingYAMLResponse. - # p result - # - def generate_membership_rbac_role_binding_yaml request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeHub::V1::GenerateMembershipRBACRoleBindingYAMLRequest - - # 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.generate_membership_rbac_role_binding_yaml.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::GkeHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.generate_membership_rbac_role_binding_yaml.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.generate_membership_rbac_role_binding_yaml.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gke_hub_stub.generate_membership_rbac_role_binding_yaml 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 GkeHub REST API. - # - # This class represents the configuration for GkeHub 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::GkeHub::V1::GkeHub::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_memberships to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_memberships.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_memberships.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. - # * `: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 = "gkehub.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the GkeHub 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. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_memberships` - # @return [::Gapic::Config::Method] - # - attr_reader :list_memberships - ## - # RPC-specific configuration for `list_bound_memberships` - # @return [::Gapic::Config::Method] - # - attr_reader :list_bound_memberships - ## - # RPC-specific configuration for `list_features` - # @return [::Gapic::Config::Method] - # - attr_reader :list_features - ## - # RPC-specific configuration for `get_membership` - # @return [::Gapic::Config::Method] - # - attr_reader :get_membership - ## - # RPC-specific configuration for `get_feature` - # @return [::Gapic::Config::Method] - # - attr_reader :get_feature - ## - # RPC-specific configuration for `create_membership` - # @return [::Gapic::Config::Method] - # - attr_reader :create_membership - ## - # RPC-specific configuration for `create_feature` - # @return [::Gapic::Config::Method] - # - attr_reader :create_feature - ## - # RPC-specific configuration for `delete_membership` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_membership - ## - # RPC-specific configuration for `delete_feature` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_feature - ## - # RPC-specific configuration for `update_membership` - # @return [::Gapic::Config::Method] - # - attr_reader :update_membership - ## - # RPC-specific configuration for `update_feature` - # @return [::Gapic::Config::Method] - # - attr_reader :update_feature - ## - # RPC-specific configuration for `generate_connect_manifest` - # @return [::Gapic::Config::Method] - # - attr_reader :generate_connect_manifest - ## - # RPC-specific configuration for `create_fleet` - # @return [::Gapic::Config::Method] - # - attr_reader :create_fleet - ## - # RPC-specific configuration for `get_fleet` - # @return [::Gapic::Config::Method] - # - attr_reader :get_fleet - ## - # RPC-specific configuration for `update_fleet` - # @return [::Gapic::Config::Method] - # - attr_reader :update_fleet - ## - # RPC-specific configuration for `delete_fleet` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_fleet - ## - # RPC-specific configuration for `list_fleets` - # @return [::Gapic::Config::Method] - # - attr_reader :list_fleets - ## - # RPC-specific configuration for `get_scope_namespace` - # @return [::Gapic::Config::Method] - # - attr_reader :get_scope_namespace - ## - # RPC-specific configuration for `create_scope_namespace` - # @return [::Gapic::Config::Method] - # - attr_reader :create_scope_namespace - ## - # RPC-specific configuration for `update_scope_namespace` - # @return [::Gapic::Config::Method] - # - attr_reader :update_scope_namespace - ## - # RPC-specific configuration for `delete_scope_namespace` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_scope_namespace - ## - # RPC-specific configuration for `list_scope_namespaces` - # @return [::Gapic::Config::Method] - # - attr_reader :list_scope_namespaces - ## - # RPC-specific configuration for `get_scope_rbac_role_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :get_scope_rbac_role_binding - ## - # RPC-specific configuration for `create_scope_rbac_role_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :create_scope_rbac_role_binding - ## - # RPC-specific configuration for `update_scope_rbac_role_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :update_scope_rbac_role_binding - ## - # RPC-specific configuration for `delete_scope_rbac_role_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_scope_rbac_role_binding - ## - # RPC-specific configuration for `list_scope_rbac_role_bindings` - # @return [::Gapic::Config::Method] - # - attr_reader :list_scope_rbac_role_bindings - ## - # RPC-specific configuration for `get_scope` - # @return [::Gapic::Config::Method] - # - attr_reader :get_scope - ## - # RPC-specific configuration for `create_scope` - # @return [::Gapic::Config::Method] - # - attr_reader :create_scope - ## - # RPC-specific configuration for `update_scope` - # @return [::Gapic::Config::Method] - # - attr_reader :update_scope - ## - # RPC-specific configuration for `delete_scope` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_scope - ## - # RPC-specific configuration for `list_scopes` - # @return [::Gapic::Config::Method] - # - attr_reader :list_scopes - ## - # RPC-specific configuration for `list_permitted_scopes` - # @return [::Gapic::Config::Method] - # - attr_reader :list_permitted_scopes - ## - # RPC-specific configuration for `get_membership_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :get_membership_binding - ## - # RPC-specific configuration for `create_membership_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :create_membership_binding - ## - # RPC-specific configuration for `update_membership_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :update_membership_binding - ## - # RPC-specific configuration for `delete_membership_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_membership_binding - ## - # RPC-specific configuration for `list_membership_bindings` - # @return [::Gapic::Config::Method] - # - attr_reader :list_membership_bindings - ## - # RPC-specific configuration for `get_membership_rbac_role_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :get_membership_rbac_role_binding - ## - # RPC-specific configuration for `create_membership_rbac_role_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :create_membership_rbac_role_binding - ## - # RPC-specific configuration for `update_membership_rbac_role_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :update_membership_rbac_role_binding - ## - # RPC-specific configuration for `delete_membership_rbac_role_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_membership_rbac_role_binding - ## - # RPC-specific configuration for `list_membership_rbac_role_bindings` - # @return [::Gapic::Config::Method] - # - attr_reader :list_membership_rbac_role_bindings - ## - # RPC-specific configuration for `generate_membership_rbac_role_binding_yaml` - # @return [::Gapic::Config::Method] - # - attr_reader :generate_membership_rbac_role_binding_yaml - - # @private - def initialize parent_rpcs = nil - list_memberships_config = parent_rpcs.list_memberships if parent_rpcs.respond_to? :list_memberships - @list_memberships = ::Gapic::Config::Method.new list_memberships_config - list_bound_memberships_config = parent_rpcs.list_bound_memberships if parent_rpcs.respond_to? :list_bound_memberships - @list_bound_memberships = ::Gapic::Config::Method.new list_bound_memberships_config - list_features_config = parent_rpcs.list_features if parent_rpcs.respond_to? :list_features - @list_features = ::Gapic::Config::Method.new list_features_config - get_membership_config = parent_rpcs.get_membership if parent_rpcs.respond_to? :get_membership - @get_membership = ::Gapic::Config::Method.new get_membership_config - get_feature_config = parent_rpcs.get_feature if parent_rpcs.respond_to? :get_feature - @get_feature = ::Gapic::Config::Method.new get_feature_config - create_membership_config = parent_rpcs.create_membership if parent_rpcs.respond_to? :create_membership - @create_membership = ::Gapic::Config::Method.new create_membership_config - create_feature_config = parent_rpcs.create_feature if parent_rpcs.respond_to? :create_feature - @create_feature = ::Gapic::Config::Method.new create_feature_config - delete_membership_config = parent_rpcs.delete_membership if parent_rpcs.respond_to? :delete_membership - @delete_membership = ::Gapic::Config::Method.new delete_membership_config - delete_feature_config = parent_rpcs.delete_feature if parent_rpcs.respond_to? :delete_feature - @delete_feature = ::Gapic::Config::Method.new delete_feature_config - update_membership_config = parent_rpcs.update_membership if parent_rpcs.respond_to? :update_membership - @update_membership = ::Gapic::Config::Method.new update_membership_config - update_feature_config = parent_rpcs.update_feature if parent_rpcs.respond_to? :update_feature - @update_feature = ::Gapic::Config::Method.new update_feature_config - generate_connect_manifest_config = parent_rpcs.generate_connect_manifest if parent_rpcs.respond_to? :generate_connect_manifest - @generate_connect_manifest = ::Gapic::Config::Method.new generate_connect_manifest_config - create_fleet_config = parent_rpcs.create_fleet if parent_rpcs.respond_to? :create_fleet - @create_fleet = ::Gapic::Config::Method.new create_fleet_config - get_fleet_config = parent_rpcs.get_fleet if parent_rpcs.respond_to? :get_fleet - @get_fleet = ::Gapic::Config::Method.new get_fleet_config - update_fleet_config = parent_rpcs.update_fleet if parent_rpcs.respond_to? :update_fleet - @update_fleet = ::Gapic::Config::Method.new update_fleet_config - delete_fleet_config = parent_rpcs.delete_fleet if parent_rpcs.respond_to? :delete_fleet - @delete_fleet = ::Gapic::Config::Method.new delete_fleet_config - list_fleets_config = parent_rpcs.list_fleets if parent_rpcs.respond_to? :list_fleets - @list_fleets = ::Gapic::Config::Method.new list_fleets_config - get_scope_namespace_config = parent_rpcs.get_scope_namespace if parent_rpcs.respond_to? :get_scope_namespace - @get_scope_namespace = ::Gapic::Config::Method.new get_scope_namespace_config - create_scope_namespace_config = parent_rpcs.create_scope_namespace if parent_rpcs.respond_to? :create_scope_namespace - @create_scope_namespace = ::Gapic::Config::Method.new create_scope_namespace_config - update_scope_namespace_config = parent_rpcs.update_scope_namespace if parent_rpcs.respond_to? :update_scope_namespace - @update_scope_namespace = ::Gapic::Config::Method.new update_scope_namespace_config - delete_scope_namespace_config = parent_rpcs.delete_scope_namespace if parent_rpcs.respond_to? :delete_scope_namespace - @delete_scope_namespace = ::Gapic::Config::Method.new delete_scope_namespace_config - list_scope_namespaces_config = parent_rpcs.list_scope_namespaces if parent_rpcs.respond_to? :list_scope_namespaces - @list_scope_namespaces = ::Gapic::Config::Method.new list_scope_namespaces_config - get_scope_rbac_role_binding_config = parent_rpcs.get_scope_rbac_role_binding if parent_rpcs.respond_to? :get_scope_rbac_role_binding - @get_scope_rbac_role_binding = ::Gapic::Config::Method.new get_scope_rbac_role_binding_config - create_scope_rbac_role_binding_config = parent_rpcs.create_scope_rbac_role_binding if parent_rpcs.respond_to? :create_scope_rbac_role_binding - @create_scope_rbac_role_binding = ::Gapic::Config::Method.new create_scope_rbac_role_binding_config - update_scope_rbac_role_binding_config = parent_rpcs.update_scope_rbac_role_binding if parent_rpcs.respond_to? :update_scope_rbac_role_binding - @update_scope_rbac_role_binding = ::Gapic::Config::Method.new update_scope_rbac_role_binding_config - delete_scope_rbac_role_binding_config = parent_rpcs.delete_scope_rbac_role_binding if parent_rpcs.respond_to? :delete_scope_rbac_role_binding - @delete_scope_rbac_role_binding = ::Gapic::Config::Method.new delete_scope_rbac_role_binding_config - list_scope_rbac_role_bindings_config = parent_rpcs.list_scope_rbac_role_bindings if parent_rpcs.respond_to? :list_scope_rbac_role_bindings - @list_scope_rbac_role_bindings = ::Gapic::Config::Method.new list_scope_rbac_role_bindings_config - get_scope_config = parent_rpcs.get_scope if parent_rpcs.respond_to? :get_scope - @get_scope = ::Gapic::Config::Method.new get_scope_config - create_scope_config = parent_rpcs.create_scope if parent_rpcs.respond_to? :create_scope - @create_scope = ::Gapic::Config::Method.new create_scope_config - update_scope_config = parent_rpcs.update_scope if parent_rpcs.respond_to? :update_scope - @update_scope = ::Gapic::Config::Method.new update_scope_config - delete_scope_config = parent_rpcs.delete_scope if parent_rpcs.respond_to? :delete_scope - @delete_scope = ::Gapic::Config::Method.new delete_scope_config - list_scopes_config = parent_rpcs.list_scopes if parent_rpcs.respond_to? :list_scopes - @list_scopes = ::Gapic::Config::Method.new list_scopes_config - list_permitted_scopes_config = parent_rpcs.list_permitted_scopes if parent_rpcs.respond_to? :list_permitted_scopes - @list_permitted_scopes = ::Gapic::Config::Method.new list_permitted_scopes_config - get_membership_binding_config = parent_rpcs.get_membership_binding if parent_rpcs.respond_to? :get_membership_binding - @get_membership_binding = ::Gapic::Config::Method.new get_membership_binding_config - create_membership_binding_config = parent_rpcs.create_membership_binding if parent_rpcs.respond_to? :create_membership_binding - @create_membership_binding = ::Gapic::Config::Method.new create_membership_binding_config - update_membership_binding_config = parent_rpcs.update_membership_binding if parent_rpcs.respond_to? :update_membership_binding - @update_membership_binding = ::Gapic::Config::Method.new update_membership_binding_config - delete_membership_binding_config = parent_rpcs.delete_membership_binding if parent_rpcs.respond_to? :delete_membership_binding - @delete_membership_binding = ::Gapic::Config::Method.new delete_membership_binding_config - list_membership_bindings_config = parent_rpcs.list_membership_bindings if parent_rpcs.respond_to? :list_membership_bindings - @list_membership_bindings = ::Gapic::Config::Method.new list_membership_bindings_config - get_membership_rbac_role_binding_config = parent_rpcs.get_membership_rbac_role_binding if parent_rpcs.respond_to? :get_membership_rbac_role_binding - @get_membership_rbac_role_binding = ::Gapic::Config::Method.new get_membership_rbac_role_binding_config - create_membership_rbac_role_binding_config = parent_rpcs.create_membership_rbac_role_binding if parent_rpcs.respond_to? :create_membership_rbac_role_binding - @create_membership_rbac_role_binding = ::Gapic::Config::Method.new create_membership_rbac_role_binding_config - update_membership_rbac_role_binding_config = parent_rpcs.update_membership_rbac_role_binding if parent_rpcs.respond_to? :update_membership_rbac_role_binding - @update_membership_rbac_role_binding = ::Gapic::Config::Method.new update_membership_rbac_role_binding_config - delete_membership_rbac_role_binding_config = parent_rpcs.delete_membership_rbac_role_binding if parent_rpcs.respond_to? :delete_membership_rbac_role_binding - @delete_membership_rbac_role_binding = ::Gapic::Config::Method.new delete_membership_rbac_role_binding_config - list_membership_rbac_role_bindings_config = parent_rpcs.list_membership_rbac_role_bindings if parent_rpcs.respond_to? :list_membership_rbac_role_bindings - @list_membership_rbac_role_bindings = ::Gapic::Config::Method.new list_membership_rbac_role_bindings_config - generate_membership_rbac_role_binding_yaml_config = parent_rpcs.generate_membership_rbac_role_binding_yaml if parent_rpcs.respond_to? :generate_membership_rbac_role_binding_yaml - @generate_membership_rbac_role_binding_yaml = ::Gapic::Config::Method.new generate_membership_rbac_role_binding_yaml_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub/rest/operations.rb b/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub/rest/operations.rb deleted file mode 100644 index 88effee52dde..000000000000 --- a/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub/rest/operations.rb +++ /dev/null @@ -1,925 +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/operation" - -module Google - module Cloud - module GkeHub - module V1 - module GkeHub - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "gkehub.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the GkeHub Operations API. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def self.configure - @configure ||= Operations::Configuration.new - yield @configure if block_given? - @configure - end - - ## - # Configure the GkeHub Operations 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 {Operations.configure}. - # - # @yield [config] Configure the Operations client. - # @yieldparam config [Operations::Configuration] - # - # @return [Operations::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @operations_stub.universe_domain - end - - ## - # Create a new Operations client object. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Operations::Configuration] - # - def initialize - # Create the configuration object - @config = Configuration.new Operations.configure - - # Yield the configuration if needed - yield @config if block_given? - - # Create credentials - credentials = @config.credentials - credentials ||= Credentials.default scope: @config.scope - 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 - - @operations_stub = OperationsServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials - ) - - # Used by an LRO wrapper for some methods of this service - @operations_client = self - end - - # Service calls - - ## - # Lists operations that match the specified filter in the request. If the - # server doesn't support this method, it returns `UNIMPLEMENTED`. - # - # @overload list_operations(request, options = nil) - # Pass arguments to `list_operations` via a request object, either of type - # {::Google::Longrunning::ListOperationsRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::ListOperationsRequest, ::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_operations(name: nil, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil) - # Pass arguments to `list_operations` 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] - # The name of the operation's parent resource. - # @param filter [::String] - # The standard list filter. - # @param page_size [::Integer] - # The standard list page size. - # @param page_token [::String] - # The standard list page token. - # @param return_partial_success [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::ListOperationsRequest.new - # - # # Call the list_operations method. - # result = client.list_operations 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::Longrunning::Operation. - # p item - # end - # - def list_operations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::ListOperationsRequest - - # 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_operations.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::GkeHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_operations.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_operations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.list_operations request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the latest state of a long-running operation. Clients can use this - # method to poll the operation result at intervals as recommended by the API - # service. - # - # @overload get_operation(request, options = nil) - # Pass arguments to `get_operation` via a request object, either of type - # {::Google::Longrunning::GetOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::GetOperationRequest, ::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_operation(name: nil) - # Pass arguments to `get_operation` 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] - # The name of the operation resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::GetOperationRequest.new - # - # # Call the get_operation method. - # result = client.get_operation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def get_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::GetOperationRequest - - # 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_operation.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::GkeHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.get_operation request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 a long-running operation. This method indicates that the client is - # no longer interested in the operation result. It does not cancel the - # operation. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. - # - # @overload delete_operation(request, options = nil) - # Pass arguments to `delete_operation` via a request object, either of type - # {::Google::Longrunning::DeleteOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::DeleteOperationRequest, ::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_operation(name: nil) - # Pass arguments to `delete_operation` 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] - # The name of the operation resource to be deleted. - # @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/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::DeleteOperationRequest.new - # - # # Call the delete_operation method. - # result = client.delete_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::DeleteOperationRequest - - # 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_operation.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::GkeHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.delete_operation 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 - - ## - # Starts asynchronous cancellation on a long-running operation. The server - # makes a best effort to cancel the operation, but success is not - # guaranteed. If the server doesn't support this method, it returns - # `google.rpc.Code.UNIMPLEMENTED`. Clients can use - # Operations.GetOperation or - # other methods to check whether the cancellation succeeded or whether the - # operation completed despite cancellation. On successful cancellation, - # the operation is not deleted; instead, it becomes an operation with - # an {::Google::Longrunning::Operation#error Operation.error} value with a - # {::Google::Rpc::Status#code google.rpc.Status.code} of `1`, corresponding to - # `Code.CANCELLED`. - # - # @overload cancel_operation(request, options = nil) - # Pass arguments to `cancel_operation` via a request object, either of type - # {::Google::Longrunning::CancelOperationRequest} or an equivalent Hash. - # - # @param request [::Google::Longrunning::CancelOperationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload cancel_operation(name: nil) - # Pass arguments to `cancel_operation` 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] - # The name of the operation resource to be cancelled. - # @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/longrunning" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Longrunning::Operations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Longrunning::CancelOperationRequest.new - # - # # Call the cancel_operation method. - # result = client.cancel_operation request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def cancel_operation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Longrunning::CancelOperationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.cancel_operation.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::GkeHub::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.cancel_operation 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 Operations REST API. - # - # This class represents the configuration for Operations 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::Longrunning::Operations::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.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. - # * `: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 = "gkehub.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the Operations 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. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - - yield self if block_given? - end - end - end - end - - ## - # @private - # REST service stub for the Longrunning Operations API. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - class OperationsServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # 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 - end - - ## - # Baseline implementation for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # 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::Longrunning::ListOperationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::ListOperationsResponse] - # A result object deserialized from the server's reply - def list_operations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_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_operations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::ListOperationsResponse.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_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # 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::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def get_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_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_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.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_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # 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_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_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_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # 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 cancel_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "cancel_operation", - 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 list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # 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_operations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}/operations", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # 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_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # 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_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub/rest/service_stub.rb b/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub/rest/service_stub.rb deleted file mode 100644 index b86f38e328bc..000000000000 --- a/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/gke_hub/rest/service_stub.rb +++ /dev/null @@ -1,2789 +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/gkehub/v1/service_pb" - -module Google - module Cloud - module GkeHub - module V1 - module GkeHub - module Rest - ## - # REST service stub for the GkeHub service. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - # - class ServiceStub - # @private - def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials, - numeric_enums: true, - service_name: self.class, - raise_faraday_errors: false, - logger: logger - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @client_stub.universe_domain - end - - ## - # The effective endpoint - # - # @return [String] - # - def endpoint - @client_stub.endpoint - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger stub: false - stub ? @client_stub.stub_logger : @client_stub.logger - end - - ## - # Baseline implementation for the list_memberships REST call - # - # @param request_pb [::Google::Cloud::GkeHub::V1::ListMembershipsRequest] - # 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::GkeHub::V1::ListMembershipsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GkeHub::V1::ListMembershipsResponse] - # A result object deserialized from the server's reply - def list_memberships request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_memberships_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_memberships", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::GkeHub::V1::ListMembershipsResponse.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_bound_memberships REST call - # - # @param request_pb [::Google::Cloud::GkeHub::V1::ListBoundMembershipsRequest] - # 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::GkeHub::V1::ListBoundMembershipsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GkeHub::V1::ListBoundMembershipsResponse] - # A result object deserialized from the server's reply - def list_bound_memberships request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_bound_memberships_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_bound_memberships", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::GkeHub::V1::ListBoundMembershipsResponse.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_features REST call - # - # @param request_pb [::Google::Cloud::GkeHub::V1::ListFeaturesRequest] - # 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::GkeHub::V1::ListFeaturesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GkeHub::V1::ListFeaturesResponse] - # A result object deserialized from the server's reply - def list_features request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_features_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_features", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::GkeHub::V1::ListFeaturesResponse.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_membership REST call - # - # @param request_pb [::Google::Cloud::GkeHub::V1::GetMembershipRequest] - # 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::GkeHub::V1::Membership] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GkeHub::V1::Membership] - # A result object deserialized from the server's reply - def get_membership request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_membership_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_membership", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::GkeHub::V1::Membership.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_feature REST call - # - # @param request_pb [::Google::Cloud::GkeHub::V1::GetFeatureRequest] - # 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::GkeHub::V1::Feature] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GkeHub::V1::Feature] - # A result object deserialized from the server's reply - def get_feature request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_feature_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_feature", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::GkeHub::V1::Feature.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_membership REST call - # - # @param request_pb [::Google::Cloud::GkeHub::V1::CreateMembershipRequest] - # 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::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_membership request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_membership_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_membership", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.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_feature REST call - # - # @param request_pb [::Google::Cloud::GkeHub::V1::CreateFeatureRequest] - # 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::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_feature request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_feature_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_feature", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.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_membership REST call - # - # @param request_pb [::Google::Cloud::GkeHub::V1::DeleteMembershipRequest] - # 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::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_membership request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_membership_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_membership", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.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_feature REST call - # - # @param request_pb [::Google::Cloud::GkeHub::V1::DeleteFeatureRequest] - # 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::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_feature request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_feature_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_feature", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.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_membership REST call - # - # @param request_pb [::Google::Cloud::GkeHub::V1::UpdateMembershipRequest] - # 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::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def update_membership request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_membership_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_membership", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.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_feature REST call - # - # @param request_pb [::Google::Cloud::GkeHub::V1::UpdateFeatureRequest] - # 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::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def update_feature request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_feature_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_feature", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the generate_connect_manifest REST call - # - # @param request_pb [::Google::Cloud::GkeHub::V1::GenerateConnectManifestRequest] - # 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::GkeHub::V1::GenerateConnectManifestResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GkeHub::V1::GenerateConnectManifestResponse] - # A result object deserialized from the server's reply - def generate_connect_manifest request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_generate_connect_manifest_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: "generate_connect_manifest", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::GkeHub::V1::GenerateConnectManifestResponse.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_fleet REST call - # - # @param request_pb [::Google::Cloud::GkeHub::V1::CreateFleetRequest] - # 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::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_fleet request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_fleet_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_fleet", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.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_fleet REST call - # - # @param request_pb [::Google::Cloud::GkeHub::V1::GetFleetRequest] - # 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::GkeHub::V1::Fleet] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GkeHub::V1::Fleet] - # A result object deserialized from the server's reply - def get_fleet request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_fleet_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_fleet", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::GkeHub::V1::Fleet.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_fleet REST call - # - # @param request_pb [::Google::Cloud::GkeHub::V1::UpdateFleetRequest] - # 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::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def update_fleet request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_fleet_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_fleet", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.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_fleet REST call - # - # @param request_pb [::Google::Cloud::GkeHub::V1::DeleteFleetRequest] - # 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::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_fleet request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_fleet_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_fleet", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.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_fleets REST call - # - # @param request_pb [::Google::Cloud::GkeHub::V1::ListFleetsRequest] - # 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::GkeHub::V1::ListFleetsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GkeHub::V1::ListFleetsResponse] - # A result object deserialized from the server's reply - def list_fleets request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_fleets_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_fleets", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::GkeHub::V1::ListFleetsResponse.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_scope_namespace REST call - # - # @param request_pb [::Google::Cloud::GkeHub::V1::GetScopeNamespaceRequest] - # 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::GkeHub::V1::Namespace] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GkeHub::V1::Namespace] - # A result object deserialized from the server's reply - def get_scope_namespace request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_scope_namespace_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_scope_namespace", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::GkeHub::V1::Namespace.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_scope_namespace REST call - # - # @param request_pb [::Google::Cloud::GkeHub::V1::CreateScopeNamespaceRequest] - # 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::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_scope_namespace request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_scope_namespace_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_scope_namespace", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.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_scope_namespace REST call - # - # @param request_pb [::Google::Cloud::GkeHub::V1::UpdateScopeNamespaceRequest] - # 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::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def update_scope_namespace request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_scope_namespace_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_scope_namespace", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.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_scope_namespace REST call - # - # @param request_pb [::Google::Cloud::GkeHub::V1::DeleteScopeNamespaceRequest] - # 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::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_scope_namespace request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_scope_namespace_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_scope_namespace", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.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_scope_namespaces REST call - # - # @param request_pb [::Google::Cloud::GkeHub::V1::ListScopeNamespacesRequest] - # 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::GkeHub::V1::ListScopeNamespacesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GkeHub::V1::ListScopeNamespacesResponse] - # A result object deserialized from the server's reply - def list_scope_namespaces request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_scope_namespaces_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_scope_namespaces", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::GkeHub::V1::ListScopeNamespacesResponse.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_scope_rbac_role_binding REST call - # - # @param request_pb [::Google::Cloud::GkeHub::V1::GetScopeRBACRoleBindingRequest] - # 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::GkeHub::V1::RBACRoleBinding] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GkeHub::V1::RBACRoleBinding] - # A result object deserialized from the server's reply - def get_scope_rbac_role_binding request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_scope_rbac_role_binding_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_scope_rbac_role_binding", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::GkeHub::V1::RBACRoleBinding.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_scope_rbac_role_binding REST call - # - # @param request_pb [::Google::Cloud::GkeHub::V1::CreateScopeRBACRoleBindingRequest] - # 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::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_scope_rbac_role_binding request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_scope_rbac_role_binding_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_scope_rbac_role_binding", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.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_scope_rbac_role_binding REST call - # - # @param request_pb [::Google::Cloud::GkeHub::V1::UpdateScopeRBACRoleBindingRequest] - # 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::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def update_scope_rbac_role_binding request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_scope_rbac_role_binding_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_scope_rbac_role_binding", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.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_scope_rbac_role_binding REST call - # - # @param request_pb [::Google::Cloud::GkeHub::V1::DeleteScopeRBACRoleBindingRequest] - # 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::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_scope_rbac_role_binding request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_scope_rbac_role_binding_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_scope_rbac_role_binding", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.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_scope_rbac_role_bindings REST call - # - # @param request_pb [::Google::Cloud::GkeHub::V1::ListScopeRBACRoleBindingsRequest] - # 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::GkeHub::V1::ListScopeRBACRoleBindingsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GkeHub::V1::ListScopeRBACRoleBindingsResponse] - # A result object deserialized from the server's reply - def list_scope_rbac_role_bindings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_scope_rbac_role_bindings_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_scope_rbac_role_bindings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::GkeHub::V1::ListScopeRBACRoleBindingsResponse.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_scope REST call - # - # @param request_pb [::Google::Cloud::GkeHub::V1::GetScopeRequest] - # 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::GkeHub::V1::Scope] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GkeHub::V1::Scope] - # A result object deserialized from the server's reply - def get_scope request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_scope_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_scope", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::GkeHub::V1::Scope.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_scope REST call - # - # @param request_pb [::Google::Cloud::GkeHub::V1::CreateScopeRequest] - # 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::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_scope request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_scope_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_scope", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.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_scope REST call - # - # @param request_pb [::Google::Cloud::GkeHub::V1::UpdateScopeRequest] - # 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::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def update_scope request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_scope_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_scope", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.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_scope REST call - # - # @param request_pb [::Google::Cloud::GkeHub::V1::DeleteScopeRequest] - # 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::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_scope request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_scope_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_scope", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.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_scopes REST call - # - # @param request_pb [::Google::Cloud::GkeHub::V1::ListScopesRequest] - # 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::GkeHub::V1::ListScopesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GkeHub::V1::ListScopesResponse] - # A result object deserialized from the server's reply - def list_scopes request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_scopes_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_scopes", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::GkeHub::V1::ListScopesResponse.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_permitted_scopes REST call - # - # @param request_pb [::Google::Cloud::GkeHub::V1::ListPermittedScopesRequest] - # 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::GkeHub::V1::ListPermittedScopesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GkeHub::V1::ListPermittedScopesResponse] - # A result object deserialized from the server's reply - def list_permitted_scopes request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_permitted_scopes_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_permitted_scopes", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::GkeHub::V1::ListPermittedScopesResponse.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_membership_binding REST call - # - # @param request_pb [::Google::Cloud::GkeHub::V1::GetMembershipBindingRequest] - # 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::GkeHub::V1::MembershipBinding] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GkeHub::V1::MembershipBinding] - # A result object deserialized from the server's reply - def get_membership_binding request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_membership_binding_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_membership_binding", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::GkeHub::V1::MembershipBinding.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_membership_binding REST call - # - # @param request_pb [::Google::Cloud::GkeHub::V1::CreateMembershipBindingRequest] - # 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::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_membership_binding request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_membership_binding_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_membership_binding", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.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_membership_binding REST call - # - # @param request_pb [::Google::Cloud::GkeHub::V1::UpdateMembershipBindingRequest] - # 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::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def update_membership_binding request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_membership_binding_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_membership_binding", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.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_membership_binding REST call - # - # @param request_pb [::Google::Cloud::GkeHub::V1::DeleteMembershipBindingRequest] - # 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::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_membership_binding request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_membership_binding_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_membership_binding", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.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_membership_bindings REST call - # - # @param request_pb [::Google::Cloud::GkeHub::V1::ListMembershipBindingsRequest] - # 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::GkeHub::V1::ListMembershipBindingsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GkeHub::V1::ListMembershipBindingsResponse] - # A result object deserialized from the server's reply - def list_membership_bindings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_membership_bindings_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_membership_bindings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::GkeHub::V1::ListMembershipBindingsResponse.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_membership_rbac_role_binding REST call - # - # @param request_pb [::Google::Cloud::GkeHub::V1::GetMembershipRBACRoleBindingRequest] - # 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::GkeHub::V1::RBACRoleBinding] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GkeHub::V1::RBACRoleBinding] - # A result object deserialized from the server's reply - def get_membership_rbac_role_binding request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_membership_rbac_role_binding_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_membership_rbac_role_binding", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::GkeHub::V1::RBACRoleBinding.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_membership_rbac_role_binding REST call - # - # @param request_pb [::Google::Cloud::GkeHub::V1::CreateMembershipRBACRoleBindingRequest] - # 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::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def create_membership_rbac_role_binding request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_membership_rbac_role_binding_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_membership_rbac_role_binding", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.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_membership_rbac_role_binding REST call - # - # @param request_pb [::Google::Cloud::GkeHub::V1::UpdateMembershipRBACRoleBindingRequest] - # 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::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def update_membership_rbac_role_binding request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_membership_rbac_role_binding_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_membership_rbac_role_binding", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.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_membership_rbac_role_binding REST call - # - # @param request_pb [::Google::Cloud::GkeHub::V1::DeleteMembershipRBACRoleBindingRequest] - # 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::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def delete_membership_rbac_role_binding request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_membership_rbac_role_binding_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_membership_rbac_role_binding", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.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_membership_rbac_role_bindings REST call - # - # @param request_pb [::Google::Cloud::GkeHub::V1::ListMembershipRBACRoleBindingsRequest] - # 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::GkeHub::V1::ListMembershipRBACRoleBindingsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GkeHub::V1::ListMembershipRBACRoleBindingsResponse] - # A result object deserialized from the server's reply - def list_membership_rbac_role_bindings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_membership_rbac_role_bindings_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_membership_rbac_role_bindings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::GkeHub::V1::ListMembershipRBACRoleBindingsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the generate_membership_rbac_role_binding_yaml REST call - # - # @param request_pb [::Google::Cloud::GkeHub::V1::GenerateMembershipRBACRoleBindingYAMLRequest] - # 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::GkeHub::V1::GenerateMembershipRBACRoleBindingYAMLResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GkeHub::V1::GenerateMembershipRBACRoleBindingYAMLResponse] - # A result object deserialized from the server's reply - def generate_membership_rbac_role_binding_yaml request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_generate_membership_rbac_role_binding_yaml_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: "generate_membership_rbac_role_binding_yaml", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::GkeHub::V1::GenerateMembershipRBACRoleBindingYAMLResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_memberships REST call - # - # @param request_pb [::Google::Cloud::GkeHub::V1::ListMembershipsRequest] - # 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_memberships_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/memberships", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_bound_memberships REST call - # - # @param request_pb [::Google::Cloud::GkeHub::V1::ListBoundMembershipsRequest] - # 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_bound_memberships_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{scope_name}:listMemberships", - matches: [ - ["scope_name", %r{^projects/[^/]+/locations/[^/]+/scopes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_features REST call - # - # @param request_pb [::Google::Cloud::GkeHub::V1::ListFeaturesRequest] - # 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_features_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/features", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_membership REST call - # - # @param request_pb [::Google::Cloud::GkeHub::V1::GetMembershipRequest] - # 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_membership_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/memberships/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_feature REST call - # - # @param request_pb [::Google::Cloud::GkeHub::V1::GetFeatureRequest] - # 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_feature_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/features/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_membership REST call - # - # @param request_pb [::Google::Cloud::GkeHub::V1::CreateMembershipRequest] - # 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_membership_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/memberships", - body: "resource", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_feature REST call - # - # @param request_pb [::Google::Cloud::GkeHub::V1::CreateFeatureRequest] - # 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_feature_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/features", - body: "resource", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_membership REST call - # - # @param request_pb [::Google::Cloud::GkeHub::V1::DeleteMembershipRequest] - # 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_membership_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/memberships/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_feature REST call - # - # @param request_pb [::Google::Cloud::GkeHub::V1::DeleteFeatureRequest] - # 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_feature_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/features/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_membership REST call - # - # @param request_pb [::Google::Cloud::GkeHub::V1::UpdateMembershipRequest] - # 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_membership_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{name}", - body: "resource", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/memberships/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_feature REST call - # - # @param request_pb [::Google::Cloud::GkeHub::V1::UpdateFeatureRequest] - # 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_feature_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{name}", - body: "resource", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/features/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the generate_connect_manifest REST call - # - # @param request_pb [::Google::Cloud::GkeHub::V1::GenerateConnectManifestRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_generate_connect_manifest_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}:generateConnectManifest", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/memberships/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_fleet REST call - # - # @param request_pb [::Google::Cloud::GkeHub::V1::CreateFleetRequest] - # 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_fleet_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/fleets", - body: "fleet", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_fleet REST call - # - # @param request_pb [::Google::Cloud::GkeHub::V1::GetFleetRequest] - # 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_fleet_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/fleets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_fleet REST call - # - # @param request_pb [::Google::Cloud::GkeHub::V1::UpdateFleetRequest] - # 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_fleet_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{fleet.name}", - body: "fleet", - matches: [ - ["fleet.name", %r{^projects/[^/]+/locations/[^/]+/fleets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_fleet REST call - # - # @param request_pb [::Google::Cloud::GkeHub::V1::DeleteFleetRequest] - # 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_fleet_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/fleets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_fleets REST call - # - # @param request_pb [::Google::Cloud::GkeHub::V1::ListFleetsRequest] - # 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_fleets_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/fleets", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/fleets", - matches: [ - ["parent", %r{^organizations/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_scope_namespace REST call - # - # @param request_pb [::Google::Cloud::GkeHub::V1::GetScopeNamespaceRequest] - # 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_scope_namespace_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/scopes/[^/]+/namespaces/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_scope_namespace REST call - # - # @param request_pb [::Google::Cloud::GkeHub::V1::CreateScopeNamespaceRequest] - # 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_scope_namespace_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/namespaces", - body: "scope_namespace", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/scopes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_scope_namespace REST call - # - # @param request_pb [::Google::Cloud::GkeHub::V1::UpdateScopeNamespaceRequest] - # 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_scope_namespace_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{scope_namespace.name}", - body: "scope_namespace", - matches: [ - ["scope_namespace.name", %r{^projects/[^/]+/locations/[^/]+/scopes/[^/]+/namespaces/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_scope_namespace REST call - # - # @param request_pb [::Google::Cloud::GkeHub::V1::DeleteScopeNamespaceRequest] - # 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_scope_namespace_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/scopes/[^/]+/namespaces/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_scope_namespaces REST call - # - # @param request_pb [::Google::Cloud::GkeHub::V1::ListScopeNamespacesRequest] - # 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_scope_namespaces_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/namespaces", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/scopes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_scope_rbac_role_binding REST call - # - # @param request_pb [::Google::Cloud::GkeHub::V1::GetScopeRBACRoleBindingRequest] - # 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_scope_rbac_role_binding_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/scopes/[^/]+/rbacrolebindings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_scope_rbac_role_binding REST call - # - # @param request_pb [::Google::Cloud::GkeHub::V1::CreateScopeRBACRoleBindingRequest] - # 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_scope_rbac_role_binding_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/rbacrolebindings", - body: "rbacrolebinding", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/scopes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_scope_rbac_role_binding REST call - # - # @param request_pb [::Google::Cloud::GkeHub::V1::UpdateScopeRBACRoleBindingRequest] - # 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_scope_rbac_role_binding_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{rbacrolebinding.name}", - body: "rbacrolebinding", - matches: [ - ["rbacrolebinding.name", %r{^projects/[^/]+/locations/[^/]+/scopes/[^/]+/rbacrolebindings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_scope_rbac_role_binding REST call - # - # @param request_pb [::Google::Cloud::GkeHub::V1::DeleteScopeRBACRoleBindingRequest] - # 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_scope_rbac_role_binding_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/scopes/[^/]+/rbacrolebindings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_scope_rbac_role_bindings REST call - # - # @param request_pb [::Google::Cloud::GkeHub::V1::ListScopeRBACRoleBindingsRequest] - # 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_scope_rbac_role_bindings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/rbacrolebindings", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/scopes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_scope REST call - # - # @param request_pb [::Google::Cloud::GkeHub::V1::GetScopeRequest] - # 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_scope_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/scopes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_scope REST call - # - # @param request_pb [::Google::Cloud::GkeHub::V1::CreateScopeRequest] - # 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_scope_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/scopes", - body: "scope", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_scope REST call - # - # @param request_pb [::Google::Cloud::GkeHub::V1::UpdateScopeRequest] - # 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_scope_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{scope.name}", - body: "scope", - matches: [ - ["scope.name", %r{^projects/[^/]+/locations/[^/]+/scopes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_scope REST call - # - # @param request_pb [::Google::Cloud::GkeHub::V1::DeleteScopeRequest] - # 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_scope_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/scopes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_scopes REST call - # - # @param request_pb [::Google::Cloud::GkeHub::V1::ListScopesRequest] - # 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_scopes_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/scopes", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_permitted_scopes REST call - # - # @param request_pb [::Google::Cloud::GkeHub::V1::ListPermittedScopesRequest] - # 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_permitted_scopes_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/scopes:listPermitted", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_membership_binding REST call - # - # @param request_pb [::Google::Cloud::GkeHub::V1::GetMembershipBindingRequest] - # 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_membership_binding_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/memberships/[^/]+/bindings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_membership_binding REST call - # - # @param request_pb [::Google::Cloud::GkeHub::V1::CreateMembershipBindingRequest] - # 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_membership_binding_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/bindings", - body: "membership_binding", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/memberships/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_membership_binding REST call - # - # @param request_pb [::Google::Cloud::GkeHub::V1::UpdateMembershipBindingRequest] - # 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_membership_binding_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{membership_binding.name}", - body: "membership_binding", - matches: [ - ["membership_binding.name", %r{^projects/[^/]+/locations/[^/]+/memberships/[^/]+/bindings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_membership_binding REST call - # - # @param request_pb [::Google::Cloud::GkeHub::V1::DeleteMembershipBindingRequest] - # 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_membership_binding_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/memberships/[^/]+/bindings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_membership_bindings REST call - # - # @param request_pb [::Google::Cloud::GkeHub::V1::ListMembershipBindingsRequest] - # 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_membership_bindings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/bindings", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/memberships/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_membership_rbac_role_binding REST call - # - # @param request_pb [::Google::Cloud::GkeHub::V1::GetMembershipRBACRoleBindingRequest] - # 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_membership_rbac_role_binding_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/memberships/[^/]+/rbacrolebindings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_membership_rbac_role_binding REST call - # - # @param request_pb [::Google::Cloud::GkeHub::V1::CreateMembershipRBACRoleBindingRequest] - # 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_membership_rbac_role_binding_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/rbacrolebindings", - body: "rbacrolebinding", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/memberships/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_membership_rbac_role_binding REST call - # - # @param request_pb [::Google::Cloud::GkeHub::V1::UpdateMembershipRBACRoleBindingRequest] - # 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_membership_rbac_role_binding_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{rbacrolebinding.name}", - body: "rbacrolebinding", - matches: [ - ["rbacrolebinding.name", %r{^projects/[^/]+/locations/[^/]+/memberships/[^/]+/rbacrolebindings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_membership_rbac_role_binding REST call - # - # @param request_pb [::Google::Cloud::GkeHub::V1::DeleteMembershipRBACRoleBindingRequest] - # 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_membership_rbac_role_binding_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/memberships/[^/]+/rbacrolebindings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_membership_rbac_role_bindings REST call - # - # @param request_pb [::Google::Cloud::GkeHub::V1::ListMembershipRBACRoleBindingsRequest] - # 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_membership_rbac_role_bindings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/rbacrolebindings", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/memberships/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the generate_membership_rbac_role_binding_yaml REST call - # - # @param request_pb [::Google::Cloud::GkeHub::V1::GenerateMembershipRBACRoleBindingYAMLRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_generate_membership_rbac_role_binding_yaml_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/rbacrolebindings:generateMembershipRBACRoleBindingYAML", - body: "rbacrolebinding", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/memberships/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/rest.rb b/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/rest.rb deleted file mode 100644 index dc0e8e79c2b7..000000000000 --- a/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/rest.rb +++ /dev/null @@ -1,37 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/gke_hub/v1/gke_hub/rest" -require "google/cloud/gke_hub/v1/version" - -module Google - module Cloud - module GkeHub - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/gke_hub/v1/rest" - # client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new - # - module V1 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/version.rb b/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/version.rb deleted file mode 100644 index a193866d415f..000000000000 --- a/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gke_hub/v1/version.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module GkeHub - module V1 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gkehub/v1/feature_pb.rb b/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gkehub/v1/feature_pb.rb deleted file mode 100644 index b7bc160f35dd..000000000000 --- a/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gkehub/v1/feature_pb.rb +++ /dev/null @@ -1,63 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/gkehub/v1/feature.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/gkehub/v1/configmanagement/configmanagement_pb' -require 'google/cloud/gkehub/v1/multiclusteringress/multiclusteringress_pb' -require 'google/cloud/gkehub/v1/rbacrolebindingactuation/rbacrolebindingactuation_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n$google/cloud/gkehub/v1/feature.proto\x12\x16google.cloud.gkehub.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a>google/cloud/gkehub/v1/configmanagement/configmanagement.proto\x1a\x44google/cloud/gkehub/v1/multiclusteringress/multiclusteringress.proto\x1aNgoogle/cloud/gkehub/v1/rbacrolebindingactuation/rbacrolebindingactuation.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xbd\n\n\x07\x46\x65\x61ture\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12;\n\x06labels\x18\x02 \x03(\x0b\x32+.google.cloud.gkehub.v1.Feature.LabelsEntry\x12I\n\x0eresource_state\x18\x03 \x01(\x0b\x32,.google.cloud.gkehub.v1.FeatureResourceStateB\x03\xe0\x41\x03\x12<\n\x04spec\x18\x04 \x01(\x0b\x32).google.cloud.gkehub.v1.CommonFeatureSpecB\x03\xe0\x41\x01\x12S\n\x10membership_specs\x18\x05 \x03(\x0b\x32\x34.google.cloud.gkehub.v1.Feature.MembershipSpecsEntryB\x03\xe0\x41\x01\x12>\n\x05state\x18\x06 \x01(\x0b\x32*.google.cloud.gkehub.v1.CommonFeatureStateB\x03\xe0\x41\x03\x12U\n\x11membership_states\x18\x07 \x03(\x0b\x32\x35.google.cloud.gkehub.v1.Feature.MembershipStatesEntryB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x64\x65lete_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12I\n\x0bscope_specs\x18\x0c \x03(\x0b\x32/.google.cloud.gkehub.v1.Feature.ScopeSpecsEntryB\x03\xe0\x41\x01\x12K\n\x0cscope_states\x18\r \x03(\x0b\x32\x30.google.cloud.gkehub.v1.Feature.ScopeStatesEntryB\x03\xe0\x41\x03\x12\x18\n\x0bunreachable\x18\x0f \x03(\tB\x03\xe0\x41\x03\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x65\n\x14MembershipSpecsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12<\n\x05value\x18\x02 \x01(\x0b\x32-.google.cloud.gkehub.v1.MembershipFeatureSpec:\x02\x38\x01\x1ag\n\x15MembershipStatesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12=\n\x05value\x18\x02 \x01(\x0b\x32..google.cloud.gkehub.v1.MembershipFeatureState:\x02\x38\x01\x1a[\n\x0fScopeSpecsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x37\n\x05value\x18\x02 \x01(\x0b\x32(.google.cloud.gkehub.v1.ScopeFeatureSpec:\x02\x38\x01\x1a]\n\x10ScopeStatesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x38\n\x05value\x18\x02 \x01(\x0b\x32).google.cloud.gkehub.v1.ScopeFeatureState:\x02\x38\x01:^\xea\x41[\n\x1dgkehub.googleapis.com/Feature\x12:projects/{project}/locations/{location}/features/{feature}\"\xc6\x01\n\x14\x46\x65\x61tureResourceState\x12\x41\n\x05state\x18\x01 \x01(\x0e\x32\x32.google.cloud.gkehub.v1.FeatureResourceState.State\"k\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x45NABLING\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\r\n\tDISABLING\x10\x03\x12\x0c\n\x08UPDATING\x10\x04\x12\x14\n\x10SERVICE_UPDATING\x10\x05\"\xcb\x01\n\x0c\x46\x65\x61tureState\x12\x37\n\x04\x63ode\x18\x01 \x01(\x0e\x32).google.cloud.gkehub.v1.FeatureState.Code\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12/\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"<\n\x04\x43ode\x12\x14\n\x10\x43ODE_UNSPECIFIED\x10\x00\x12\x06\n\x02OK\x10\x01\x12\x0b\n\x07WARNING\x10\x02\x12\t\n\x05\x45RROR\x10\x03\"{\n\x11\x43ommonFeatureSpec\x12V\n\x13multiclusteringress\x18\x66 \x01(\x0b\x32\x37.google.cloud.gkehub.multiclusteringress.v1.FeatureSpecH\x00\x42\x0e\n\x0c\x66\x65\x61ture_spec\"\xc2\x01\n\x12\x43ommonFeatureState\x12\x61\n\x18rbacrolebindingactuation\x18x \x01(\x0b\x32=.google.cloud.gkehub.rbacrolebindingactuation.v1.FeatureStateH\x00\x12\x38\n\x05state\x18\x01 \x01(\x0b\x32$.google.cloud.gkehub.v1.FeatureStateB\x03\xe0\x41\x03\x42\x0f\n\rfeature_state\"\x12\n\x10ScopeFeatureSpec\"M\n\x11ScopeFeatureState\x12\x38\n\x05state\x18\x01 \x01(\x0b\x32$.google.cloud.gkehub.v1.FeatureStateB\x03\xe0\x41\x03\"|\n\x15MembershipFeatureSpec\x12S\n\x10\x63onfigmanagement\x18j \x01(\x0b\x32\x37.google.cloud.gkehub.configmanagement.v1.MembershipSpecH\x00\x42\x0e\n\x0c\x66\x65\x61ture_spec\"\xb4\x01\n\x16MembershipFeatureState\x12T\n\x10\x63onfigmanagement\x18j \x01(\x0b\x32\x38.google.cloud.gkehub.configmanagement.v1.MembershipStateH\x00\x12\x33\n\x05state\x18\x01 \x01(\x0b\x32$.google.cloud.gkehub.v1.FeatureStateB\x0f\n\rfeature_stateB\xae\x01\n\x1a\x63om.google.cloud.gkehub.v1B\x0c\x46\x65\x61tureProtoP\x01Z2cloud.google.com/go/gkehub/apiv1/gkehubpb;gkehubpb\xaa\x02\x16Google.Cloud.GkeHub.V1\xca\x02\x16Google\\Cloud\\GkeHub\\V1\xea\x02\x19Google::Cloud::GkeHub::V1b\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ["google.cloud.gkehub.multiclusteringress.v1.FeatureSpec", "google/cloud/gkehub/v1/multiclusteringress/multiclusteringress.proto"], - ["google.cloud.gkehub.rbacrolebindingactuation.v1.FeatureState", "google/cloud/gkehub/v1/rbacrolebindingactuation/rbacrolebindingactuation.proto"], - ["google.cloud.gkehub.configmanagement.v1.MembershipSpec", "google/cloud/gkehub/v1/configmanagement/configmanagement.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module GkeHub - module V1 - Feature = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.Feature").msgclass - FeatureResourceState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.FeatureResourceState").msgclass - FeatureResourceState::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.FeatureResourceState.State").enummodule - FeatureState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.FeatureState").msgclass - FeatureState::Code = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.FeatureState.Code").enummodule - CommonFeatureSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.CommonFeatureSpec").msgclass - CommonFeatureState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.CommonFeatureState").msgclass - ScopeFeatureSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.ScopeFeatureSpec").msgclass - ScopeFeatureState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.ScopeFeatureState").msgclass - MembershipFeatureSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.MembershipFeatureSpec").msgclass - MembershipFeatureState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.MembershipFeatureState").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gkehub/v1/membership_pb.rb b/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gkehub/v1/membership_pb.rb deleted file mode 100644 index e59f1b668226..000000000000 --- a/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gkehub/v1/membership_pb.rb +++ /dev/null @@ -1,57 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/gkehub/v1/membership.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n\'google/cloud/gkehub/v1/membership.proto\x12\x16google.cloud.gkehub.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb8\x06\n\nMembership\x12\x43\n\x08\x65ndpoint\x18\x04 \x01(\x0b\x32*.google.cloud.gkehub.v1.MembershipEndpointB\x03\xe0\x41\x01H\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x43\n\x06labels\x18\x02 \x03(\x0b\x32..google.cloud.gkehub.v1.Membership.LabelsEntryB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12;\n\x05state\x18\x05 \x01(\x0b\x32\'.google.cloud.gkehub.v1.MembershipStateB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x64\x65lete_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0b\x65xternal_id\x18\t \x01(\tB\x03\xe0\x41\x01\x12=\n\x14last_connection_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x16\n\tunique_id\x18\x0b \x01(\tB\x03\xe0\x41\x03\x12\x39\n\tauthority\x18\x0c \x01(\x0b\x32!.google.cloud.gkehub.v1.AuthorityB\x03\xe0\x41\x01\x12H\n\x11monitoring_config\x18\x0e \x01(\x0b\x32(.google.cloud.gkehub.v1.MonitoringConfigB\x03\xe0\x41\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:g\xea\x41\x64\n gkehub.googleapis.com/Membership\x12@projects/{project}/locations/{location}/memberships/{membership}B\x06\n\x04type\"\x8b\x02\n\x12MembershipEndpoint\x12<\n\x0bgke_cluster\x18\x01 \x01(\x0b\x32\".google.cloud.gkehub.v1.GkeClusterB\x03\xe0\x41\x01\x12L\n\x13kubernetes_metadata\x18\x02 \x01(\x0b\x32*.google.cloud.gkehub.v1.KubernetesMetadataB\x03\xe0\x41\x03\x12L\n\x13kubernetes_resource\x18\x03 \x01(\x0b\x32*.google.cloud.gkehub.v1.KubernetesResourceB\x03\xe0\x41\x01\x12\x1b\n\x0egoogle_managed\x18\x08 \x01(\x08\x42\x03\xe0\x41\x03\"\x98\x02\n\x12KubernetesResource\x12#\n\x16membership_cr_manifest\x18\x01 \x01(\tB\x03\xe0\x41\x04\x12K\n\x14membership_resources\x18\x02 \x03(\x0b\x32(.google.cloud.gkehub.v1.ResourceManifestB\x03\xe0\x41\x03\x12H\n\x11\x63onnect_resources\x18\x03 \x03(\x0b\x32(.google.cloud.gkehub.v1.ResourceManifestB\x03\xe0\x41\x03\x12\x46\n\x10resource_options\x18\x04 \x01(\x0b\x32\'.google.cloud.gkehub.v1.ResourceOptionsB\x03\xe0\x41\x01\"\x81\x01\n\x0fResourceOptions\x12\x1c\n\x0f\x63onnect_version\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0bv1beta1_crd\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x18\n\x0bk8s_version\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0fk8s_git_version\x18\x04 \x01(\tB\x03\xe0\x41\x01\"<\n\x10ResourceManifest\x12\x10\n\x08manifest\x18\x01 \x01(\t\x12\x16\n\x0e\x63luster_scoped\x18\x02 \x01(\x08\"F\n\nGkeCluster\x12\x1a\n\rresource_link\x18\x01 \x01(\tB\x03\xe0\x41\x05\x12\x1c\n\x0f\x63luster_missing\x18\x02 \x01(\x08\x42\x03\xe0\x41\x03\"\xdf\x01\n\x12KubernetesMetadata\x12*\n\x1dkubernetes_api_server_version\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x1d\n\x10node_provider_id\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\nnode_count\x18\x03 \x01(\x05\x42\x03\xe0\x41\x03\x12\x17\n\nvcpu_count\x18\x04 \x01(\x05\x42\x03\xe0\x41\x03\x12\x16\n\tmemory_mb\x18\x05 \x01(\x05\x42\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x64 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\"\x96\x01\n\x10MonitoringConfig\x12\x17\n\nproject_id\x18\x01 \x01(\tB\x03\xe0\x41\x05\x12\x15\n\x08location\x18\x02 \x01(\tB\x03\xe0\x41\x05\x12\x14\n\x07\x63luster\x18\x03 \x01(\tB\x03\xe0\x41\x05\x12!\n\x19kubernetes_metrics_prefix\x18\x04 \x01(\t\x12\x19\n\x0c\x63luster_hash\x18\x05 \x01(\tB\x03\xe0\x41\x05\"\xbb\x01\n\x0fMembershipState\x12?\n\x04\x63ode\x18\x01 \x01(\x0e\x32,.google.cloud.gkehub.v1.MembershipState.CodeB\x03\xe0\x41\x03\"g\n\x04\x43ode\x12\x14\n\x10\x43ODE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\t\n\x05READY\x10\x02\x12\x0c\n\x08\x44\x45LETING\x10\x03\x12\x0c\n\x08UPDATING\x10\x04\x12\x14\n\x10SERVICE_UPDATING\x10\x05\"}\n\tAuthority\x12\x13\n\x06issuer\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12#\n\x16workload_identity_pool\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x1e\n\x11identity_provider\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x16\n\toidc_jwks\x18\x04 \x01(\x0c\x42\x03\xe0\x41\x01\x42\xb1\x01\n\x1a\x63om.google.cloud.gkehub.v1B\x0fMembershipProtoP\x01Z2cloud.google.com/go/gkehub/apiv1/gkehubpb;gkehubpb\xaa\x02\x16Google.Cloud.GkeHub.V1\xca\x02\x16Google\\Cloud\\GkeHub\\V1\xea\x02\x19Google::Cloud::GkeHub::V1b\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module GkeHub - module V1 - Membership = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.Membership").msgclass - MembershipEndpoint = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.MembershipEndpoint").msgclass - KubernetesResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.KubernetesResource").msgclass - ResourceOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.ResourceOptions").msgclass - ResourceManifest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.ResourceManifest").msgclass - GkeCluster = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.GkeCluster").msgclass - KubernetesMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.KubernetesMetadata").msgclass - MonitoringConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.MonitoringConfig").msgclass - MembershipState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.MembershipState").msgclass - MembershipState::Code = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.MembershipState.Code").enummodule - Authority = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.Authority").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gkehub/v1/service_pb.rb b/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gkehub/v1/service_pb.rb deleted file mode 100644 index 612cbecb8655..000000000000 --- a/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gkehub/v1/service_pb.rb +++ /dev/null @@ -1,116 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/gkehub/v1/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/gkehub/v1/feature_pb' -require 'google/cloud/gkehub/v1/fleet_pb' -require 'google/cloud/gkehub/v1/membership_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n$google/cloud/gkehub/v1/service.proto\x12\x16google.cloud.gkehub.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a$google/cloud/gkehub/v1/feature.proto\x1a\"google/cloud/gkehub/v1/fleet.proto\x1a\'google/cloud/gkehub/v1/membership.proto\x1a#google/longrunning/operations.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"Q\n\x18GetScopeNamespaceRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fgkehub.googleapis.com/Namespace\"\xb8\x01\n\x1b\x43reateScopeNamespaceRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1fgkehub.googleapis.com/Namespace\x12\x1f\n\x12scope_namespace_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12?\n\x0fscope_namespace\x18\x03 \x01(\x0b\x32!.google.cloud.gkehub.v1.NamespaceB\x03\xe0\x41\x02\"\x94\x01\n\x1bUpdateScopeNamespaceRequest\x12?\n\x0fscope_namespace\x18\x01 \x01(\x0b\x32!.google.cloud.gkehub.v1.NamespaceB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"T\n\x1b\x44\x65leteScopeNamespaceRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fgkehub.googleapis.com/Namespace\"\x86\x01\n\x1aListScopeNamespacesRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1fgkehub.googleapis.com/Namespace\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"s\n\x1bListScopeNamespacesResponse\x12;\n\x10scope_namespaces\x18\x01 \x03(\x0b\x32!.google.cloud.gkehub.v1.Namespace\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"]\n\x1eGetScopeRBACRoleBindingRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%gkehub.googleapis.com/RBACRoleBinding\"\xca\x01\n!CreateScopeRBACRoleBindingRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\x12%gkehub.googleapis.com/RBACRoleBinding\x12\x1f\n\x12rbacrolebinding_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x45\n\x0frbacrolebinding\x18\x03 \x01(\x0b\x32\'.google.cloud.gkehub.v1.RBACRoleBindingB\x03\xe0\x41\x02\"\xa0\x01\n!UpdateScopeRBACRoleBindingRequest\x12\x45\n\x0frbacrolebinding\x18\x01 \x01(\x0b\x32\'.google.cloud.gkehub.v1.RBACRoleBindingB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"`\n!DeleteScopeRBACRoleBindingRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%gkehub.googleapis.com/RBACRoleBinding\"\x92\x01\n ListScopeRBACRoleBindingsRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\x12%gkehub.googleapis.com/RBACRoleBinding\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x7f\n!ListScopeRBACRoleBindingsResponse\x12\x41\n\x10rbacrolebindings\x18\x01 \x03(\x0b\x32\'.google.cloud.gkehub.v1.RBACRoleBinding\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"D\n\x0fGetScopeRequest\x12\x31\n\x04name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1bgkehub.googleapis.com/Scope\"\x93\x01\n\x12\x43reateScopeRequest\x12\x33\n\x06parent\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\x12\x1bgkehub.googleapis.com/Scope\x12\x15\n\x08scope_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x31\n\x05scope\x18\x03 \x01(\x0b\x32\x1d.google.cloud.gkehub.v1.ScopeB\x03\xe0\x41\x02\"}\n\x12UpdateScopeRequest\x12\x31\n\x05scope\x18\x01 \x01(\x0b\x32\x1d.google.cloud.gkehub.v1.ScopeB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"G\n\x12\x44\x65leteScopeRequest\x12\x31\n\x04name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1bgkehub.googleapis.com/Scope\"y\n\x11ListScopesRequest\x12\x33\n\x06parent\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\x12\x1bgkehub.googleapis.com/Scope\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\\\n\x12ListScopesResponse\x12-\n\x06scopes\x18\x01 \x03(\x0b\x32\x1d.google.cloud.gkehub.v1.Scope\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x82\x01\n\x1aListPermittedScopesRequest\x12\x33\n\x06parent\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\x12\x1bgkehub.googleapis.com/Scope\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"e\n\x1bListPermittedScopesResponse\x12-\n\x06scopes\x18\x01 \x03(\x0b\x32\x1d.google.cloud.gkehub.v1.Scope\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\\\n\x1bGetMembershipBindingRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'gkehub.googleapis.com/MembershipBinding\"\xd1\x01\n\x1e\x43reateMembershipBindingRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'gkehub.googleapis.com/MembershipBinding\x12J\n\x12membership_binding\x18\x02 \x01(\x0b\x32).google.cloud.gkehub.v1.MembershipBindingB\x03\xe0\x41\x02\x12\"\n\x15membership_binding_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\xa2\x01\n\x1eUpdateMembershipBindingRequest\x12J\n\x12membership_binding\x18\x01 \x01(\x0b\x32).google.cloud.gkehub.v1.MembershipBindingB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"_\n\x1e\x44\x65leteMembershipBindingRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'gkehub.googleapis.com/MembershipBinding\"\xa6\x01\n\x1dListMembershipBindingsRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'gkehub.googleapis.com/MembershipBinding\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\x96\x01\n\x1eListMembershipBindingsResponse\x12\x46\n\x13membership_bindings\x18\x01 \x03(\x0b\x32).google.cloud.gkehub.v1.MembershipBinding\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xaf\x01\n\x16ListMembershipsRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\x12 gkehub.googleapis.com/Membership\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08order_by\x18\x05 \x01(\tB\x03\xe0\x41\x01\"b\n#GetMembershipRBACRoleBindingRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%gkehub.googleapis.com/RBACRoleBinding\"\xcf\x01\n&CreateMembershipRBACRoleBindingRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\x12%gkehub.googleapis.com/RBACRoleBinding\x12\x1f\n\x12rbacrolebinding_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x45\n\x0frbacrolebinding\x18\x03 \x01(\x0b\x32\'.google.cloud.gkehub.v1.RBACRoleBindingB\x03\xe0\x41\x02\"\xa5\x01\n&UpdateMembershipRBACRoleBindingRequest\x12\x45\n\x0frbacrolebinding\x18\x01 \x01(\x0b\x32\'.google.cloud.gkehub.v1.RBACRoleBindingB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"e\n&DeleteMembershipRBACRoleBindingRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%gkehub.googleapis.com/RBACRoleBinding\"\x97\x01\n%ListMembershipRBACRoleBindingsRequest\x12=\n\x06parent\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\x12%gkehub.googleapis.com/RBACRoleBinding\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x99\x01\n&ListMembershipRBACRoleBindingsResponse\x12\x41\n\x10rbacrolebindings\x18\x01 \x03(\x0b\x32\'.google.cloud.gkehub.v1.RBACRoleBinding\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xd0\x01\n,GenerateMembershipRBACRoleBindingYAMLRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n gkehub.googleapis.com/Membership\x12\x1f\n\x12rbacrolebinding_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x45\n\x0frbacrolebinding\x18\x03 \x01(\x0b\x32\'.google.cloud.gkehub.v1.RBACRoleBindingB\x03\xe0\x41\x02\"K\n-GenerateMembershipRBACRoleBindingYAMLResponse\x12\x1a\n\x12role_bindings_yaml\x18\x01 \x01(\t\"~\n\x17ListMembershipsResponse\x12\x35\n\tresources\x18\x01 \x03(\x0b\x32\".google.cloud.gkehub.v1.Membership\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"N\n\x14GetMembershipRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n gkehub.googleapis.com/Membership\"\x9c\x01\n\x1bListBoundMembershipsRequest\x12\x37\n\nscope_name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1bgkehub.googleapis.com/Scope\x12\x13\n\x06\x66ilter\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\x85\x01\n\x1cListBoundMembershipsResponse\x12\x37\n\x0bmemberships\x18\x01 \x03(\x0b\x32\".google.cloud.gkehub.v1.Membership\x12\x13\n\x0bunreachable\x18\x02 \x03(\t\x12\x17\n\x0fnext_page_token\x18\x03 \x01(\t\"\xc3\x01\n\x17\x43reateMembershipRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\x12 gkehub.googleapis.com/Membership\x12\x1a\n\rmembership_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x39\n\x08resource\x18\x03 \x01(\x0b\x32\".google.cloud.gkehub.v1.MembershipB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"~\n\x17\x44\x65leteMembershipRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n gkehub.googleapis.com/Membership\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05\x66orce\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"\xdb\x01\n\x17UpdateMembershipRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n gkehub.googleapis.com/Membership\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x39\n\x08resource\x18\x03 \x01(\x0b\x32\".google.cloud.gkehub.v1.MembershipB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xf2\x01\n\x1eGenerateConnectManifestRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n gkehub.googleapis.com/Membership\x12\x16\n\tnamespace\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05proxy\x18\x03 \x01(\x0c\x42\x03\xe0\x41\x01\x12\x14\n\x07version\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x17\n\nis_upgrade\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\x12\x15\n\x08registry\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12&\n\x19image_pull_secret_content\x18\x07 \x01(\x0c\x42\x03\xe0\x41\x01\"a\n\x1fGenerateConnectManifestResponse\x12>\n\x08manifest\x18\x01 \x03(\x0b\x32,.google.cloud.gkehub.v1.ConnectAgentResource\"X\n\x14\x43onnectAgentResource\x12.\n\x04type\x18\x01 \x01(\x0b\x32 .google.cloud.gkehub.v1.TypeMeta\x12\x10\n\x08manifest\x18\x02 \x01(\t\"-\n\x08TypeMeta\x12\x0c\n\x04kind\x18\x01 \x01(\t\x12\x13\n\x0b\x61pi_version\x18\x02 \x01(\t\"\xb7\x01\n\x13ListFeaturesRequest\x12\x32\n\x06parent\x18\x01 \x01(\tB\"\xfa\x41\x1f\x12\x1dgkehub.googleapis.com/Feature\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\x12\x10\n\x08order_by\x18\x05 \x01(\t\x12#\n\x16return_partial_success\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\"c\n\x14ListFeaturesResponse\x12\x32\n\tresources\x18\x01 \x03(\x0b\x32\x1f.google.cloud.gkehub.v1.Feature\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"j\n\x11GetFeatureRequest\x12\x30\n\x04name\x18\x01 \x01(\tB\"\xfa\x41\x1f\n\x1dgkehub.googleapis.com/Feature\x12#\n\x16return_partial_success\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"\xa5\x01\n\x14\x43reateFeatureRequest\x12\x32\n\x06parent\x18\x01 \x01(\tB\"\xfa\x41\x1f\x12\x1dgkehub.googleapis.com/Feature\x12\x12\n\nfeature_id\x18\x02 \x01(\t\x12\x31\n\x08resource\x18\x03 \x01(\x0b\x32\x1f.google.cloud.gkehub.v1.Feature\x12\x12\n\nrequest_id\x18\x04 \x01(\t\"p\n\x14\x44\x65leteFeatureRequest\x12\x30\n\x04name\x18\x01 \x01(\tB\"\xfa\x41\x1f\n\x1dgkehub.googleapis.com/Feature\x12\r\n\x05\x66orce\x18\x02 \x01(\x08\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xc0\x01\n\x14UpdateFeatureRequest\x12\x30\n\x04name\x18\x01 \x01(\tB\"\xfa\x41\x1f\n\x1dgkehub.googleapis.com/Feature\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x31\n\x08resource\x18\x03 \x01(\x0b\x32\x1f.google.cloud.gkehub.v1.Feature\x12\x12\n\nrequest_id\x18\x04 \x01(\t\"\x82\x01\n\x12\x43reateFleetRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x31\n\x05\x66leet\x18\x02 \x01(\x0b\x32\x1d.google.cloud.gkehub.v1.FleetB\x03\xe0\x41\x02\"D\n\x0fGetFleetRequest\x12\x31\n\x04name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1bgkehub.googleapis.com/Fleet\"}\n\x12UpdateFleetRequest\x12\x31\n\x05\x66leet\x18\x01 \x01(\x0b\x32\x1d.google.cloud.gkehub.v1.FleetB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"G\n\x12\x44\x65leteFleetRequest\x12\x31\n\x04name\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1bgkehub.googleapis.com/Fleet\"\x7f\n\x11ListFleetsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x17\n\npage_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpage_size\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\"\\\n\x12ListFleetsResponse\x12-\n\x06\x66leets\x18\x01 \x03(\x0b\x32\x1d.google.cloud.gkehub.v1.Fleet\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xf9\x01\n\x11OperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1a\n\rstatus_detail\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x1d\n\x10\x63\x61ncel_requested\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\x32\x96M\n\x06GkeHub\x12\xb4\x01\n\x0fListMemberships\x12..google.cloud.gkehub.v1.ListMembershipsRequest\x1a/.google.cloud.gkehub.v1.ListMembershipsResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v1/{parent=projects/*/locations/*}/memberships\x12\xd8\x01\n\x14ListBoundMemberships\x12\x33.google.cloud.gkehub.v1.ListBoundMembershipsRequest\x1a\x34.google.cloud.gkehub.v1.ListBoundMembershipsResponse\"U\xda\x41\nscope_name\x82\xd3\xe4\x93\x02\x42\x12@/v1/{scope_name=projects/*/locations/*/scopes/*}:listMemberships\x12\xa8\x01\n\x0cListFeatures\x12+.google.cloud.gkehub.v1.ListFeaturesRequest\x1a,.google.cloud.gkehub.v1.ListFeaturesResponse\"=\xda\x41\x06parent\x82\xd3\xe4\x93\x02.\x12,/v1/{parent=projects/*/locations/*}/features\x12\xa1\x01\n\rGetMembership\x12,.google.cloud.gkehub.v1.GetMembershipRequest\x1a\".google.cloud.gkehub.v1.Membership\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1/{name=projects/*/locations/*/memberships/*}\x12\x95\x01\n\nGetFeature\x12).google.cloud.gkehub.v1.GetFeatureRequest\x1a\x1f.google.cloud.gkehub.v1.Feature\";\xda\x41\x04name\x82\xd3\xe4\x93\x02.\x12,/v1/{name=projects/*/locations/*/features/*}\x12\xe8\x01\n\x10\x43reateMembership\x12/.google.cloud.gkehub.v1.CreateMembershipRequest\x1a\x1d.google.longrunning.Operation\"\x83\x01\xca\x41\x1f\n\nMembership\x12\x11OperationMetadata\xda\x41\x1dparent,resource,membership_id\x82\xd3\xe4\x93\x02;\"//v1/{parent=projects/*/locations/*}/memberships:\x08resource\x12\xd8\x01\n\rCreateFeature\x12,.google.cloud.gkehub.v1.CreateFeatureRequest\x1a\x1d.google.longrunning.Operation\"z\xca\x41\x1c\n\x07\x46\x65\x61ture\x12\x11OperationMetadata\xda\x41\x1aparent,resource,feature_id\x82\xd3\xe4\x93\x02\x38\",/v1/{parent=projects/*/locations/*}/features:\x08resource\x12\xcf\x01\n\x10\x44\x65leteMembership\x12/.google.cloud.gkehub.v1.DeleteMembershipRequest\x1a\x1d.google.longrunning.Operation\"k\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//v1/{name=projects/*/locations/*/memberships/*}\x12\xc6\x01\n\rDeleteFeature\x12,.google.cloud.gkehub.v1.DeleteFeatureRequest\x1a\x1d.google.longrunning.Operation\"h\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02.*,/v1/{name=projects/*/locations/*/features/*}\x12\xe3\x01\n\x10UpdateMembership\x12/.google.cloud.gkehub.v1.UpdateMembershipRequest\x1a\x1d.google.longrunning.Operation\"\x7f\xca\x41\x1f\n\nMembership\x12\x11OperationMetadata\xda\x41\x19name,resource,update_mask\x82\xd3\xe4\x93\x02;2//v1/{name=projects/*/locations/*/memberships/*}:\x08resource\x12\xd7\x01\n\rUpdateFeature\x12,.google.cloud.gkehub.v1.UpdateFeatureRequest\x1a\x1d.google.longrunning.Operation\"y\xca\x41\x1c\n\x07\x46\x65\x61ture\x12\x11OperationMetadata\xda\x41\x19name,resource,update_mask\x82\xd3\xe4\x93\x02\x38\x32,/v1/{name=projects/*/locations/*/features/*}:\x08resource\x12\xdb\x01\n\x17GenerateConnectManifest\x12\x36.google.cloud.gkehub.v1.GenerateConnectManifestRequest\x1a\x37.google.cloud.gkehub.v1.GenerateConnectManifestResponse\"O\x82\xd3\xe4\x93\x02I\x12G/v1/{name=projects/*/locations/*/memberships/*}:generateConnectManifest\x12\xbf\x01\n\x0b\x43reateFleet\x12*.google.cloud.gkehub.v1.CreateFleetRequest\x1a\x1d.google.longrunning.Operation\"e\xca\x41\x1a\n\x05\x46leet\x12\x11OperationMetadata\xda\x41\x0cparent,fleet\x82\xd3\xe4\x93\x02\x33\"*/v1/{parent=projects/*/locations/*}/fleets:\x05\x66leet\x12\x8d\x01\n\x08GetFleet\x12\'.google.cloud.gkehub.v1.GetFleetRequest\x1a\x1d.google.cloud.gkehub.v1.Fleet\"9\xda\x41\x04name\x82\xd3\xe4\x93\x02,\x12*/v1/{name=projects/*/locations/*/fleets/*}\x12\xca\x01\n\x0bUpdateFleet\x12*.google.cloud.gkehub.v1.UpdateFleetRequest\x1a\x1d.google.longrunning.Operation\"p\xca\x41\x1a\n\x05\x46leet\x12\x11OperationMetadata\xda\x41\x11\x66leet,update_mask\x82\xd3\xe4\x93\x02\x39\x32\x30/v1/{fleet.name=projects/*/locations/*/fleets/*}:\x05\x66leet\x12\xc0\x01\n\x0b\x44\x65leteFleet\x12*.google.cloud.gkehub.v1.DeleteFleetRequest\x1a\x1d.google.longrunning.Operation\"f\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02,**/v1/{name=projects/*/locations/*/fleets/*}\x12\xd3\x01\n\nListFleets\x12).google.cloud.gkehub.v1.ListFleetsRequest\x1a*.google.cloud.gkehub.v1.ListFleetsResponse\"n\xda\x41\x06parent\x82\xd3\xe4\x93\x02_\x12*/v1/{parent=projects/*/locations/*}/fleetsZ1\x12//v1/{parent=organizations/*/locations/*}/fleets\x12\xb0\x01\n\x11GetScopeNamespace\x12\x30.google.cloud.gkehub.v1.GetScopeNamespaceRequest\x1a!.google.cloud.gkehub.v1.Namespace\"F\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39\x12\x37/v1/{name=projects/*/locations/*/scopes/*/namespaces/*}\x12\x8a\x02\n\x14\x43reateScopeNamespace\x12\x33.google.cloud.gkehub.v1.CreateScopeNamespaceRequest\x1a\x1d.google.longrunning.Operation\"\x9d\x01\xca\x41\x1e\n\tNamespace\x12\x11OperationMetadata\xda\x41)parent,scope_namespace,scope_namespace_id\x82\xd3\xe4\x93\x02J\"7/v1/{parent=projects/*/locations/*/scopes/*}/namespaces:\x0fscope_namespace\x12\x8c\x02\n\x14UpdateScopeNamespace\x12\x33.google.cloud.gkehub.v1.UpdateScopeNamespaceRequest\x1a\x1d.google.longrunning.Operation\"\x9f\x01\xca\x41\x1e\n\tNamespace\x12\x11OperationMetadata\xda\x41\x1bscope_namespace,update_mask\x82\xd3\xe4\x93\x02Z2G/v1/{scope_namespace.name=projects/*/locations/*/scopes/*/namespaces/*}:\x0fscope_namespace\x12\xdf\x01\n\x14\x44\x65leteScopeNamespace\x12\x33.google.cloud.gkehub.v1.DeleteScopeNamespaceRequest\x1a\x1d.google.longrunning.Operation\"s\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39*7/v1/{name=projects/*/locations/*/scopes/*/namespaces/*}\x12\xc8\x01\n\x13ListScopeNamespaces\x12\x32.google.cloud.gkehub.v1.ListScopeNamespacesRequest\x1a\x33.google.cloud.gkehub.v1.ListScopeNamespacesResponse\"H\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x39\x12\x37/v1/{parent=projects/*/locations/*/scopes/*}/namespaces\x12\xc8\x01\n\x17GetScopeRBACRoleBinding\x12\x36.google.cloud.gkehub.v1.GetScopeRBACRoleBindingRequest\x1a\'.google.cloud.gkehub.v1.RBACRoleBinding\"L\xda\x41\x04name\x82\xd3\xe4\x93\x02?\x12=/v1/{name=projects/*/locations/*/scopes/*/rbacrolebindings/*}\x12\xa2\x02\n\x1a\x43reateScopeRBACRoleBinding\x12\x39.google.cloud.gkehub.v1.CreateScopeRBACRoleBindingRequest\x1a\x1d.google.longrunning.Operation\"\xa9\x01\xca\x41$\n\x0fRBACRoleBinding\x12\x11OperationMetadata\xda\x41)parent,rbacrolebinding,rbacrolebinding_id\x82\xd3\xe4\x93\x02P\"=/v1/{parent=projects/*/locations/*/scopes/*}/rbacrolebindings:\x0frbacrolebinding\x12\xa4\x02\n\x1aUpdateScopeRBACRoleBinding\x12\x39.google.cloud.gkehub.v1.UpdateScopeRBACRoleBindingRequest\x1a\x1d.google.longrunning.Operation\"\xab\x01\xca\x41$\n\x0fRBACRoleBinding\x12\x11OperationMetadata\xda\x41\x1brbacrolebinding,update_mask\x82\xd3\xe4\x93\x02`2M/v1/{rbacrolebinding.name=projects/*/locations/*/scopes/*/rbacrolebindings/*}:\x0frbacrolebinding\x12\xf1\x01\n\x1a\x44\x65leteScopeRBACRoleBinding\x12\x39.google.cloud.gkehub.v1.DeleteScopeRBACRoleBindingRequest\x1a\x1d.google.longrunning.Operation\"y\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02?*=/v1/{name=projects/*/locations/*/scopes/*/rbacrolebindings/*}\x12\xe0\x01\n\x19ListScopeRBACRoleBindings\x12\x38.google.cloud.gkehub.v1.ListScopeRBACRoleBindingsRequest\x1a\x39.google.cloud.gkehub.v1.ListScopeRBACRoleBindingsResponse\"N\xda\x41\x06parent\x82\xd3\xe4\x93\x02?\x12=/v1/{parent=projects/*/locations/*/scopes/*}/rbacrolebindings\x12\x8d\x01\n\x08GetScope\x12\'.google.cloud.gkehub.v1.GetScopeRequest\x1a\x1d.google.cloud.gkehub.v1.Scope\"9\xda\x41\x04name\x82\xd3\xe4\x93\x02,\x12*/v1/{name=projects/*/locations/*/scopes/*}\x12\xc8\x01\n\x0b\x43reateScope\x12*.google.cloud.gkehub.v1.CreateScopeRequest\x1a\x1d.google.longrunning.Operation\"n\xca\x41\x1a\n\x05Scope\x12\x11OperationMetadata\xda\x41\x15parent,scope,scope_id\x82\xd3\xe4\x93\x02\x33\"*/v1/{parent=projects/*/locations/*}/scopes:\x05scope\x12\xca\x01\n\x0bUpdateScope\x12*.google.cloud.gkehub.v1.UpdateScopeRequest\x1a\x1d.google.longrunning.Operation\"p\xca\x41\x1a\n\x05Scope\x12\x11OperationMetadata\xda\x41\x11scope,update_mask\x82\xd3\xe4\x93\x02\x39\x32\x30/v1/{scope.name=projects/*/locations/*/scopes/*}:\x05scope\x12\xc0\x01\n\x0b\x44\x65leteScope\x12*.google.cloud.gkehub.v1.DeleteScopeRequest\x1a\x1d.google.longrunning.Operation\"f\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02,**/v1/{name=projects/*/locations/*/scopes/*}\x12\xa0\x01\n\nListScopes\x12).google.cloud.gkehub.v1.ListScopesRequest\x1a*.google.cloud.gkehub.v1.ListScopesResponse\";\xda\x41\x06parent\x82\xd3\xe4\x93\x02,\x12*/v1/{parent=projects/*/locations/*}/scopes\x12\xc9\x01\n\x13ListPermittedScopes\x12\x32.google.cloud.gkehub.v1.ListPermittedScopesRequest\x1a\x33.google.cloud.gkehub.v1.ListPermittedScopesResponse\"I\xda\x41\x06parent\x82\xd3\xe4\x93\x02:\x12\x38/v1/{parent=projects/*/locations/*}/scopes:listPermitted\x12\xc1\x01\n\x14GetMembershipBinding\x12\x33.google.cloud.gkehub.v1.GetMembershipBindingRequest\x1a).google.cloud.gkehub.v1.MembershipBinding\"I\xda\x41\x04name\x82\xd3\xe4\x93\x02<\x12:/v1/{name=projects/*/locations/*/memberships/*/bindings/*}\x12\xa4\x02\n\x17\x43reateMembershipBinding\x12\x36.google.cloud.gkehub.v1.CreateMembershipBindingRequest\x1a\x1d.google.longrunning.Operation\"\xb1\x01\xca\x41&\n\x11MembershipBinding\x12\x11OperationMetadata\xda\x41/parent,membership_binding,membership_binding_id\x82\xd3\xe4\x93\x02P\":/v1/{parent=projects/*/locations/*/memberships/*}/bindings:\x12membership_binding\x12\xa6\x02\n\x17UpdateMembershipBinding\x12\x36.google.cloud.gkehub.v1.UpdateMembershipBindingRequest\x1a\x1d.google.longrunning.Operation\"\xb3\x01\xca\x41&\n\x11MembershipBinding\x12\x11OperationMetadata\xda\x41\x1emembership_binding,update_mask\x82\xd3\xe4\x93\x02\x63\x32M/v1/{membership_binding.name=projects/*/locations/*/memberships/*/bindings/*}:\x12membership_binding\x12\xe8\x01\n\x17\x44\x65leteMembershipBinding\x12\x36.google.cloud.gkehub.v1.DeleteMembershipBindingRequest\x1a\x1d.google.longrunning.Operation\"v\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02<*:/v1/{name=projects/*/locations/*/memberships/*/bindings/*}\x12\xd4\x01\n\x16ListMembershipBindings\x12\x35.google.cloud.gkehub.v1.ListMembershipBindingsRequest\x1a\x36.google.cloud.gkehub.v1.ListMembershipBindingsResponse\"K\xda\x41\x06parent\x82\xd3\xe4\x93\x02<\x12:/v1/{parent=projects/*/locations/*/memberships/*}/bindings\x12\xd7\x01\n\x1cGetMembershipRBACRoleBinding\x12;.google.cloud.gkehub.v1.GetMembershipRBACRoleBindingRequest\x1a\'.google.cloud.gkehub.v1.RBACRoleBinding\"Q\xda\x41\x04name\x82\xd3\xe4\x93\x02\x44\x12\x42/v1/{name=projects/*/locations/*/memberships/*/rbacrolebindings/*}\x12\xb1\x02\n\x1f\x43reateMembershipRBACRoleBinding\x12>.google.cloud.gkehub.v1.CreateMembershipRBACRoleBindingRequest\x1a\x1d.google.longrunning.Operation\"\xae\x01\xca\x41$\n\x0fRBACRoleBinding\x12\x11OperationMetadata\xda\x41)parent,rbacrolebinding,rbacrolebinding_id\x82\xd3\xe4\x93\x02U\"B/v1/{parent=projects/*/locations/*/memberships/*}/rbacrolebindings:\x0frbacrolebinding\x12\xb3\x02\n\x1fUpdateMembershipRBACRoleBinding\x12>.google.cloud.gkehub.v1.UpdateMembershipRBACRoleBindingRequest\x1a\x1d.google.longrunning.Operation\"\xb0\x01\xca\x41$\n\x0fRBACRoleBinding\x12\x11OperationMetadata\xda\x41\x1brbacrolebinding,update_mask\x82\xd3\xe4\x93\x02\x65\x32R/v1/{rbacrolebinding.name=projects/*/locations/*/memberships/*/rbacrolebindings/*}:\x0frbacrolebinding\x12\x80\x02\n\x1f\x44\x65leteMembershipRBACRoleBinding\x12>.google.cloud.gkehub.v1.DeleteMembershipRBACRoleBindingRequest\x1a\x1d.google.longrunning.Operation\"~\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x44*B/v1/{name=projects/*/locations/*/memberships/*/rbacrolebindings/*}\x12\xf4\x01\n\x1eListMembershipRBACRoleBindings\x12=.google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsRequest\x1a>.google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsResponse\"S\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x44\x12\x42/v1/{parent=projects/*/locations/*/memberships/*}/rbacrolebindings\x12\xb8\x02\n%GenerateMembershipRBACRoleBindingYAML\x12\x44.google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLRequest\x1a\x45.google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLResponse\"\x81\x01\x82\xd3\xe4\x93\x02{\"h/v1/{parent=projects/*/locations/*/memberships/*}/rbacrolebindings:generateMembershipRBACRoleBindingYAML:\x0frbacrolebinding\x1aI\xca\x41\x15gkehub.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xae\x01\n\x1a\x63om.google.cloud.gkehub.v1B\x0cServiceProtoP\x01Z2cloud.google.com/go/gkehub/apiv1/gkehubpb;gkehubpb\xaa\x02\x16Google.Cloud.GkeHub.V1\xca\x02\x16Google\\Cloud\\GkeHub\\V1\xea\x02\x19Google::Cloud::GkeHub::V1b\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.cloud.gkehub.v1.Namespace", "google/cloud/gkehub/v1/fleet.proto"], - ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], - ["google.cloud.gkehub.v1.Membership", "google/cloud/gkehub/v1/membership.proto"], - ["google.cloud.gkehub.v1.Feature", "google/cloud/gkehub/v1/feature.proto"], - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module GkeHub - module V1 - GetScopeNamespaceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.GetScopeNamespaceRequest").msgclass - CreateScopeNamespaceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.CreateScopeNamespaceRequest").msgclass - UpdateScopeNamespaceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.UpdateScopeNamespaceRequest").msgclass - DeleteScopeNamespaceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.DeleteScopeNamespaceRequest").msgclass - ListScopeNamespacesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.ListScopeNamespacesRequest").msgclass - ListScopeNamespacesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.ListScopeNamespacesResponse").msgclass - GetScopeRBACRoleBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.GetScopeRBACRoleBindingRequest").msgclass - CreateScopeRBACRoleBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.CreateScopeRBACRoleBindingRequest").msgclass - UpdateScopeRBACRoleBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.UpdateScopeRBACRoleBindingRequest").msgclass - DeleteScopeRBACRoleBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.DeleteScopeRBACRoleBindingRequest").msgclass - ListScopeRBACRoleBindingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.ListScopeRBACRoleBindingsRequest").msgclass - ListScopeRBACRoleBindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.ListScopeRBACRoleBindingsResponse").msgclass - GetScopeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.GetScopeRequest").msgclass - CreateScopeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.CreateScopeRequest").msgclass - UpdateScopeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.UpdateScopeRequest").msgclass - DeleteScopeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.DeleteScopeRequest").msgclass - ListScopesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.ListScopesRequest").msgclass - ListScopesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.ListScopesResponse").msgclass - ListPermittedScopesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.ListPermittedScopesRequest").msgclass - ListPermittedScopesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.ListPermittedScopesResponse").msgclass - GetMembershipBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.GetMembershipBindingRequest").msgclass - CreateMembershipBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.CreateMembershipBindingRequest").msgclass - UpdateMembershipBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.UpdateMembershipBindingRequest").msgclass - DeleteMembershipBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.DeleteMembershipBindingRequest").msgclass - ListMembershipBindingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.ListMembershipBindingsRequest").msgclass - ListMembershipBindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.ListMembershipBindingsResponse").msgclass - ListMembershipsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.ListMembershipsRequest").msgclass - GetMembershipRBACRoleBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.GetMembershipRBACRoleBindingRequest").msgclass - CreateMembershipRBACRoleBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.CreateMembershipRBACRoleBindingRequest").msgclass - UpdateMembershipRBACRoleBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.UpdateMembershipRBACRoleBindingRequest").msgclass - DeleteMembershipRBACRoleBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.DeleteMembershipRBACRoleBindingRequest").msgclass - ListMembershipRBACRoleBindingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsRequest").msgclass - ListMembershipRBACRoleBindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsResponse").msgclass - GenerateMembershipRBACRoleBindingYAMLRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLRequest").msgclass - GenerateMembershipRBACRoleBindingYAMLResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLResponse").msgclass - ListMembershipsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.ListMembershipsResponse").msgclass - GetMembershipRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.GetMembershipRequest").msgclass - ListBoundMembershipsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.ListBoundMembershipsRequest").msgclass - ListBoundMembershipsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.ListBoundMembershipsResponse").msgclass - CreateMembershipRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.CreateMembershipRequest").msgclass - DeleteMembershipRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.DeleteMembershipRequest").msgclass - UpdateMembershipRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.UpdateMembershipRequest").msgclass - GenerateConnectManifestRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.GenerateConnectManifestRequest").msgclass - GenerateConnectManifestResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.GenerateConnectManifestResponse").msgclass - ConnectAgentResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.ConnectAgentResource").msgclass - TypeMeta = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.TypeMeta").msgclass - ListFeaturesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.ListFeaturesRequest").msgclass - ListFeaturesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.ListFeaturesResponse").msgclass - GetFeatureRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.GetFeatureRequest").msgclass - CreateFeatureRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.CreateFeatureRequest").msgclass - DeleteFeatureRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.DeleteFeatureRequest").msgclass - UpdateFeatureRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.UpdateFeatureRequest").msgclass - CreateFleetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.CreateFleetRequest").msgclass - GetFleetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.GetFleetRequest").msgclass - UpdateFleetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.UpdateFleetRequest").msgclass - DeleteFleetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.DeleteFleetRequest").msgclass - ListFleetsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.ListFleetsRequest").msgclass - ListFleetsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.ListFleetsResponse").msgclass - OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkehub.v1.OperationMetadata").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gkehub/v1/service_services_pb.rb b/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gkehub/v1/service_services_pb.rb deleted file mode 100644 index bfb2e77eb718..000000000000 --- a/owl-bot-staging/google-cloud-gke_hub-v1/lib/google/cloud/gkehub/v1/service_services_pb.rb +++ /dev/null @@ -1,161 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/gkehub/v1/service.proto for package 'Google.Cloud.GkeHub.V1' -# Original file comments: -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/cloud/gkehub/v1/service_pb' - -module Google - module Cloud - module GkeHub - module V1 - module GkeHub - # The GKE Hub service handles the registration of many Kubernetes clusters to - # Google Cloud, and the management of multi-cluster features over those - # clusters. - # - # The GKE Hub service operates on the following resources: - # - # * [Membership][google.cloud.gkehub.v1.Membership] - # * [Feature][google.cloud.gkehub.v1.Feature] - # - # GKE Hub is currently available in the global region and all regions in - # https://cloud.google.com/compute/docs/regions-zones. Feature is only - # available in global region while membership is global region and all the - # regions. - # - # **Membership management may be non-trivial:** it is recommended to use one - # of the Google-provided client libraries or tools where possible when working - # with Membership resources. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.gkehub.v1.GkeHub' - - # Lists Memberships in a given project and location. - rpc :ListMemberships, ::Google::Cloud::GkeHub::V1::ListMembershipsRequest, ::Google::Cloud::GkeHub::V1::ListMembershipsResponse - # Lists Memberships bound to a Scope. The response includes relevant - # Memberships from all regions. - rpc :ListBoundMemberships, ::Google::Cloud::GkeHub::V1::ListBoundMembershipsRequest, ::Google::Cloud::GkeHub::V1::ListBoundMembershipsResponse - # Lists Features in a given project and location. - rpc :ListFeatures, ::Google::Cloud::GkeHub::V1::ListFeaturesRequest, ::Google::Cloud::GkeHub::V1::ListFeaturesResponse - # Gets the details of a Membership. - rpc :GetMembership, ::Google::Cloud::GkeHub::V1::GetMembershipRequest, ::Google::Cloud::GkeHub::V1::Membership - # Gets details of a single Feature. - rpc :GetFeature, ::Google::Cloud::GkeHub::V1::GetFeatureRequest, ::Google::Cloud::GkeHub::V1::Feature - # Creates a new Membership. - # - # **This is currently only supported for GKE clusters on Google Cloud**. - # To register other clusters, follow the instructions at - # https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster. - rpc :CreateMembership, ::Google::Cloud::GkeHub::V1::CreateMembershipRequest, ::Google::Longrunning::Operation - # Adds a new Feature. - rpc :CreateFeature, ::Google::Cloud::GkeHub::V1::CreateFeatureRequest, ::Google::Longrunning::Operation - # Removes a Membership. - # - # **This is currently only supported for GKE clusters on Google Cloud**. - # To unregister other clusters, follow the instructions at - # https://cloud.google.com/anthos/multicluster-management/connect/unregistering-a-cluster. - rpc :DeleteMembership, ::Google::Cloud::GkeHub::V1::DeleteMembershipRequest, ::Google::Longrunning::Operation - # Removes a Feature. - rpc :DeleteFeature, ::Google::Cloud::GkeHub::V1::DeleteFeatureRequest, ::Google::Longrunning::Operation - # Updates an existing Membership. - rpc :UpdateMembership, ::Google::Cloud::GkeHub::V1::UpdateMembershipRequest, ::Google::Longrunning::Operation - # Updates an existing Feature. - rpc :UpdateFeature, ::Google::Cloud::GkeHub::V1::UpdateFeatureRequest, ::Google::Longrunning::Operation - # Generates the manifest for deployment of the GKE connect agent. - # - # **This method is used internally by Google-provided libraries.** - # Most clients should not need to call this method directly. - rpc :GenerateConnectManifest, ::Google::Cloud::GkeHub::V1::GenerateConnectManifestRequest, ::Google::Cloud::GkeHub::V1::GenerateConnectManifestResponse - # Creates a fleet. - rpc :CreateFleet, ::Google::Cloud::GkeHub::V1::CreateFleetRequest, ::Google::Longrunning::Operation - # Returns the details of a fleet. - rpc :GetFleet, ::Google::Cloud::GkeHub::V1::GetFleetRequest, ::Google::Cloud::GkeHub::V1::Fleet - # Updates a fleet. - rpc :UpdateFleet, ::Google::Cloud::GkeHub::V1::UpdateFleetRequest, ::Google::Longrunning::Operation - # Removes a Fleet. There must be no memberships remaining in the Fleet. - rpc :DeleteFleet, ::Google::Cloud::GkeHub::V1::DeleteFleetRequest, ::Google::Longrunning::Operation - # Returns all fleets within an organization or a project that the caller has - # access to. - rpc :ListFleets, ::Google::Cloud::GkeHub::V1::ListFleetsRequest, ::Google::Cloud::GkeHub::V1::ListFleetsResponse - # Returns the details of a fleet namespace. - rpc :GetScopeNamespace, ::Google::Cloud::GkeHub::V1::GetScopeNamespaceRequest, ::Google::Cloud::GkeHub::V1::Namespace - # Creates a fleet namespace. - rpc :CreateScopeNamespace, ::Google::Cloud::GkeHub::V1::CreateScopeNamespaceRequest, ::Google::Longrunning::Operation - # Updates a fleet namespace. - rpc :UpdateScopeNamespace, ::Google::Cloud::GkeHub::V1::UpdateScopeNamespaceRequest, ::Google::Longrunning::Operation - # Deletes a fleet namespace. - rpc :DeleteScopeNamespace, ::Google::Cloud::GkeHub::V1::DeleteScopeNamespaceRequest, ::Google::Longrunning::Operation - # Lists fleet namespaces. - rpc :ListScopeNamespaces, ::Google::Cloud::GkeHub::V1::ListScopeNamespacesRequest, ::Google::Cloud::GkeHub::V1::ListScopeNamespacesResponse - # Returns the details of a Scope RBACRoleBinding. - rpc :GetScopeRBACRoleBinding, ::Google::Cloud::GkeHub::V1::GetScopeRBACRoleBindingRequest, ::Google::Cloud::GkeHub::V1::RBACRoleBinding - # Creates a Scope RBACRoleBinding. - rpc :CreateScopeRBACRoleBinding, ::Google::Cloud::GkeHub::V1::CreateScopeRBACRoleBindingRequest, ::Google::Longrunning::Operation - # Updates a Scope RBACRoleBinding. - rpc :UpdateScopeRBACRoleBinding, ::Google::Cloud::GkeHub::V1::UpdateScopeRBACRoleBindingRequest, ::Google::Longrunning::Operation - # Deletes a Scope RBACRoleBinding. - rpc :DeleteScopeRBACRoleBinding, ::Google::Cloud::GkeHub::V1::DeleteScopeRBACRoleBindingRequest, ::Google::Longrunning::Operation - # Lists all Scope RBACRoleBindings. - rpc :ListScopeRBACRoleBindings, ::Google::Cloud::GkeHub::V1::ListScopeRBACRoleBindingsRequest, ::Google::Cloud::GkeHub::V1::ListScopeRBACRoleBindingsResponse - # Returns the details of a Scope. - rpc :GetScope, ::Google::Cloud::GkeHub::V1::GetScopeRequest, ::Google::Cloud::GkeHub::V1::Scope - # Creates a Scope. - rpc :CreateScope, ::Google::Cloud::GkeHub::V1::CreateScopeRequest, ::Google::Longrunning::Operation - # Updates a scopes. - rpc :UpdateScope, ::Google::Cloud::GkeHub::V1::UpdateScopeRequest, ::Google::Longrunning::Operation - # Deletes a Scope. - rpc :DeleteScope, ::Google::Cloud::GkeHub::V1::DeleteScopeRequest, ::Google::Longrunning::Operation - # Lists Scopes. - rpc :ListScopes, ::Google::Cloud::GkeHub::V1::ListScopesRequest, ::Google::Cloud::GkeHub::V1::ListScopesResponse - # Lists permitted Scopes. - rpc :ListPermittedScopes, ::Google::Cloud::GkeHub::V1::ListPermittedScopesRequest, ::Google::Cloud::GkeHub::V1::ListPermittedScopesResponse - # Returns the details of a MembershipBinding. - rpc :GetMembershipBinding, ::Google::Cloud::GkeHub::V1::GetMembershipBindingRequest, ::Google::Cloud::GkeHub::V1::MembershipBinding - # Creates a MembershipBinding. - rpc :CreateMembershipBinding, ::Google::Cloud::GkeHub::V1::CreateMembershipBindingRequest, ::Google::Longrunning::Operation - # Updates a MembershipBinding. - rpc :UpdateMembershipBinding, ::Google::Cloud::GkeHub::V1::UpdateMembershipBindingRequest, ::Google::Longrunning::Operation - # Deletes a MembershipBinding. - rpc :DeleteMembershipBinding, ::Google::Cloud::GkeHub::V1::DeleteMembershipBindingRequest, ::Google::Longrunning::Operation - # Lists MembershipBindings. - rpc :ListMembershipBindings, ::Google::Cloud::GkeHub::V1::ListMembershipBindingsRequest, ::Google::Cloud::GkeHub::V1::ListMembershipBindingsResponse - # Returns the details of a Membership RBACRoleBinding. - rpc :GetMembershipRBACRoleBinding, ::Google::Cloud::GkeHub::V1::GetMembershipRBACRoleBindingRequest, ::Google::Cloud::GkeHub::V1::RBACRoleBinding - # Creates a Membership RBACRoleBinding. - rpc :CreateMembershipRBACRoleBinding, ::Google::Cloud::GkeHub::V1::CreateMembershipRBACRoleBindingRequest, ::Google::Longrunning::Operation - # Updates a Membership RBACRoleBinding. - rpc :UpdateMembershipRBACRoleBinding, ::Google::Cloud::GkeHub::V1::UpdateMembershipRBACRoleBindingRequest, ::Google::Longrunning::Operation - # Deletes a Membership RBACRoleBinding. - rpc :DeleteMembershipRBACRoleBinding, ::Google::Cloud::GkeHub::V1::DeleteMembershipRBACRoleBindingRequest, ::Google::Longrunning::Operation - # Lists all Membership RBACRoleBindings. - rpc :ListMembershipRBACRoleBindings, ::Google::Cloud::GkeHub::V1::ListMembershipRBACRoleBindingsRequest, ::Google::Cloud::GkeHub::V1::ListMembershipRBACRoleBindingsResponse - # Generates a YAML of the RBAC policies for the specified - # RoleBinding and its associated impersonation resources. - rpc :GenerateMembershipRBACRoleBindingYAML, ::Google::Cloud::GkeHub::V1::GenerateMembershipRBACRoleBindingYAMLRequest, ::Google::Cloud::GkeHub::V1::GenerateMembershipRBACRoleBindingYAMLResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/README.md deleted file mode 100644 index dd253e4b0c37..000000000000 --- a/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# GKE Hub V1 Protocol Buffer Documentation - -These files are for the YARD documentation of the generated protobuf files. -They are not intended to be required or loaded at runtime. diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/api/client.rb deleted file mode 100644 index d59ba51a5612..000000000000 --- a/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,473 +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. - 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: - # 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. - 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. - # - # 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 - 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. - # @!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 - - # 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 - end -end diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/api/field_behavior.rb +++ /dev/null @@ -1,85 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # An indicator of the behavior of a given field (for example, that a field - # is required in requests, or given as output but ignored as input). - # This **does not** change the behavior in protocol buffers itself; it only - # denotes the behavior and may affect how API tooling handles the field. - # - # Note: This enum **may** receive new values in the future. - module FieldBehavior - # Conventional default for enums. Do not use this. - FIELD_BEHAVIOR_UNSPECIFIED = 0 - - # Specifically denotes a field as optional. - # While all fields in protocol buffers are optional, this may be specified - # for emphasis if appropriate. - OPTIONAL = 1 - - # Denotes a field as required. - # This indicates that the field **must** be provided as part of the request, - # and failure to do so will cause an error (usually `INVALID_ARGUMENT`). - REQUIRED = 2 - - # Denotes a field as output only. - # This indicates that the field is provided in responses, but including the - # field in a request does nothing (the server *must* ignore it and - # *must not* throw an error as a result of the field's presence). - OUTPUT_ONLY = 3 - - # Denotes a field as input only. - # This indicates that the field is provided in requests, and the - # corresponding field is not included in output. - INPUT_ONLY = 4 - - # Denotes a field as immutable. - # This indicates that the field may be set once in a request to create a - # resource, but may not be changed thereafter. - IMMUTABLE = 5 - - # Denotes that a (repeated) field is an unordered list. - # This indicates that the service may provide the elements of the list - # in any arbitrary order, rather than the order the user originally - # provided. Additionally, the list's order may or may not be stable. - UNORDERED_LIST = 6 - - # Denotes that this field returns a non-empty default value if not set. - # This indicates that if the user provides the empty value in a request, - # a non-empty value will be returned. The user will not be aware of what - # non-empty value to expect. - NON_EMPTY_DEFAULT = 7 - - # Denotes that the field in a resource (a message annotated with - # google.api.resource) is used in the resource name to uniquely identify the - # resource. For AIP-compliant APIs, this should only be applied to the - # `name` field on the resource. - # - # This behavior should not be applied to references to other resources within - # the message. - # - # The identifier field of resources often have different field behavior - # depending on the request it is embedded in (e.g. for Create methods name - # is optional and unused, while for Update methods it is required). Instead - # of method-specific annotations, only `IDENTIFIER` is required. - IDENTIFIER = 8 - end - end -end diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/api/launch_stage.rb +++ /dev/null @@ -1,71 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # The launch stage as defined by [Google Cloud Platform - # Launch Stages](https://cloud.google.com/terms/launch-stages). - module LaunchStage - # Do not use this default value. - LAUNCH_STAGE_UNSPECIFIED = 0 - - # The feature is not yet implemented. Users can not use it. - UNIMPLEMENTED = 6 - - # Prelaunch features are hidden from users and are only visible internally. - PRELAUNCH = 7 - - # Early Access features are limited to a closed group of testers. To use - # these features, you must sign up in advance and sign a Trusted Tester - # agreement (which includes confidentiality provisions). These features may - # be unstable, changed in backward-incompatible ways, and are not - # guaranteed to be released. - EARLY_ACCESS = 1 - - # Alpha is a limited availability test for releases before they are cleared - # for widespread use. By Alpha, all significant design issues are resolved - # and we are in the process of verifying functionality. Alpha customers - # need to apply for access, agree to applicable terms, and have their - # projects allowlisted. Alpha releases don't have to be feature complete, - # no SLAs are provided, and there are no technical support obligations, but - # they will be far enough along that customers can actually use them in - # test environments or for limited-use tests -- just like they would in - # normal production cases. - ALPHA = 2 - - # Beta is the point at which we are ready to open a release for any - # customer to use. There are no SLA or technical support obligations in a - # Beta release. Products will be complete from a feature perspective, but - # may have some open outstanding issues. Beta releases are suitable for - # limited production use cases. - BETA = 3 - - # GA features are open to all developers and are considered stable and - # fully qualified for production use. - GA = 4 - - # Deprecated features are scheduled to be shut down and removed. For more - # information, see the "Deprecation Policy" section of our [Terms of - # Service](https://cloud.google.com/terms/) - # and the [Google Cloud Platform Subject to the Deprecation - # Policy](https://cloud.google.com/terms/deprecation) documentation. - DEPRECATED = 5 - end - end -end diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/api/resource.rb +++ /dev/null @@ -1,227 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # A simple descriptor of a resource type. - # - # ResourceDescriptor annotates a resource message (either by means of a - # protobuf annotation or use in the service config), and associates the - # resource's schema, the resource type, and the pattern of the resource name. - # - # Example: - # - # message Topic { - # // Indicates this message defines a resource schema. - # // Declares the resource type in the format of {service}/{kind}. - # // For Kubernetes resources, the format is {api group}/{kind}. - # option (google.api.resource) = { - # type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: "pubsub.googleapis.com/Topic" - # pattern: "projects/{project}/topics/{topic}" - # - # Sometimes, resources have multiple patterns, typically because they can - # live under multiple parents. - # - # Example: - # - # message LogEntry { - # option (google.api.resource) = { - # type: "logging.googleapis.com/LogEntry" - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # }; - # } - # - # The ResourceDescriptor Yaml config will look like: - # - # resources: - # - type: 'logging.googleapis.com/LogEntry' - # pattern: "projects/{project}/logs/{log}" - # pattern: "folders/{folder}/logs/{log}" - # pattern: "organizations/{organization}/logs/{log}" - # pattern: "billingAccounts/{billing_account}/logs/{log}" - # @!attribute [rw] type - # @return [::String] - # The resource type. It must be in the format of - # \\{service_name}/\\{resource_type_kind}. The `resource_type_kind` must be - # singular and must not include version numbers. - # - # Example: `storage.googleapis.com/Bucket` - # - # The value of the resource_type_kind must follow the regular expression - # /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and - # should use PascalCase (UpperCamelCase). The maximum number of - # characters allowed for the `resource_type_kind` is 100. - # @!attribute [rw] pattern - # @return [::Array<::String>] - # Optional. The relative resource name pattern associated with this resource - # type. The DNS prefix of the full resource name shouldn't be specified here. - # - # The path pattern must follow the syntax, which aligns with HTTP binding - # syntax: - # - # Template = Segment { "/" Segment } ; - # Segment = LITERAL | Variable ; - # Variable = "{" LITERAL "}" ; - # - # Examples: - # - # - "projects/\\{project}/topics/\\{topic}" - # - "projects/\\{project}/knowledgeBases/\\{knowledge_base}" - # - # The components in braces correspond to the IDs for each resource in the - # hierarchy. It is expected that, if multiple patterns are provided, - # the same component name (e.g. "project") refers to IDs of the same - # type of resource. - # @!attribute [rw] name_field - # @return [::String] - # Optional. The field on the resource that designates the resource name - # field. If omitted, this is assumed to be "name". - # @!attribute [rw] history - # @return [::Google::Api::ResourceDescriptor::History] - # Optional. The historical or future-looking state of the resource pattern. - # - # Example: - # - # // The InspectTemplate message originally only supported resource - # // names with organization, and project was added later. - # message InspectTemplate { - # option (google.api.resource) = { - # type: "dlp.googleapis.com/InspectTemplate" - # pattern: - # "organizations/{organization}/inspectTemplates/{inspect_template}" - # pattern: "projects/{project}/inspectTemplates/{inspect_template}" - # history: ORIGINALLY_SINGLE_PATTERN - # }; - # } - # @!attribute [rw] plural - # @return [::String] - # The plural name used in the resource name and permission names, such as - # 'projects' for the resource name of 'projects/\\{project}' and the permission - # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception - # to this is for Nested Collections that have stuttering names, as defined - # in [AIP-122](https://google.aip.dev/122#nested-collections), where the - # collection ID in the resource name pattern does not necessarily directly - # match the `plural` value. - # - # It is the same concept of the `plural` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # - # Note: The plural form is required even for singleton resources. See - # https://aip.dev/156 - # @!attribute [rw] singular - # @return [::String] - # The same concept of the `singular` field in k8s CRD spec - # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/ - # Such as "project" for the `resourcemanager.googleapis.com/Project` type. - # @!attribute [rw] style - # @return [::Array<::Google::Api::ResourceDescriptor::Style>] - # Style flag(s) for this resource. - # These indicate that a resource is expected to conform to a given - # style. See the specific style flags for additional information. - class ResourceDescriptor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A description of the historical or future-looking state of the - # resource pattern. - module History - # The "unset" value. - HISTORY_UNSPECIFIED = 0 - - # The resource originally had one pattern and launched as such, and - # additional patterns were added later. - ORIGINALLY_SINGLE_PATTERN = 1 - - # The resource has one pattern, but the API owner expects to add more - # later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents - # that from being necessary once there are multiple patterns.) - FUTURE_MULTI_PATTERN = 2 - end - - # A flag representing a specific style that a resource claims to conform to. - module Style - # The unspecified value. Do not use. - STYLE_UNSPECIFIED = 0 - - # This resource is intended to be "declarative-friendly". - # - # Declarative-friendly resources must be more strictly consistent, and - # setting this to true communicates to tools that this resource should - # adhere to declarative-friendly expectations. - # - # Note: This is used by the API linter (linter.aip.dev) to enable - # additional checks. - DECLARATIVE_FRIENDLY = 1 - end - end - - # Defines a proto annotation that describes a string field that refers to - # an API resource. - # @!attribute [rw] type - # @return [::String] - # The resource type that the annotated field references. - # - # Example: - # - # message Subscription { - # string topic = 2 [(google.api.resource_reference) = { - # type: "pubsub.googleapis.com/Topic" - # }]; - # } - # - # Occasionally, a field may reference an arbitrary resource. In this case, - # APIs use the special value * in their resource reference. - # - # Example: - # - # message GetIamPolicyRequest { - # string resource = 2 [(google.api.resource_reference) = { - # type: "*" - # }]; - # } - # @!attribute [rw] child_type - # @return [::String] - # The resource type of a child collection that the annotated field - # references. This is useful for annotating the `parent` field that - # doesn't have a fixed resource type. - # - # Example: - # - # message ListLogEntriesRequest { - # string parent = 1 [(google.api.resource_reference) = { - # child_type: "logging.googleapis.com/LogEntry" - # }; - # } - class ResourceReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/cloud/gkehub/v1/configmanagement/configmanagement.rb b/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/cloud/gkehub/v1/configmanagement/configmanagement.rb deleted file mode 100644 index e97869ebf5d8..000000000000 --- a/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/cloud/gkehub/v1/configmanagement/configmanagement.rb +++ /dev/null @@ -1,584 +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 GkeHub - module ConfigManagement - module V1 - # **Anthos Config Management**: State for a single cluster. - # @!attribute [rw] cluster_name - # @return [::String] - # This field is set to the `cluster_name` field of the Membership Spec if it - # is not empty. Otherwise, it is set to the cluster's fleet membership name. - # @!attribute [rw] membership_spec - # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::MembershipSpec] - # Membership configuration in the cluster. This represents the actual state - # in the cluster, while the MembershipSpec in the FeatureSpec represents - # the intended state - # @!attribute [rw] operator_state - # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::OperatorState] - # Current install status of ACM's Operator - # @!attribute [rw] config_sync_state - # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::ConfigSyncState] - # Current sync status - # @!attribute [rw] policy_controller_state - # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::PolicyControllerState] - # PolicyController status - # @!attribute [rw] hierarchy_controller_state - # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::HierarchyControllerState] - # Hierarchy Controller status - class MembershipState - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # **Anthos Config Management**: Configuration for a single cluster. - # Intended to parallel the ConfigManagement CR. - # @!attribute [rw] config_sync - # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::ConfigSync] - # Config Sync configuration for the cluster. - # @!attribute [rw] policy_controller - # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::PolicyController] - # Policy Controller configuration for the cluster. - # @!attribute [rw] hierarchy_controller - # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::HierarchyControllerConfig] - # Hierarchy Controller configuration for the cluster. - # @!attribute [rw] version - # @return [::String] - # Version of ACM installed. - # @!attribute [rw] cluster - # @return [::String] - # The user-specified cluster name used by Config Sync cluster-name-selector - # annotation or ClusterSelector, for applying configs to only a subset - # of clusters. - # Omit this field if the cluster's fleet membership name is used by Config - # Sync cluster-name-selector annotation or ClusterSelector. - # Set this field if a name different from the cluster's fleet membership name - # is used by Config Sync cluster-name-selector annotation or ClusterSelector. - # @!attribute [rw] management - # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::MembershipSpec::Management] - # Enables automatic Feature management. - class MembershipSpec - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Whether to automatically manage the Feature. - module Management - # Unspecified - MANAGEMENT_UNSPECIFIED = 0 - - # Google will manage the Feature for the cluster. - MANAGEMENT_AUTOMATIC = 1 - - # User will manually manage the Feature for the cluster. - MANAGEMENT_MANUAL = 2 - end - end - - # Configuration for Config Sync - # @!attribute [rw] git - # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::GitConfig] - # Git repo configuration for the cluster. - # @!attribute [rw] source_format - # @return [::String] - # Specifies whether the Config Sync Repo is - # in "hierarchical" or "unstructured" mode. - # @!attribute [rw] enabled - # @return [::Boolean] - # Enables the installation of ConfigSync. - # If set to true, ConfigSync resources will be created and the other - # ConfigSync fields will be applied if exist. - # If set to false, all other ConfigSync fields will be ignored, ConfigSync - # resources will be deleted. - # If omitted, ConfigSync resources will be managed depends on the presence - # of the git or oci field. - # @!attribute [rw] prevent_drift - # @return [::Boolean] - # Set to true to enable the Config Sync admission webhook to prevent drifts. - # If set to `false`, disables the Config Sync admission webhook and does not - # prevent drifts. - # @!attribute [rw] oci - # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::OciConfig] - # OCI repo configuration for the cluster - # @!attribute [rw] metrics_gcp_service_account_email - # @return [::String] - # The Email of the Google Cloud Service Account (GSA) used for exporting - # Config Sync metrics to Cloud Monitoring when Workload Identity is enabled. - # The GSA should have the Monitoring Metric Writer - # (roles/monitoring.metricWriter) IAM role. - # The Kubernetes ServiceAccount `default` in the namespace - # `config-management-monitoring` should be bound to the GSA. - class ConfigSync - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Git repo configuration for a single cluster. - # @!attribute [rw] sync_repo - # @return [::String] - # The URL of the Git repository to use as the source of truth. - # @!attribute [rw] sync_branch - # @return [::String] - # The branch of the repository to sync from. Default: master. - # @!attribute [rw] policy_dir - # @return [::String] - # The path within the Git repository that represents the top level of the - # repo to sync. Default: the root directory of the repository. - # @!attribute [rw] sync_wait_secs - # @return [::Integer] - # Period in seconds between consecutive syncs. Default: 15. - # @!attribute [rw] sync_rev - # @return [::String] - # Git revision (tag or hash) to check out. Default HEAD. - # @!attribute [rw] secret_type - # @return [::String] - # Type of secret configured for access to the Git repo. Must be one of ssh, - # cookiefile, gcenode, token, gcpserviceaccount or none. The - # validation of this is case-sensitive. Required. - # @!attribute [rw] https_proxy - # @return [::String] - # URL for the HTTPS proxy to be used when communicating with the Git repo. - # @!attribute [rw] gcp_service_account_email - # @return [::String] - # The Google Cloud Service Account Email used for auth when secret_type is - # gcpServiceAccount. - class GitConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # OCI repo configuration for a single cluster - # @!attribute [rw] sync_repo - # @return [::String] - # The OCI image repository URL for the package to sync from. - # e.g. `LOCATION-docker.pkg.dev/PROJECT_ID/REPOSITORY_NAME/PACKAGE_NAME`. - # @!attribute [rw] policy_dir - # @return [::String] - # The absolute path of the directory that contains - # the local resources. Default: the root directory of the image. - # @!attribute [rw] sync_wait_secs - # @return [::Integer] - # Period in seconds between consecutive syncs. Default: 15. - # @!attribute [rw] secret_type - # @return [::String] - # Type of secret configured for access to the Git repo. - # @!attribute [rw] gcp_service_account_email - # @return [::String] - # The Google Cloud Service Account Email used for auth when secret_type is - # gcpServiceAccount. - class OciConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Configuration for Policy Controller - # @!attribute [rw] enabled - # @return [::Boolean] - # Enables the installation of Policy Controller. - # If false, the rest of PolicyController fields take no - # effect. - # @!attribute [rw] template_library_installed - # @return [::Boolean] - # Installs the default template library along with Policy Controller. - # @!attribute [rw] audit_interval_seconds - # @return [::Integer] - # Sets the interval for Policy Controller Audit Scans (in seconds). - # When set to 0, this disables audit functionality altogether. - # @!attribute [rw] exemptable_namespaces - # @return [::Array<::String>] - # The set of namespaces that are excluded from Policy Controller checks. - # Namespaces do not need to currently exist on the cluster. - # @!attribute [rw] referential_rules_enabled - # @return [::Boolean] - # Enables the ability to use Constraint Templates that reference to objects - # other than the object currently being evaluated. - # @!attribute [rw] log_denies_enabled - # @return [::Boolean] - # Logs all denies and dry run failures. - class PolicyController - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Configuration for Hierarchy Controller - # @!attribute [rw] enabled - # @return [::Boolean] - # Whether Hierarchy Controller is enabled in this cluster. - # @!attribute [rw] enable_pod_tree_labels - # @return [::Boolean] - # Whether pod tree labels are enabled in this cluster. - # @!attribute [rw] enable_hierarchical_resource_quota - # @return [::Boolean] - # Whether hierarchical resource quota is enabled in this cluster. - class HierarchyControllerConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Deployment state for Hierarchy Controller - # @!attribute [rw] hnc - # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::DeploymentState] - # The deployment state for open source HNC (e.g. v0.7.0-hc.0) - # @!attribute [rw] extension - # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::DeploymentState] - # The deployment state for Hierarchy Controller extension (e.g. v0.7.0-hc.1) - class HierarchyControllerDeploymentState - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Version for Hierarchy Controller - # @!attribute [rw] hnc - # @return [::String] - # Version for open source HNC - # @!attribute [rw] extension - # @return [::String] - # Version for Hierarchy Controller extension - class HierarchyControllerVersion - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # State for Hierarchy Controller - # @!attribute [rw] version - # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::HierarchyControllerVersion] - # The version for Hierarchy Controller - # @!attribute [rw] state - # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::HierarchyControllerDeploymentState] - # The deployment state for Hierarchy Controller - class HierarchyControllerState - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # State information for an ACM's Operator - # @!attribute [rw] version - # @return [::String] - # The semenatic version number of the operator - # @!attribute [rw] deployment_state - # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::DeploymentState] - # The state of the Operator's deployment - # @!attribute [rw] errors - # @return [::Array<::Google::Cloud::GkeHub::ConfigManagement::V1::InstallError>] - # Install errors. - class OperatorState - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Errors pertaining to the installation of ACM - # @!attribute [rw] error_message - # @return [::String] - # A string representing the user facing error message - class InstallError - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # State information for ConfigSync - # @!attribute [rw] version - # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::ConfigSyncVersion] - # The version of ConfigSync deployed - # @!attribute [rw] deployment_state - # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::ConfigSyncDeploymentState] - # Information about the deployment of ConfigSync, including the version - # of the various Pods deployed - # @!attribute [rw] sync_state - # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::SyncState] - # The state of ConfigSync's process to sync configs to a cluster - # @!attribute [rw] errors - # @return [::Array<::Google::Cloud::GkeHub::ConfigManagement::V1::ConfigSyncError>] - # Errors pertaining to the installation of Config Sync. - # @!attribute [rw] rootsync_crd - # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::ConfigSyncState::CRDState] - # The state of the RootSync CRD - # @!attribute [rw] reposync_crd - # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::ConfigSyncState::CRDState] - # The state of the Reposync CRD - # @!attribute [rw] state - # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::ConfigSyncState::State] - # The state of CS - # This field summarizes the other fields in this message. - class ConfigSyncState - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # CRDState representing the state of a CRD - module CRDState - # CRD's state cannot be determined - CRD_STATE_UNSPECIFIED = 0 - - # CRD is not installed - NOT_INSTALLED = 1 - - # CRD is installed - INSTALLED = 2 - - # CRD is terminating (i.e., it has been deleted and is cleaning up) - TERMINATING = 3 - - # CRD is installing - INSTALLING = 4 - end - - module State - # CS's state cannot be determined. - STATE_UNSPECIFIED = 0 - - # CS is not installed. - CONFIG_SYNC_NOT_INSTALLED = 1 - - # The expected CS version is installed successfully. - CONFIG_SYNC_INSTALLED = 2 - - # CS encounters errors. - CONFIG_SYNC_ERROR = 3 - - # CS is installing or terminating. - CONFIG_SYNC_PENDING = 4 - end - end - - # Errors pertaining to the installation of Config Sync - # @!attribute [rw] error_message - # @return [::String] - # A string representing the user facing error message - class ConfigSyncError - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Specific versioning information pertaining to ConfigSync's Pods - # @!attribute [rw] importer - # @return [::String] - # Version of the deployed importer pod - # @!attribute [rw] syncer - # @return [::String] - # Version of the deployed syncer pod - # @!attribute [rw] git_sync - # @return [::String] - # Version of the deployed git-sync pod - # @!attribute [rw] monitor - # @return [::String] - # Version of the deployed monitor pod - # @!attribute [rw] reconciler_manager - # @return [::String] - # Version of the deployed reconciler-manager pod - # @!attribute [rw] root_reconciler - # @return [::String] - # Version of the deployed reconciler container in root-reconciler pod - # @!attribute [rw] admission_webhook - # @return [::String] - # Version of the deployed admission_webhook pod - class ConfigSyncVersion - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The state of ConfigSync's deployment on a cluster - # @!attribute [rw] importer - # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::DeploymentState] - # Deployment state of the importer pod - # @!attribute [rw] syncer - # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::DeploymentState] - # Deployment state of the syncer pod - # @!attribute [rw] git_sync - # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::DeploymentState] - # Deployment state of the git-sync pod - # @!attribute [rw] monitor - # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::DeploymentState] - # Deployment state of the monitor pod - # @!attribute [rw] reconciler_manager - # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::DeploymentState] - # Deployment state of reconciler-manager pod - # @!attribute [rw] root_reconciler - # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::DeploymentState] - # Deployment state of root-reconciler - # @!attribute [rw] admission_webhook - # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::DeploymentState] - # Deployment state of admission-webhook - class ConfigSyncDeploymentState - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # State indicating an ACM's progress syncing configurations to a cluster - # @!attribute [rw] source_token - # @return [::String] - # Token indicating the state of the repo. - # @!attribute [rw] import_token - # @return [::String] - # Token indicating the state of the importer. - # @!attribute [rw] sync_token - # @return [::String] - # Token indicating the state of the syncer. - # @!attribute [rw] last_sync - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Deprecated: use last_sync_time instead. - # Timestamp of when ACM last successfully synced the repo - # The time format is specified in https://golang.org/pkg/time/#Time.String - # @!attribute [rw] last_sync_time - # @return [::Google::Protobuf::Timestamp] - # Timestamp type of when ACM last successfully synced the repo - # @!attribute [rw] code - # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::SyncState::SyncCode] - # Sync status code - # @!attribute [rw] errors - # @return [::Array<::Google::Cloud::GkeHub::ConfigManagement::V1::SyncError>] - # A list of errors resulting from problematic configs. - # This list will be truncated after 100 errors, although it is - # unlikely for that many errors to simultaneously exist. - class SyncState - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # An enum representing Config Sync's status of syncing configs to a cluster. - module SyncCode - # Config Sync cannot determine a sync code - SYNC_CODE_UNSPECIFIED = 0 - - # Config Sync successfully synced the git Repo with the cluster - SYNCED = 1 - - # Config Sync is in the progress of syncing a new change - PENDING = 2 - - # Indicates an error configuring Config Sync, and user action is required - ERROR = 3 - - # Config Sync has been installed but not configured - NOT_CONFIGURED = 4 - - # Config Sync has not been installed - NOT_INSTALLED = 5 - - # Error authorizing with the cluster - UNAUTHORIZED = 6 - - # Cluster could not be reached - UNREACHABLE = 7 - end - end - - # An ACM created error representing a problem syncing configurations - # @!attribute [rw] code - # @return [::String] - # An ACM defined error code - # @!attribute [rw] error_message - # @return [::String] - # A description of the error - # @!attribute [rw] error_resources - # @return [::Array<::Google::Cloud::GkeHub::ConfigManagement::V1::ErrorResource>] - # A list of config(s) associated with the error, if any - class SyncError - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Model for a config file in the git repo with an associated Sync error - # @!attribute [rw] source_path - # @return [::String] - # Path in the git repo of the erroneous config - # @!attribute [rw] resource_name - # @return [::String] - # Metadata name of the resource that is causing an error - # @!attribute [rw] resource_namespace - # @return [::String] - # Namespace of the resource that is causing an error - # @!attribute [rw] resource_gvk - # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::GroupVersionKind] - # Group/version/kind of the resource that is causing an error - class ErrorResource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A Kubernetes object's GVK - # @!attribute [rw] group - # @return [::String] - # Kubernetes Group - # @!attribute [rw] version - # @return [::String] - # Kubernetes Version - # @!attribute [rw] kind - # @return [::String] - # Kubernetes Kind - class GroupVersionKind - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # State for PolicyControllerState. - # @!attribute [rw] version - # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::PolicyControllerVersion] - # The version of Gatekeeper Policy Controller deployed. - # @!attribute [rw] deployment_state - # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::GatekeeperDeploymentState] - # The state about the policy controller installation. - class PolicyControllerState - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The build version of Gatekeeper Policy Controller is using. - # @!attribute [rw] version - # @return [::String] - # The gatekeeper image tag that is composed of ACM version, git tag, build - # number. - class PolicyControllerVersion - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # State of Policy Controller installation. - # @!attribute [rw] gatekeeper_controller_manager_state - # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::DeploymentState] - # Status of gatekeeper-controller-manager pod. - # @!attribute [rw] gatekeeper_audit - # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::DeploymentState] - # Status of gatekeeper-audit deployment. - class GatekeeperDeploymentState - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Enum representing the state of an ACM's deployment on a cluster - module DeploymentState - # Deployment's state cannot be determined - DEPLOYMENT_STATE_UNSPECIFIED = 0 - - # Deployment is not installed - NOT_INSTALLED = 1 - - # Deployment is installed - INSTALLED = 2 - - # Deployment was attempted to be installed, but has errors - ERROR = 3 - - # Deployment is installing or terminating - PENDING = 4 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/cloud/gkehub/v1/feature.rb b/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/cloud/gkehub/v1/feature.rb deleted file mode 100644 index b4570d53c995..000000000000 --- a/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/cloud/gkehub/v1/feature.rb +++ /dev/null @@ -1,300 +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 GkeHub - module V1 - # Feature represents the settings and status of any Fleet Feature. - # @!attribute [r] name - # @return [::String] - # Output only. The full, unique name of this Feature resource in the format - # `projects/*/locations/*/features/*`. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Labels for this Feature. - # @!attribute [r] resource_state - # @return [::Google::Cloud::GkeHub::V1::FeatureResourceState] - # Output only. State of the Feature resource itself. - # @!attribute [rw] spec - # @return [::Google::Cloud::GkeHub::V1::CommonFeatureSpec] - # Optional. Fleet-wide Feature configuration. If this Feature does not - # support any Fleet-wide configuration, this field may be unused. - # @!attribute [rw] membership_specs - # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::GkeHub::V1::MembershipFeatureSpec}] - # Optional. Membership-specific configuration for this Feature. If this - # Feature does not support any per-Membership configuration, this field may - # be unused. - # - # The keys indicate which Membership the configuration is for, in the form: - # - # `projects/{p}/locations/{l}/memberships/{m}` - # - # Where \\{p} is the project, \\{l} is a valid location and \\{m} is a valid - # Membership in this project at that location. \\{p} WILL match the Feature's - # project. - # - # \\{p} will always be returned as the project number, but the project ID is - # also accepted during input. If the same Membership is specified in the map - # twice (using the project ID form, and the project number form), exactly - # ONE of the entries will be saved, with no guarantees as to which. For this - # reason, it is recommended the same format be used for all entries when - # mutating a Feature. - # @!attribute [r] state - # @return [::Google::Cloud::GkeHub::V1::CommonFeatureState] - # Output only. The Fleet-wide Feature state. - # @!attribute [r] membership_states - # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::GkeHub::V1::MembershipFeatureState}] - # Output only. Membership-specific Feature status. If this Feature does - # report any per-Membership status, this field may be unused. - # - # The keys indicate which Membership the state is for, in the form: - # - # `projects/{p}/locations/{l}/memberships/{m}` - # - # Where \\{p} is the project number, \\{l} is a valid location and \\{m} is a valid - # Membership in this project at that location. \\{p} MUST match the Feature's - # project number. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. When the Feature resource was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. When the Feature resource was last updated. - # @!attribute [r] delete_time - # @return [::Google::Protobuf::Timestamp] - # Output only. When the Feature resource was deleted. - # @!attribute [rw] scope_specs - # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::GkeHub::V1::ScopeFeatureSpec}] - # Optional. Scope-specific configuration for this Feature. If this Feature - # does not support any per-Scope configuration, this field may be unused. - # - # The keys indicate which Scope the configuration is for, in the form: - # - # `projects/{p}/locations/global/scopes/{s}` - # - # Where \\{p} is the project, \\{s} is a valid Scope in this project. - # \\{p} WILL match the Feature's project. - # - # \\{p} will always be returned as the project number, but the project ID is - # also accepted during input. If the same Scope is specified in the map - # twice (using the project ID form, and the project number form), exactly - # ONE of the entries will be saved, with no guarantees as to which. For this - # reason, it is recommended the same format be used for all entries when - # mutating a Feature. - # @!attribute [r] scope_states - # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::GkeHub::V1::ScopeFeatureState}] - # Output only. Scope-specific Feature status. If this Feature does - # report any per-Scope status, this field may be unused. - # - # The keys indicate which Scope the state is for, in the form: - # - # `projects/{p}/locations/global/scopes/{s}` - # - # Where \\{p} is the project, \\{s} is a valid Scope in this project. - # \\{p} WILL match the Feature's project. - # @!attribute [r] unreachable - # @return [::Array<::String>] - # Output only. List of locations that could not be reached while fetching - # this feature. - class Feature - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Cloud::GkeHub::V1::MembershipFeatureSpec] - class MembershipSpecsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Cloud::GkeHub::V1::MembershipFeatureState] - class MembershipStatesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Cloud::GkeHub::V1::ScopeFeatureSpec] - class ScopeSpecsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Cloud::GkeHub::V1::ScopeFeatureState] - class ScopeStatesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # FeatureResourceState describes the state of a Feature *resource* in the - # GkeHub API. See `FeatureState` for the "running state" of the Feature in the - # Fleet and across Memberships. - # @!attribute [rw] state - # @return [::Google::Cloud::GkeHub::V1::FeatureResourceState::State] - # The current state of the Feature resource in the Hub API. - class FeatureResourceState - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # State describes the lifecycle status of a Feature. - module State - # State is unknown or not set. - STATE_UNSPECIFIED = 0 - - # The Feature is being enabled, and the Feature resource is being created. - # Once complete, the corresponding Feature will be enabled in this Fleet. - ENABLING = 1 - - # The Feature is enabled in this Fleet, and the Feature resource is fully - # available. - ACTIVE = 2 - - # The Feature is being disabled in this Fleet, and the Feature resource - # is being deleted. - DISABLING = 3 - - # The Feature resource is being updated. - UPDATING = 4 - - # The Feature resource is being updated by the Hub Service. - SERVICE_UPDATING = 5 - end - end - - # FeatureState describes the high-level state of a Feature. It may be used to - # describe a Feature's state at the environ-level, or per-membershop, depending - # on the context. - # @!attribute [rw] code - # @return [::Google::Cloud::GkeHub::V1::FeatureState::Code] - # The high-level, machine-readable status of this Feature. - # @!attribute [rw] description - # @return [::String] - # A human-readable description of the current status. - # @!attribute [rw] update_time - # @return [::Google::Protobuf::Timestamp] - # The time this status and any related Feature-specific details were updated. - class FeatureState - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Code represents a machine-readable, high-level status of the Feature. - module Code - # Unknown or not set. - CODE_UNSPECIFIED = 0 - - # The Feature is operating normally. - OK = 1 - - # The Feature has encountered an issue, and is operating in a degraded - # state. The Feature may need intervention to return to normal operation. - # See the description and any associated Feature-specific details for more - # information. - WARNING = 2 - - # The Feature is not operating or is in a severely degraded state. - # The Feature may need intervention to return to normal operation. - # See the description and any associated Feature-specific details for more - # information. - ERROR = 3 - end - end - - # CommonFeatureSpec contains Hub-wide configuration information - # @!attribute [rw] multiclusteringress - # @return [::Google::Cloud::GkeHub::MultiClusterIngress::V1::FeatureSpec] - # Multicluster Ingress-specific spec. - class CommonFeatureSpec - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # CommonFeatureState contains Fleet-wide Feature status information. - # @!attribute [rw] rbacrolebindingactuation - # @return [::Google::Cloud::GkeHub::RbacRoleBindingActuation::V1::FeatureState] - # RBAC Role Binding Actuation feature state - # @!attribute [r] state - # @return [::Google::Cloud::GkeHub::V1::FeatureState] - # Output only. The "running state" of the Feature in this Fleet. - class CommonFeatureState - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # ScopeFeatureSpec contains feature specs for a fleet scope. - class ScopeFeatureSpec - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # ScopeFeatureState contains Scope-wide Feature status information. - # @!attribute [r] state - # @return [::Google::Cloud::GkeHub::V1::FeatureState] - # Output only. The "running state" of the Feature in this Scope. - class ScopeFeatureState - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # MembershipFeatureSpec contains configuration information for a single - # Membership. - # @!attribute [rw] configmanagement - # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::MembershipSpec] - # Config Management-specific spec. - class MembershipFeatureSpec - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # MembershipFeatureState contains Feature status information for a single - # Membership. - # @!attribute [rw] configmanagement - # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::MembershipState] - # Config Management-specific state. - # @!attribute [rw] state - # @return [::Google::Cloud::GkeHub::V1::FeatureState] - # The high-level state of this Feature for a single membership. - class MembershipFeatureState - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/cloud/gkehub/v1/membership.rb b/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/cloud/gkehub/v1/membership.rb deleted file mode 100644 index 04f762eb627b..000000000000 --- a/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/cloud/gkehub/v1/membership.rb +++ /dev/null @@ -1,370 +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 GkeHub - module V1 - # Membership contains information about a member cluster. - # @!attribute [rw] endpoint - # @return [::Google::Cloud::GkeHub::V1::MembershipEndpoint] - # Optional. Endpoint information to reach this member. - # @!attribute [r] name - # @return [::String] - # Output only. The full, unique name of this Membership resource in the - # format `projects/*/locations/*/memberships/{membership_id}`, set during - # creation. - # - # `membership_id` must be a valid RFC 1123 compliant DNS label: - # - # 1. At most 63 characters in length - # 2. It must consist of lower case alphanumeric characters or `-` - # 3. It must start and end with an alphanumeric character - # - # Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, - # with a maximum length of 63 characters. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Labels for this membership. - # @!attribute [r] description - # @return [::String] - # Output only. Description of this membership, limited to 63 characters. - # Must match the regex: `[a-zA-Z0-9][a-zA-Z0-9_\-\.\ ]*` - # - # This field is present for legacy purposes. - # @!attribute [r] state - # @return [::Google::Cloud::GkeHub::V1::MembershipState] - # Output only. State of the Membership resource. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. When the Membership was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. When the Membership was last updated. - # @!attribute [r] delete_time - # @return [::Google::Protobuf::Timestamp] - # Output only. When the Membership was deleted. - # @!attribute [rw] external_id - # @return [::String] - # Optional. An externally-generated and managed ID for this Membership. This - # ID may be modified after creation, but this is not recommended. - # - # The ID must match the regex: `[a-zA-Z0-9][a-zA-Z0-9_\-\.]*` - # - # If this Membership represents a Kubernetes cluster, this value should be - # set to the UID of the `kube-system` namespace object. - # @!attribute [r] last_connection_time - # @return [::Google::Protobuf::Timestamp] - # Output only. For clusters using Connect, the timestamp of the most recent - # connection established with Google Cloud. This time is updated every - # several minutes, not continuously. For clusters that do not use GKE - # Connect, or that have never connected successfully, this field will be - # unset. - # @!attribute [r] unique_id - # @return [::String] - # Output only. Google-generated UUID for this resource. This is unique across - # all Membership resources. If a Membership resource is deleted and another - # resource with the same name is created, it gets a different unique_id. - # @!attribute [rw] authority - # @return [::Google::Cloud::GkeHub::V1::Authority] - # Optional. How to identify workloads from this Membership. - # See the documentation on Workload Identity for more details: - # https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity - # @!attribute [rw] monitoring_config - # @return [::Google::Cloud::GkeHub::V1::MonitoringConfig] - # Optional. The monitoring config information for this membership. - class Membership - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # MembershipEndpoint contains information needed to contact a Kubernetes API, - # endpoint and any additional Kubernetes metadata. - # @!attribute [rw] gke_cluster - # @return [::Google::Cloud::GkeHub::V1::GkeCluster] - # Optional. GKE-specific information. Only present if this Membership is a GKE cluster. - # @!attribute [r] kubernetes_metadata - # @return [::Google::Cloud::GkeHub::V1::KubernetesMetadata] - # Output only. Useful Kubernetes-specific metadata. - # @!attribute [rw] kubernetes_resource - # @return [::Google::Cloud::GkeHub::V1::KubernetesResource] - # Optional. The in-cluster Kubernetes Resources that should be applied for a - # correctly registered cluster, in the steady state. These resources: - # - # * Ensure that the cluster is exclusively registered to one and only one - # Hub Membership. - # * Propagate Workload Pool Information available in the Membership - # Authority field. - # * Ensure proper initial configuration of default Hub Features. - # @!attribute [r] google_managed - # @return [::Boolean] - # Output only. Whether the lifecycle of this membership is managed by a - # google cluster platform service. - class MembershipEndpoint - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # KubernetesResource contains the YAML manifests and configuration for - # Membership Kubernetes resources in the cluster. After CreateMembership or - # UpdateMembership, these resources should be re-applied in the cluster. - # @!attribute [rw] membership_cr_manifest - # @return [::String] - # Input only. The YAML representation of the Membership CR. This field is - # ignored for GKE clusters where Hub can read the CR directly. - # - # Callers should provide the CR that is currently present in the cluster - # during CreateMembership or UpdateMembership, or leave this field empty if - # none exists. The CR manifest is used to validate the cluster has not been - # registered with another Membership. - # @!attribute [r] membership_resources - # @return [::Array<::Google::Cloud::GkeHub::V1::ResourceManifest>] - # Output only. Additional Kubernetes resources that need to be applied to the - # cluster after Membership creation, and after every update. - # - # This field is only populated in the Membership returned from a successful - # long-running operation from CreateMembership or UpdateMembership. It is not - # populated during normal GetMembership or ListMemberships requests. To get - # the resource manifest after the initial registration, the caller should - # make a UpdateMembership call with an empty field mask. - # @!attribute [r] connect_resources - # @return [::Array<::Google::Cloud::GkeHub::V1::ResourceManifest>] - # Output only. The Kubernetes resources for installing the GKE Connect agent - # - # This field is only populated in the Membership returned from a successful - # long-running operation from CreateMembership or UpdateMembership. It is not - # populated during normal GetMembership or ListMemberships requests. To get - # the resource manifest after the initial registration, the caller should - # make a UpdateMembership call with an empty field mask. - # @!attribute [rw] resource_options - # @return [::Google::Cloud::GkeHub::V1::ResourceOptions] - # Optional. Options for Kubernetes resource generation. - class KubernetesResource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # ResourceOptions represent options for Kubernetes resource generation. - # @!attribute [rw] connect_version - # @return [::String] - # Optional. The Connect agent version to use for connect_resources. Defaults - # to the latest GKE Connect version. The version must be a currently - # supported version, obsolete versions will be rejected. - # @!attribute [rw] v1beta1_crd - # @return [::Boolean] - # Optional. Use `apiextensions/v1beta1` instead of `apiextensions/v1` for - # CustomResourceDefinition resources. - # This option should be set for clusters with Kubernetes apiserver versions - # <1.16. - # @!attribute [rw] k8s_version - # @return [::String] - # Optional. Major and minor version of the Kubernetes cluster. This is only - # used to determine which version to use for the CustomResourceDefinition - # resources, `apiextensions/v1beta1` or`apiextensions/v1`. - # @!attribute [rw] k8s_git_version - # @return [::String] - # Optional. Git version of the Kubernetes cluster. This is only used to gate - # the Connect Agent migration to svc.id.goog on GDC-SO 1.33.100 patch and - # above. - class ResourceOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # ResourceManifest represents a single Kubernetes resource to be applied to - # the cluster. - # @!attribute [rw] manifest - # @return [::String] - # YAML manifest of the resource. - # @!attribute [rw] cluster_scoped - # @return [::Boolean] - # Whether the resource provided in the manifest is `cluster_scoped`. - # If unset, the manifest is assumed to be namespace scoped. - # - # This field is used for REST mapping when applying the resource in a - # cluster. - class ResourceManifest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # GkeCluster contains information specific to GKE clusters. - # @!attribute [rw] resource_link - # @return [::String] - # Immutable. Self-link of the Google Cloud resource for the GKE cluster. For - # example: - # - # //container.googleapis.com/projects/my-project/locations/us-west1-a/clusters/my-cluster - # - # Zonal clusters are also supported. - # @!attribute [r] cluster_missing - # @return [::Boolean] - # Output only. If cluster_missing is set then it denotes that the GKE cluster - # no longer exists in the GKE Control Plane. - class GkeCluster - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # KubernetesMetadata provides informational metadata for Memberships - # representing Kubernetes clusters. - # @!attribute [r] kubernetes_api_server_version - # @return [::String] - # Output only. Kubernetes API server version string as reported by - # `/version`. - # @!attribute [r] node_provider_id - # @return [::String] - # Output only. Node providerID as reported by the first node in the list of - # nodes on the Kubernetes endpoint. On Kubernetes platforms that support - # zero-node clusters (like GKE-on-GCP), the node_count will be zero and the - # node_provider_id will be empty. - # @!attribute [r] node_count - # @return [::Integer] - # Output only. Node count as reported by Kubernetes nodes resources. - # @!attribute [r] vcpu_count - # @return [::Integer] - # Output only. vCPU count as reported by Kubernetes nodes resources. - # @!attribute [r] memory_mb - # @return [::Integer] - # Output only. The total memory capacity as reported by the sum of all - # Kubernetes nodes resources, defined in MB. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time at which these details were last updated. This - # update_time is different from the Membership-level update_time since - # EndpointDetails are updated internally for API consumers. - class KubernetesMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This field informs Fleet-based applications/services/UIs with the necessary - # information for where each underlying Cluster reports its metrics. - # @!attribute [rw] project_id - # @return [::String] - # Immutable. Project used to report Metrics - # @!attribute [rw] location - # @return [::String] - # Immutable. Location used to report Metrics - # @!attribute [rw] cluster - # @return [::String] - # Immutable. Cluster name used to report metrics. - # For Anthos on VMWare/Baremetal, it would be in format - # `memberClusters/cluster_name`; And for Anthos on MultiCloud, it would be in - # format - # `{azureClusters, awsClusters}/cluster_name`. - # @!attribute [rw] kubernetes_metrics_prefix - # @return [::String] - # Kubernetes system metrics, if available, are written to this prefix. - # This defaults to kubernetes.io for GKE, and kubernetes.io/anthos for Anthos - # eventually. Noted: Anthos MultiCloud will have kubernetes.io prefix today - # but will migration to be under kubernetes.io/anthos - # @!attribute [rw] cluster_hash - # @return [::String] - # Immutable. Cluster hash, this is a unique string generated by google code, - # which does not contain any PII, which we can use to reference the cluster. - # This is expected to be created by the monitoring stack and persisted into - # the Cluster object as well as to GKE-Hub. - class MonitoringConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # MembershipState describes the state of a Membership resource. - # @!attribute [r] code - # @return [::Google::Cloud::GkeHub::V1::MembershipState::Code] - # Output only. The current state of the Membership resource. - class MembershipState - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Code describes the state of a Membership resource. - module Code - # The code is not set. - CODE_UNSPECIFIED = 0 - - # The cluster is being registered. - CREATING = 1 - - # The cluster is registered. - READY = 2 - - # The cluster is being unregistered. - DELETING = 3 - - # The Membership is being updated. - UPDATING = 4 - - # The Membership is being updated by the Hub Service. - SERVICE_UPDATING = 5 - end - end - - # Authority encodes how Google will recognize identities from this Membership. - # See the workload identity documentation for more details: - # https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity - # @!attribute [rw] issuer - # @return [::String] - # Optional. A JSON Web Token (JWT) issuer URI. `issuer` must start with - # `https://` and be a valid URL with length <2000 characters. - # - # If set, then Google will allow valid OIDC tokens from this issuer to - # authenticate within the workload_identity_pool. OIDC discovery will be - # performed on this URI to validate tokens from the issuer. - # - # Clearing `issuer` disables Workload Identity. `issuer` cannot be directly - # modified; it must be cleared (and Workload Identity disabled) before using - # a new issuer (and re-enabling Workload Identity). - # @!attribute [r] workload_identity_pool - # @return [::String] - # Output only. The name of the workload identity pool in which `issuer` will - # be recognized. - # - # There is a single Workload Identity Pool per Hub that is shared - # between all Memberships that belong to that Hub. For a Hub hosted in - # \\{PROJECT_ID}, the workload pool format is `{PROJECT_ID}.hub.id.goog`, - # although this is subject to change in newer versions of this API. - # @!attribute [r] identity_provider - # @return [::String] - # Output only. An identity provider that reflects the `issuer` in the - # workload identity pool. - # @!attribute [rw] oidc_jwks - # @return [::String] - # Optional. OIDC verification keys for this Membership in JWKS format (RFC - # 7517). - # - # When this field is set, OIDC discovery will NOT be performed on `issuer`, - # and instead OIDC tokens will be validated using this field. - class Authority - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/cloud/gkehub/v1/multiclusteringress/multiclusteringress.rb b/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/cloud/gkehub/v1/multiclusteringress/multiclusteringress.rb deleted file mode 100644 index fba6cc355b8a..000000000000 --- a/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/cloud/gkehub/v1/multiclusteringress/multiclusteringress.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! - - -module Google - module Cloud - module GkeHub - module MultiClusterIngress - module V1 - # **Multi-cluster Ingress**: The configuration for the MultiClusterIngress - # feature. - # @!attribute [rw] config_membership - # @return [::String] - # Fully-qualified Membership name which hosts the MultiClusterIngress CRD. - # Example: `projects/foo-proj/locations/global/memberships/bar` - class FeatureSpec - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/cloud/gkehub/v1/service.rb b/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/cloud/gkehub/v1/service.rb deleted file mode 100644 index fd04c6333d37..000000000000 --- a/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/cloud/gkehub/v1/service.rb +++ /dev/null @@ -1,1142 +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 GkeHub - module V1 - # Request message for the `GkeHub.GetNamespace` method. - # @!attribute [rw] name - # @return [::String] - # Required. The Namespace resource name in the format - # `projects/*/locations/*/scopes/*/namespaces/*`. - class GetScopeNamespaceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to create a fleet namespace. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent (project and location) where the Namespace will be - # created. Specified in the format `projects/*/locations/*/scopes/*`. - # @!attribute [rw] scope_namespace_id - # @return [::String] - # Required. Client chosen ID for the Namespace. `namespace_id` must be a - # valid RFC 1123 compliant DNS label: - # - # 1. At most 63 characters in length - # 2. It must consist of lower case alphanumeric characters or `-` - # 3. It must start and end with an alphanumeric character - # - # Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, - # with a maximum length of 63 characters. - # @!attribute [rw] scope_namespace - # @return [::Google::Cloud::GkeHub::V1::Namespace] - # Required. The fleet namespace to create. - class CreateScopeNamespaceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to update a fleet namespace. - # @!attribute [rw] scope_namespace - # @return [::Google::Cloud::GkeHub::V1::Namespace] - # Required. A namespace with fields updated. The 'name' field in this - # namespace is used to identify the resource to update. Given 'updated' - # prefix to follow go/proto-best-practices-checkers#keyword_conflict - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. The fields to be updated. - class UpdateScopeNamespaceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to delete a fleet namespace. - # @!attribute [rw] name - # @return [::String] - # Required. The Namespace resource name in the format - # `projects/*/locations/*/scopes/*/namespaces/*`. - class DeleteScopeNamespaceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to list fleet namespaces. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent (project and location) where the Features will be - # listed. Specified in the format `projects/*/locations/*/scopes/*`. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. When requesting a 'page' of resources, `page_size` specifies - # number of resources to return. If unspecified or set to 0, all resources - # will be returned. - # @!attribute [rw] page_token - # @return [::String] - # Optional. Token returned by previous call to `ListFeatures` which - # specifies the position in the list from where to continue listing the - # resources. - class ListScopeNamespacesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List of fleet namespaces. - # @!attribute [rw] scope_namespaces - # @return [::Array<::Google::Cloud::GkeHub::V1::Namespace>] - # The list of fleet namespaces - # @!attribute [rw] next_page_token - # @return [::String] - # A token to request the next page of resources from the - # `ListNamespaces` method. The value of an empty string means - # that there are no more resources to return. - class ListScopeNamespacesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `GkeHub.GetScopeRBACRoleBinding` method. - # @!attribute [rw] name - # @return [::String] - # Required. The RBACRoleBinding resource name in the format - # `projects/*/locations/*/scopes/*/rbacrolebindings/*`. - class GetScopeRBACRoleBindingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to create a rbacrolebindings. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent (project and location) where the RBACRoleBinding will - # be created. Specified in the format `projects/*/locations/*/scopes/*`. - # @!attribute [rw] rbacrolebinding_id - # @return [::String] - # Required. Client chosen ID for the RBACRoleBinding. `rbacrolebinding_id` - # must be a valid RFC 1123 compliant DNS label: - # - # 1. At most 63 characters in length - # 2. It must consist of lower case alphanumeric characters or `-` - # 3. It must start and end with an alphanumeric character - # - # Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, - # with a maximum length of 63 characters. - # @!attribute [rw] rbacrolebinding - # @return [::Google::Cloud::GkeHub::V1::RBACRoleBinding] - # Required. The rbacrolebindings to create. - class CreateScopeRBACRoleBindingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to update a scope rbacrolebinding. - # @!attribute [rw] rbacrolebinding - # @return [::Google::Cloud::GkeHub::V1::RBACRoleBinding] - # Required. A rbacrolebinding with fields updated. The 'name' field in this - # rbacrolebinding is used to identify the resource to update. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. The fields to be updated. - class UpdateScopeRBACRoleBindingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to delete a Scope RBACRoleBinding. - # @!attribute [rw] name - # @return [::String] - # Required. The RBACRoleBinding resource name in the format - # `projects/*/locations/*/scopes/*/rbacrolebindings/*`. - class DeleteScopeRBACRoleBindingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to list Scope RBACRoleBindings. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent (project and location) where the Features will be - # listed. Specified in the format `projects/*/locations/*/scopes/*`. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. When requesting a 'page' of resources, `page_size` specifies - # number of resources to return. If unspecified or set to 0, all resources - # will be returned. - # @!attribute [rw] page_token - # @return [::String] - # Optional. Token returned by previous call to `ListScopeRBACRoleBindings` - # which specifies the position in the list from where to continue listing the - # resources. - class ListScopeRBACRoleBindingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List of Scope RBACRoleBindings. - # @!attribute [rw] rbacrolebindings - # @return [::Array<::Google::Cloud::GkeHub::V1::RBACRoleBinding>] - # The list of Scope RBACRoleBindings. - # @!attribute [rw] next_page_token - # @return [::String] - # A token to request the next page of resources from the - # `ListScopeRBACRoleBindings` method. The value of an empty string means - # that there are no more resources to return. - class ListScopeRBACRoleBindingsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `GkeHub.GetScope` method. - # @!attribute [rw] name - # @return [::String] - # Required. The Scope resource name in the format - # `projects/*/locations/*/scopes/*`. - class GetScopeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to create a Scope. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent (project and location) where the Scope will be - # created. Specified in the format `projects/*/locations/*`. - # @!attribute [rw] scope_id - # @return [::String] - # Required. Client chosen ID for the Scope. `scope_id` must be a - # ???? - # @!attribute [rw] scope - # @return [::Google::Cloud::GkeHub::V1::Scope] - # Required. The Scope to create. - class CreateScopeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to update a Scope. - # @!attribute [rw] scope - # @return [::Google::Cloud::GkeHub::V1::Scope] - # Required. A Scope with fields updated. The 'name' field in this - # namespace is used to identify the resource to update. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. The fields to be updated. - class UpdateScopeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to delete a Scope. - # @!attribute [rw] name - # @return [::String] - # Required. The Scope resource name in the format - # `projects/*/locations/*/scopes/*`. - class DeleteScopeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to list Scopes. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent (project and location) where the Scope will be listed. - # Specified in the format `projects/*/locations/*`. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. When requesting a 'page' of resources, `page_size` specifies - # number of resources to return. If unspecified or set to 0, all resources - # will be returned. - # @!attribute [rw] page_token - # @return [::String] - # Optional. Token returned by previous call to `ListScopes` which - # specifies the position in the list from where to continue listing the - # resources. - class ListScopesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List of Scopes. - # @!attribute [rw] scopes - # @return [::Array<::Google::Cloud::GkeHub::V1::Scope>] - # The list of Scopes - # @!attribute [rw] next_page_token - # @return [::String] - # A token to request the next page of resources from the - # `ListScopes` method. The value of an empty string means - # that there are no more resources to return. - class ListScopesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to list permitted Scopes. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent (project and location) where the Scope will be listed. - # Specified in the format `projects/*/locations/*`. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. When requesting a 'page' of resources, `page_size` specifies - # number of resources to return. If unspecified or set to 0, all resources - # will be returned. - # @!attribute [rw] page_token - # @return [::String] - # Optional. Token returned by previous call to `ListPermittedScopes` which - # specifies the position in the list from where to continue listing the - # resources. - class ListPermittedScopesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List of permitted Scopes. - # @!attribute [rw] scopes - # @return [::Array<::Google::Cloud::GkeHub::V1::Scope>] - # The list of permitted Scopes - # @!attribute [rw] next_page_token - # @return [::String] - # A token to request the next page of resources from the - # `ListPermittedScopes` method. The value of an empty string means - # that there are no more resources to return. - class ListPermittedScopesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `GkeHub.GetMembershipBinding` method. - # @!attribute [rw] name - # @return [::String] - # Required. The MembershipBinding resource name in the format - # `projects/*/locations/*/memberships/*/bindings/*`. - class GetMembershipBindingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to create a MembershipBinding. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent (project and location) where the MembershipBinding - # will be created. Specified in the format - # `projects/*/locations/*/memberships/*`. - # @!attribute [rw] membership_binding - # @return [::Google::Cloud::GkeHub::V1::MembershipBinding] - # Required. The MembershipBinding to create. - # @!attribute [rw] membership_binding_id - # @return [::String] - # Required. The ID to use for the MembershipBinding. - class CreateMembershipBindingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to update a MembershipBinding. - # @!attribute [rw] membership_binding - # @return [::Google::Cloud::GkeHub::V1::MembershipBinding] - # Required. The MembershipBinding object with fields updated. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. The fields to be updated. - class UpdateMembershipBindingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to delete a Binding. - # @!attribute [rw] name - # @return [::String] - # Required. The MembershipBinding resource name in the format - # `projects/*/locations/*/memberships/*/bindings/*`. - class DeleteMembershipBindingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to list MembershipBinding. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent Membership for which the MembershipBindings will be - # listed. Specified in the format `projects/*/locations/*/memberships/*`. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. When requesting a 'page' of resources, `page_size` specifies - # number of resources to return. If unspecified or set to 0, all resources - # will be returned. - # @!attribute [rw] page_token - # @return [::String] - # Optional. Token returned by previous call to `ListMembershipBindings` which - # specifies the position in the list from where to continue listing the - # resources. - # @!attribute [rw] filter - # @return [::String] - # Optional. Lists MembershipBindings that match the filter expression, - # following the syntax outlined in https://google.aip.dev/160. - class ListMembershipBindingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List of MembershipBindings. - # @!attribute [rw] membership_bindings - # @return [::Array<::Google::Cloud::GkeHub::V1::MembershipBinding>] - # The list of membership_bindings - # @!attribute [rw] next_page_token - # @return [::String] - # A token to request the next page of resources from the - # `ListMembershipBindings` method. The value of an empty string means - # that there are no more resources to return. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # List of locations that could not be reached while fetching this list. - class ListMembershipBindingsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `GkeHub.ListMemberships` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent (project and location) where the Memberships will be - # listed. Specified in the format `projects/*/locations/*`. - # `projects/*/locations/-` list memberships in all the regions. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. When requesting a 'page' of resources, `page_size` specifies - # number of resources to return. If unspecified or set to 0, all resources - # will be returned. - # @!attribute [rw] page_token - # @return [::String] - # Optional. Token returned by previous call to `ListMemberships` which - # specifies the position in the list from where to continue listing the - # resources. - # @!attribute [rw] filter - # @return [::String] - # Optional. Lists Memberships that match the filter expression, following the - # syntax outlined in https://google.aip.dev/160. - # - # Examples: - # - # - Name is `bar` in project `foo-proj` and location `global`: - # - # name = "projects/foo-proj/locations/global/membership/bar" - # - # - Memberships that have a label called `foo`: - # - # labels.foo:* - # - # - Memberships that have a label called `foo` whose value is `bar`: - # - # labels.foo = bar - # - # - Memberships in the CREATING state: - # - # state = CREATING - # @!attribute [rw] order_by - # @return [::String] - # Optional. One or more fields to compare and use to sort the output. - # See https://google.aip.dev/132#ordering. - class ListMembershipsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `GkeHub.GetMembershipRBACRoleBinding` method. - # @!attribute [rw] name - # @return [::String] - # Required. The RBACRoleBinding resource name in the format - # `projects/*/locations/*/memberships/*/rbacrolebindings/*`. - class GetMembershipRBACRoleBindingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to create a rbacrolebindings. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent (project and location) where the RBACRoleBinding will - # be created. Specified in the format `projects/*/locations/*/memberships/*`. - # @!attribute [rw] rbacrolebinding_id - # @return [::String] - # Required. Client chosen ID for the RBACRoleBinding. `rbacrolebinding_id` - # must be a valid RFC 1123 compliant DNS label: - # - # 1. At most 63 characters in length - # 2. It must consist of lower case alphanumeric characters or `-` - # 3. It must start and end with an alphanumeric character - # - # Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, - # with a maximum length of 63 characters. - # @!attribute [rw] rbacrolebinding - # @return [::Google::Cloud::GkeHub::V1::RBACRoleBinding] - # Required. The rbacrolebindings to create. - class CreateMembershipRBACRoleBindingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to update a membership rbacrolebinding. - # @!attribute [rw] rbacrolebinding - # @return [::Google::Cloud::GkeHub::V1::RBACRoleBinding] - # Required. A rbacrolebinding with fields updated. The 'name' field in this - # rbacrolebinding is used to identify the resource to update. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. The fields to be updated. - class UpdateMembershipRBACRoleBindingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to delete a Membership RBACRoleBinding. - # @!attribute [rw] name - # @return [::String] - # Required. The RBACRoleBinding resource name in the format - # `projects/*/locations/*/memberships/*/rbacrolebindings/*`. - class DeleteMembershipRBACRoleBindingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to list Membership RBACRoleBindings. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent (project and location) where the Features will be - # listed. Specified in the format `projects/*/locations/*/memberships/*`. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. When requesting a 'page' of resources, `page_size` specifies - # number of resources to return. If unspecified or set to 0, all resources - # will be returned. - # @!attribute [rw] page_token - # @return [::String] - # Optional. Token returned by previous call to - # `ListMembershipRBACRoleBindings` which specifies the position in the list - # from where to continue listing the resources. - class ListMembershipRBACRoleBindingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List of Membership RBACRoleBindings. - # @!attribute [rw] rbacrolebindings - # @return [::Array<::Google::Cloud::GkeHub::V1::RBACRoleBinding>] - # The list of Membership RBACRoleBindings. - # @!attribute [rw] next_page_token - # @return [::String] - # A token to request the next page of resources from the - # `ListMembershipRBACRoleBindings` method. The value of an empty string means - # that there are no more resources to return. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # List of locations that could not be reached while fetching this list. - class ListMembershipRBACRoleBindingsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to generate a YAML of the RBAC policies for the specified - # RoleBinding and its associated impersonation resources. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent (project and location) where the RBACRoleBinding will - # be created. Specified in the format `projects/*/locations/*/memberships/*`. - # @!attribute [rw] rbacrolebinding_id - # @return [::String] - # Required. Client chosen ID for the RBACRoleBinding. `rbacrolebinding_id` - # must be a valid RFC 1123 compliant DNS label: - # - # 1. At most 63 characters in length - # 2. It must consist of lower case alphanumeric characters or `-` - # 3. It must start and end with an alphanumeric character - # - # Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, - # with a maximum length of 63 characters. - # @!attribute [rw] rbacrolebinding - # @return [::Google::Cloud::GkeHub::V1::RBACRoleBinding] - # Required. The rbacrolebindings to generate the YAML for. - class GenerateMembershipRBACRoleBindingYAMLRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for GenerateRBACRoleBindingYAML. - # @!attribute [rw] role_bindings_yaml - # @return [::String] - # a yaml text blob including the RBAC policies. - class GenerateMembershipRBACRoleBindingYAMLResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the `GkeHub.ListMemberships` method. - # @!attribute [rw] resources - # @return [::Array<::Google::Cloud::GkeHub::V1::Membership>] - # The list of matching Memberships. - # @!attribute [rw] next_page_token - # @return [::String] - # A token to request the next page of resources from the - # `ListMemberships` method. The value of an empty string means that - # there are no more resources to return. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # List of locations that could not be reached while fetching this list. - class ListMembershipsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `GkeHub.GetMembership` method. - # @!attribute [rw] name - # @return [::String] - # Required. The Membership resource name in the format - # `projects/*/locations/*/memberships/*`. - class GetMembershipRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to list Memberships bound to a Scope. - # @!attribute [rw] scope_name - # @return [::String] - # Required. Name of the Scope, in the format - # `projects/*/locations/global/scopes/*`, to which the Memberships are bound. - # @!attribute [rw] filter - # @return [::String] - # Optional. Lists Memberships that match the filter expression, following the - # syntax outlined in https://google.aip.dev/160. Currently, filtering - # can be done only based on Memberships's `name`, `labels`, `create_time`, - # `update_time`, and `unique_id`. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. When requesting a 'page' of resources, `page_size` specifies - # number of resources to return. If unspecified or set to 0, all resources - # will be returned. Pagination is currently not supported; therefore, setting - # this field does not have any impact for now. - # @!attribute [rw] page_token - # @return [::String] - # Optional. Token returned by previous call to `ListBoundMemberships` which - # specifies the position in the list from where to continue listing the - # resources. - class ListBoundMembershipsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # List of Memberships bound to a Scope. - # @!attribute [rw] memberships - # @return [::Array<::Google::Cloud::GkeHub::V1::Membership>] - # The list of Memberships bound to the given Scope. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # List of locations that could not be reached while fetching this list. - # @!attribute [rw] next_page_token - # @return [::String] - # A token to request the next page of resources from the - # `ListBoundMemberships` method. The value of an empty string means that - # there are no more resources to return. - class ListBoundMembershipsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `GkeHub.CreateMembership` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent (project and location) where the Memberships will be - # created. Specified in the format `projects/*/locations/*`. - # @!attribute [rw] membership_id - # @return [::String] - # Required. Client chosen ID for the membership. `membership_id` must be a - # valid RFC 1123 compliant DNS label: - # - # 1. At most 63 characters in length - # 2. It must consist of lower case alphanumeric characters or `-` - # 3. It must start and end with an alphanumeric character - # - # Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, - # with a maximum length of 63 characters. - # @!attribute [rw] resource - # @return [::Google::Cloud::GkeHub::V1::Membership] - # Required. The membership to create. - # @!attribute [rw] request_id - # @return [::String] - # Optional. A request ID to identify requests. Specify a unique request ID - # so that if you must retry your request, the server will know to ignore - # the request if it has already been completed. The server will guarantee - # that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class CreateMembershipRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `GkeHub.DeleteMembership` method. - # @!attribute [rw] name - # @return [::String] - # Required. The Membership resource name in the format - # `projects/*/locations/*/memberships/*`. - # @!attribute [rw] request_id - # @return [::String] - # Optional. A request ID to identify requests. Specify a unique request ID - # so that if you must retry your request, the server will know to ignore - # the request if it has already been completed. The server will guarantee - # that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @!attribute [rw] force - # @return [::Boolean] - # Optional. If set to true, any subresource from this Membership will also be - # deleted. Otherwise, the request will only work if the Membership has no - # subresource. - class DeleteMembershipRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `GkeHub.UpdateMembership` method. - # @!attribute [rw] name - # @return [::String] - # Required. The Membership resource name in the format - # `projects/*/locations/*/memberships/*`. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Mask of fields to update. - # @!attribute [rw] resource - # @return [::Google::Cloud::GkeHub::V1::Membership] - # Required. Only fields specified in update_mask are updated. - # If you specify a field in the update_mask but don't specify its value here - # that field will be deleted. - # If you are updating a map field, set the value of a key to null or empty - # string to delete the key from the map. It's not possible to update a key's - # value to the empty string. - # If you specify the update_mask to be a special path "*", fully replaces all - # user-modifiable fields to match `resource`. - # @!attribute [rw] request_id - # @return [::String] - # Optional. A request ID to identify requests. Specify a unique request ID - # so that if you must retry your request, the server will know to ignore - # the request if it has already been completed. The server will guarantee - # that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class UpdateMembershipRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `GkeHub.GenerateConnectManifest` - # method. - # . - # @!attribute [rw] name - # @return [::String] - # Required. The Membership resource name the Agent will associate with, in - # the format `projects/*/locations/*/memberships/*`. - # @!attribute [rw] namespace - # @return [::String] - # Optional. Namespace for GKE Connect agent resources. Defaults to - # `gke-connect`. - # - # The Connect Agent is authorized automatically when run in the default - # namespace. Otherwise, explicit authorization must be granted with an - # additional IAM binding. - # @!attribute [rw] proxy - # @return [::String] - # Optional. URI of a proxy if connectivity from the agent to - # gkeconnect.googleapis.com requires the use of a proxy. Format must be in - # the form `http(s)://{proxy_address}`, depending on the HTTP/HTTPS protocol - # supported by the proxy. This will direct the connect agent's outbound - # traffic through a HTTP(S) proxy. - # @!attribute [rw] version - # @return [::String] - # Optional. The Connect agent version to use. Defaults to the most current - # version. - # @!attribute [rw] is_upgrade - # @return [::Boolean] - # Optional. If true, generate the resources for upgrade only. Some resources - # generated only for installation (e.g. secrets) will be excluded. - # @!attribute [rw] registry - # @return [::String] - # Optional. The registry to fetch the connect agent image from. Defaults to - # gcr.io/gkeconnect. - # @!attribute [rw] image_pull_secret_content - # @return [::String] - # Optional. The image pull secret content for the registry, if not public. - class GenerateConnectManifestRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # GenerateConnectManifestResponse contains manifest information for - # installing/upgrading a Connect agent. - # @!attribute [rw] manifest - # @return [::Array<::Google::Cloud::GkeHub::V1::ConnectAgentResource>] - # The ordered list of Kubernetes resources that need to be applied to the - # cluster for GKE Connect agent installation/upgrade. - class GenerateConnectManifestResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # ConnectAgentResource represents a Kubernetes resource manifest for Connect - # Agent deployment. - # @!attribute [rw] type - # @return [::Google::Cloud::GkeHub::V1::TypeMeta] - # Kubernetes type of the resource. - # @!attribute [rw] manifest - # @return [::String] - # YAML manifest of the resource. - class ConnectAgentResource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # TypeMeta is the type information needed for content unmarshalling of - # Kubernetes resources in the manifest. - # @!attribute [rw] kind - # @return [::String] - # Kind of the resource (e.g. Deployment). - # @!attribute [rw] api_version - # @return [::String] - # APIVersion of the resource (e.g. v1). - class TypeMeta - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `GkeHub.ListFeatures` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent (project and location) where the Features will be - # listed. Specified in the format `projects/*/locations/*`. - # @!attribute [rw] page_size - # @return [::Integer] - # When requesting a 'page' of resources, `page_size` specifies number of - # resources to return. If unspecified or set to 0, all resources will - # be returned. - # @!attribute [rw] page_token - # @return [::String] - # Token returned by previous call to `ListFeatures` which - # specifies the position in the list from where to continue listing the - # resources. - # @!attribute [rw] filter - # @return [::String] - # Lists Features that match the filter expression, following the syntax - # outlined in https://google.aip.dev/160. - # - # Examples: - # - # - Feature with the name "servicemesh" in project "foo-proj": - # - # name = "projects/foo-proj/locations/global/features/servicemesh" - # - # - Features that have a label called `foo`: - # - # labels.foo:* - # - # - Features that have a label called `foo` whose value is `bar`: - # - # labels.foo = bar - # @!attribute [rw] order_by - # @return [::String] - # One or more fields to compare and use to sort the output. - # See https://google.aip.dev/132#ordering. - # @!attribute [rw] return_partial_success - # @return [::Boolean] - # Optional. If set to true, the response will return partial results when - # some regions are unreachable and the unreachable field in Feature proto - # will be populated. If set to false, the request will fail when some regions - # are unreachable. - class ListFeaturesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the `GkeHub.ListFeatures` method. - # @!attribute [rw] resources - # @return [::Array<::Google::Cloud::GkeHub::V1::Feature>] - # The list of matching Features - # @!attribute [rw] next_page_token - # @return [::String] - # A token to request the next page of resources from the - # `ListFeatures` method. The value of an empty string means - # that there are no more resources to return. - class ListFeaturesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `GkeHub.GetFeature` method. - # @!attribute [rw] name - # @return [::String] - # Required. The Feature resource name in the format - # `projects/*/locations/*/features/*` - # @!attribute [rw] return_partial_success - # @return [::Boolean] - # Optional. If set to true, the response will return partial results when - # some regions are unreachable and the unreachable field in Feature proto - # will be populated. If set to false, the request will fail when some regions - # are unreachable. - class GetFeatureRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `GkeHub.CreateFeature` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent (project and location) where the Feature will be - # created. Specified in the format `projects/*/locations/*`. - # @!attribute [rw] feature_id - # @return [::String] - # The ID of the feature to create. - # @!attribute [rw] resource - # @return [::Google::Cloud::GkeHub::V1::Feature] - # The Feature resource to create. - # @!attribute [rw] request_id - # @return [::String] - # A request ID to identify requests. Specify a unique request ID - # so that if you must retry your request, the server will know to ignore - # the request if it has already been completed. The server will guarantee - # that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class CreateFeatureRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `GkeHub.DeleteFeature` method. - # @!attribute [rw] name - # @return [::String] - # Required. The Feature resource name in the format - # `projects/*/locations/*/features/*`. - # @!attribute [rw] force - # @return [::Boolean] - # If set to true, the delete will ignore any outstanding resources for - # this Feature (that is, `FeatureState.has_resources` is set to true). These - # resources will NOT be cleaned up or modified in any way. - # @!attribute [rw] request_id - # @return [::String] - # Optional. A request ID to identify requests. Specify a unique request ID - # so that if you must retry your request, the server will know to ignore - # the request if it has already been completed. The server will guarantee - # that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class DeleteFeatureRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `GkeHub.UpdateFeature` method. - # @!attribute [rw] name - # @return [::String] - # Required. The Feature resource name in the format - # `projects/*/locations/*/features/*`. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Mask of fields to update. - # @!attribute [rw] resource - # @return [::Google::Cloud::GkeHub::V1::Feature] - # Only fields specified in update_mask are updated. - # If you specify a field in the update_mask but don't specify its value here - # that field will be deleted. - # If you are updating a map field, set the value of a key to null or empty - # string to delete the key from the map. It's not possible to update a key's - # value to the empty string. - # If you specify the update_mask to be a special path "*", fully replaces all - # user-modifiable fields to match `resource`. - # @!attribute [rw] request_id - # @return [::String] - # A request ID to identify requests. Specify a unique request ID - # so that if you must retry your request, the server will know to ignore - # the request if it has already been completed. The server will guarantee - # that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and - # the request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class UpdateFeatureRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `GkeHub.CreateFleet` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent (project and location) where the Fleet will be - # created. Specified in the format `projects/*/locations/*`. - # @!attribute [rw] fleet - # @return [::Google::Cloud::GkeHub::V1::Fleet] - # Required. The fleet to create. - class CreateFleetRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `GkeHub.GetFleet` method. - # @!attribute [rw] name - # @return [::String] - # Required. The Fleet resource name in the format - # `projects/*/locations/*/fleets/*`. - class GetFleetRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `GkeHub.UpdateFleet` method. - # @!attribute [rw] fleet - # @return [::Google::Cloud::GkeHub::V1::Fleet] - # Required. The Fleet to update. - # - # The `name` field of the Fleet object identifies which fleet will be - # updated. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. The fields to be updated; - class UpdateFleetRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for `GkeHub.DeleteFleet` method. - # @!attribute [rw] name - # @return [::String] - # Required. The Fleet resource name in the format - # `projects/*/locations/*/fleets/*`. - class DeleteFleetRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for the `GkeHub.ListFleets` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The organization or project to list for Fleets under, in the - # format `organizations/*/locations/*` or `projects/*/locations/*`. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous `ListFleets` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListFleets` must match - # the call that provided the page token. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of fleets to return. The service may return - # fewer than this value. If unspecified, at most 200 fleets will be returned. - # The maximum value is 1000; values above 1000 will be coerced to 1000. - class ListFleetsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for the `GkeHub.ListFleetsResponse` method. - # @!attribute [rw] fleets - # @return [::Array<::Google::Cloud::GkeHub::V1::Fleet>] - # The list of matching fleets. - # @!attribute [rw] next_page_token - # @return [::String] - # A token, which can be sent as `page_token` to retrieve the next page. - # If this field is omitted, there are no subsequent pages. - # The token is only valid for 1h. - class ListFleetsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents the metadata of the long-running operation. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time the operation was created. - # @!attribute [r] end_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time the operation finished running. - # @!attribute [r] target - # @return [::String] - # Output only. Server-defined resource path for the target of the operation. - # @!attribute [r] verb - # @return [::String] - # Output only. Name of the verb executed by the operation. - # @!attribute [r] status_detail - # @return [::String] - # Output only. Human-readable status of the operation, if any. - # @!attribute [r] cancel_requested - # @return [::Boolean] - # Output only. Identifies whether the user has requested cancellation - # of the operation. Operations that have successfully been cancelled - # have - # {::Google::Longrunning::Operation#error google.longrunning.Operation.error} - # value with a {::Google::Rpc::Status#code google.rpc.Status.code} of 1, - # corresponding to `Code.CANCELLED`. - # @!attribute [r] api_version - # @return [::String] - # Output only. API version used to start the operation. - class OperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/longrunning/operations.rb +++ /dev/null @@ -1,191 +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 Longrunning - # This resource represents a long-running operation that is the result of a - # network API call. - # @!attribute [rw] name - # @return [::String] - # The server-assigned name, which is only unique within the same service that - # originally returns it. If you use the default HTTP mapping, the - # `name` should be a resource name ending with `operations/{unique_id}`. - # @!attribute [rw] metadata - # @return [::Google::Protobuf::Any] - # Service-specific metadata associated with the operation. It typically - # contains progress information and common metadata such as create time. - # Some services might not provide such metadata. Any method that returns a - # long-running operation should document the metadata type, if any. - # @!attribute [rw] done - # @return [::Boolean] - # If the value is `false`, it means the operation is still in progress. - # If `true`, the operation is completed, and either `error` or `response` is - # available. - # @!attribute [rw] error - # @return [::Google::Rpc::Status] - # The error result of the operation in case of failure or cancellation. - # - # Note: The following fields are mutually exclusive: `error`, `response`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] response - # @return [::Google::Protobuf::Any] - # The normal, successful response of the operation. If the original - # method returns no data on success, such as `Delete`, the response is - # `google.protobuf.Empty`. If the original method is standard - # `Get`/`Create`/`Update`, the response should be the resource. For other - # methods, the response should have the type `XxxResponse`, where `Xxx` - # is the original method name. For example, if the original method name - # is `TakeSnapshot()`, the inferred response type is - # `TakeSnapshotResponse`. - # - # Note: The following fields are mutually exclusive: `response`, `error`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Operation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.GetOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource. - class GetOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.ListOperations. - # @!attribute [rw] name - # @return [::String] - # The name of the operation's parent resource. - # @!attribute [rw] filter - # @return [::String] - # The standard list filter. - # @!attribute [rw] page_size - # @return [::Integer] - # The standard list page size. - # @!attribute [rw] page_token - # @return [::String] - # The standard list page token. - # @!attribute [rw] return_partial_success - # @return [::Boolean] - # When set to `true`, operations that are reachable are returned as normal, - # and those that are unreachable are returned in the - # [ListOperationsResponse.unreachable] field. - # - # This can only be `true` when reading across collections e.g. when `parent` - # is set to `"projects/example/locations/-"`. - # - # This field is not by default supported and will result in an - # `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - # service or product specific documentation. - class ListOperationsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message for - # Operations.ListOperations. - # @!attribute [rw] operations - # @return [::Array<::Google::Longrunning::Operation>] - # A list of operations that matches the specified filter in the request. - # @!attribute [rw] next_page_token - # @return [::String] - # The standard List next-page token. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unordered list. Unreachable resources. Populated when the request sets - # `ListOperationsRequest.return_partial_success` and reads across - # collections e.g. when attempting to list all resources across all supported - # locations. - class ListOperationsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.CancelOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be cancelled. - class CancelOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.DeleteOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to be deleted. - class DeleteOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # Operations.WaitOperation. - # @!attribute [rw] name - # @return [::String] - # The name of the operation resource to wait on. - # @!attribute [rw] timeout - # @return [::Google::Protobuf::Duration] - # The maximum duration to wait before timing out. If left blank, the wait - # will be at most the time permitted by the underlying HTTP/RPC protocol. - # If RPC context deadline is also specified, the shorter one will be used. - class WaitOperationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A message representing the message types used by a long-running operation. - # - # Example: - # - # rpc Export(ExportRequest) returns (google.longrunning.Operation) { - # option (google.longrunning.operation_info) = { - # response_type: "ExportResponse" - # metadata_type: "ExportMetadata" - # }; - # } - # @!attribute [rw] response_type - # @return [::String] - # Required. The message name of the primary return type for this - # long-running operation. - # This type will be used to deserialize the LRO's response. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - # @!attribute [rw] metadata_type - # @return [::String] - # Required. The message name of the metadata type for this long-running - # operation. - # - # If the response is in a different package from the rpc, a fully-qualified - # message name must be used (e.g. `google.protobuf.Struct`). - # - # Note: Altering this value constitutes a breaking change. - class OperationInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/protobuf/any.rb +++ /dev/null @@ -1,145 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `Any` contains an arbitrary serialized protocol buffer message along with a - # URL that describes the type of the serialized message. - # - # Protobuf library provides support to pack/unpack Any values in the form - # of utility functions or additional generated methods of the Any type. - # - # Example 1: Pack and unpack a message in C++. - # - # Foo foo = ...; - # Any any; - # any.PackFrom(foo); - # ... - # if (any.UnpackTo(&foo)) { - # ... - # } - # - # Example 2: Pack and unpack a message in Java. - # - # Foo foo = ...; - # Any any = Any.pack(foo); - # ... - # if (any.is(Foo.class)) { - # foo = any.unpack(Foo.class); - # } - # // or ... - # if (any.isSameTypeAs(Foo.getDefaultInstance())) { - # foo = any.unpack(Foo.getDefaultInstance()); - # } - # - # Example 3: Pack and unpack a message in Python. - # - # foo = Foo(...) - # any = Any() - # any.Pack(foo) - # ... - # if any.Is(Foo.DESCRIPTOR): - # any.Unpack(foo) - # ... - # - # Example 4: Pack and unpack a message in Go - # - # foo := &pb.Foo{...} - # any, err := anypb.New(foo) - # if err != nil { - # ... - # } - # ... - # foo := &pb.Foo{} - # if err := any.UnmarshalTo(foo); err != nil { - # ... - # } - # - # The pack methods provided by protobuf library will by default use - # 'type.googleapis.com/full.type.name' as the type URL and the unpack - # methods only use the fully qualified type name after the last '/' - # in the type URL, for example "foo.bar.com/x/y.z" will yield type - # name "y.z". - # - # JSON - # ==== - # The JSON representation of an `Any` value uses the regular - # representation of the deserialized, embedded message, with an - # additional field `@type` which contains the type URL. Example: - # - # package google.profile; - # message Person { - # string first_name = 1; - # string last_name = 2; - # } - # - # { - # "@type": "type.googleapis.com/google.profile.Person", - # "firstName": , - # "lastName": - # } - # - # If the embedded message type is well-known and has a custom JSON - # representation, that representation will be embedded adding a field - # `value` which holds the custom JSON in addition to the `@type` - # field. Example (for message [google.protobuf.Duration][]): - # - # { - # "@type": "type.googleapis.com/google.protobuf.Duration", - # "value": "1.212s" - # } - # @!attribute [rw] type_url - # @return [::String] - # A URL/resource name that uniquely identifies the type of the serialized - # protocol buffer message. This string must contain at least - # one "/" character. The last segment of the URL's path must represent - # the fully qualified name of the type (as in - # `path/google.protobuf.Duration`). The name should be in a canonical form - # (e.g., leading "." is not accepted). - # - # In practice, teams usually precompile into the binary all types that they - # expect it to use in the context of Any. However, for URLs which use the - # scheme `http`, `https`, or no scheme, one can optionally set up a type - # server that maps type URLs to message definitions as follows: - # - # * If no scheme is provided, `https` is assumed. - # * An HTTP GET on the URL must yield a [google.protobuf.Type][] - # value in binary format, or produce an error. - # * Applications are allowed to cache lookup results based on the - # URL, or have them precompiled into a binary to avoid any - # lookup. Therefore, binary compatibility needs to be preserved - # on changes to types. (Use versioned type names to manage - # breaking changes.) - # - # Note: this functionality is not currently available in the official - # protobuf release, and it is not used for type URLs beginning with - # type.googleapis.com. As of May 2023, there are no widely used type server - # implementations and no plans to implement one. - # - # Schemes other than `http`, `https` (or the empty scheme) might be - # used with implementation specific semantics. - # @!attribute [rw] value - # @return [::String] - # Must be a valid serialized protocol buffer of the above specified type. - class Any - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/protobuf/duration.rb +++ /dev/null @@ -1,98 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Duration represents a signed, fixed-length span of time represented - # as a count of seconds and fractions of seconds at nanosecond - # resolution. It is independent of any calendar and concepts like "day" - # or "month". It is related to Timestamp in that the difference between - # two Timestamp values is a Duration and it can be added or subtracted - # from a Timestamp. Range is approximately +-10,000 years. - # - # # Examples - # - # Example 1: Compute Duration from two Timestamps in pseudo code. - # - # Timestamp start = ...; - # Timestamp end = ...; - # Duration duration = ...; - # - # duration.seconds = end.seconds - start.seconds; - # duration.nanos = end.nanos - start.nanos; - # - # if (duration.seconds < 0 && duration.nanos > 0) { - # duration.seconds += 1; - # duration.nanos -= 1000000000; - # } else if (duration.seconds > 0 && duration.nanos < 0) { - # duration.seconds -= 1; - # duration.nanos += 1000000000; - # } - # - # Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. - # - # Timestamp start = ...; - # Duration duration = ...; - # Timestamp end = ...; - # - # end.seconds = start.seconds + duration.seconds; - # end.nanos = start.nanos + duration.nanos; - # - # if (end.nanos < 0) { - # end.seconds -= 1; - # end.nanos += 1000000000; - # } else if (end.nanos >= 1000000000) { - # end.seconds += 1; - # end.nanos -= 1000000000; - # } - # - # Example 3: Compute Duration from datetime.timedelta in Python. - # - # td = datetime.timedelta(days=3, minutes=10) - # duration = Duration() - # duration.FromTimedelta(td) - # - # # JSON Mapping - # - # In JSON format, the Duration type is encoded as a string rather than an - # object, where the string ends in the suffix "s" (indicating seconds) and - # is preceded by the number of seconds, with nanoseconds expressed as - # fractional seconds. For example, 3 seconds with 0 nanoseconds should be - # encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should - # be expressed in JSON format as "3.000000001s", and 3 seconds and 1 - # microsecond should be expressed in JSON format as "3.000001s". - # @!attribute [rw] seconds - # @return [::Integer] - # Signed seconds of the span of time. Must be from -315,576,000,000 - # to +315,576,000,000 inclusive. Note: these bounds are computed from: - # 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - # @!attribute [rw] nanos - # @return [::Integer] - # Signed fractions of a second at nanosecond resolution of the span - # of time. Durations less than one second are represented with a 0 - # `seconds` field and a positive or negative `nanos` field. For durations - # of one second or more, a non-zero value for the `nanos` field must be - # of the same sign as the `seconds` field. Must be from -999,999,999 - # to +999,999,999 inclusive. - class Duration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-gke_hub-v1/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-gke_hub-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/protobuf/field_mask.rb +++ /dev/null @@ -1,229 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `FieldMask` represents a set of symbolic field paths, for example: - # - # paths: "f.a" - # paths: "f.b.d" - # - # Here `f` represents a field in some root message, `a` and `b` - # fields in the message found in `f`, and `d` a field found in the - # message in `f.b`. - # - # Field masks are used to specify a subset of fields that should be - # returned by a get operation or modified by an update operation. - # Field masks also have a custom JSON encoding (see below). - # - # # Field Masks in Projections - # - # When used in the context of a projection, a response message or - # sub-message is filtered by the API to only contain those fields as - # specified in the mask. For example, if the mask in the previous - # example is applied to a response message as follows: - # - # f { - # a : 22 - # b { - # d : 1 - # x : 2 - # } - # y : 13 - # } - # z: 8 - # - # The result will not contain specific values for fields x,y and z - # (their value will be set to the default, and omitted in proto text - # output): - # - # - # f { - # a : 22 - # b { - # d : 1 - # } - # } - # - # A repeated field is not allowed except at the last position of a - # paths string. - # - # If a FieldMask object is not present in a get operation, the - # operation applies to all fields (as if a FieldMask of all fields - # had been specified). - # - # Note that a field mask does not necessarily apply to the - # top-level response message. In case of a REST get operation, the - # field mask applies directly to the response, but in case of a REST - # list operation, the mask instead applies to each individual message - # in the returned resource list. In case of a REST custom method, - # other definitions may be used. Where the mask applies will be - # clearly documented together with its declaration in the API. In - # any case, the effect on the returned resource/resources is required - # behavior for APIs. - # - # # Field Masks in Update Operations - # - # A field mask in update operations specifies which fields of the - # targeted resource are going to be updated. The API is required - # to only change the values of the fields as specified in the mask - # and leave the others untouched. If a resource is passed in to - # describe the updated values, the API ignores the values of all - # fields not covered by the mask. - # - # If a repeated field is specified for an update operation, new values will - # be appended to the existing repeated field in the target resource. Note that - # a repeated field is only allowed in the last position of a `paths` string. - # - # If a sub-message is specified in the last position of the field mask for an - # update operation, then new value will be merged into the existing sub-message - # in the target resource. - # - # For example, given the target message: - # - # f { - # b { - # d: 1 - # x: 2 - # } - # c: [1] - # } - # - # And an update message: - # - # f { - # b { - # d: 10 - # } - # c: [2] - # } - # - # then if the field mask is: - # - # paths: ["f.b", "f.c"] - # - # then the result will be: - # - # f { - # b { - # d: 10 - # x: 2 - # } - # c: [1, 2] - # } - # - # An implementation may provide options to override this default behavior for - # repeated and message fields. - # - # In order to reset a field's value to the default, the field must - # be in the mask and set to the default value in the provided resource. - # Hence, in order to reset all fields of a resource, provide a default - # instance of the resource and set all fields in the mask, or do - # not provide a mask as described below. - # - # If a field mask is not present on update, the operation applies to - # all fields (as if a field mask of all fields has been specified). - # Note that in the presence of schema evolution, this may mean that - # fields the client does not know and has therefore not filled into - # the request will be reset to their default. If this is unwanted - # behavior, a specific service may require a client to always specify - # a field mask, producing an error if not. - # - # As with get operations, the location of the resource which - # describes the updated values in the request message depends on the - # operation kind. In any case, the effect of the field mask is - # required to be honored by the API. - # - # ## Considerations for HTTP REST - # - # The HTTP kind of an update operation which uses a field mask must - # be set to PATCH instead of PUT in order to satisfy HTTP semantics - # (PUT must only be used for full updates). - # - # # JSON Encoding of Field Masks - # - # In JSON, a field mask is encoded as a single string where paths are - # separated by a comma. Fields name in each path are converted - # to/from lower-camel naming conventions. - # - # As an example, consider the following message declarations: - # - # message Profile { - # User user = 1; - # Photo photo = 2; - # } - # message User { - # string display_name = 1; - # string address = 2; - # } - # - # In proto a field mask for `Profile` may look as such: - # - # mask { - # paths: "user.display_name" - # paths: "photo" - # } - # - # In JSON, the same mask is represented as below: - # - # { - # mask: "user.displayName,photo" - # } - # - # # Field Masks and Oneof Fields - # - # Field masks treat fields in oneofs just as regular fields. Consider the - # following message: - # - # message SampleMessage { - # oneof test_oneof { - # string name = 4; - # SubMessage sub_message = 9; - # } - # } - # - # The field mask can be: - # - # mask { - # paths: "name" - # } - # - # Or: - # - # mask { - # paths: "sub_message" - # } - # - # Note that oneof type names ("test_oneof" in this case) cannot be used in - # paths. - # - # ## Field Mask Verification - # - # The implementation of any API method which has a FieldMask type field in the - # request should verify the included field paths, and return an - # `INVALID_ARGUMENT` error if any path is unmappable. - # @!attribute [rw] paths - # @return [::Array<::String>] - # The set of field mask paths. - class FieldMask - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-cloud-gke_hub-v1/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-gke_hub-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-gke_hub-v1/proto_docs/google/rpc/status.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Rpc - # The `Status` type defines a logical error model that is suitable for - # different programming environments, including REST APIs and RPC APIs. It is - # used by [gRPC](https://github.com/grpc). Each `Status` message contains - # three pieces of data: error code, error message, and error details. - # - # You can find out more about this error model and how to work with it in the - # [API Design Guide](https://cloud.google.com/apis/design/errors). - # @!attribute [rw] code - # @return [::Integer] - # The status code, which should be an enum value of - # [google.rpc.Code][google.rpc.Code]. - # @!attribute [rw] message - # @return [::String] - # A developer-facing error message, which should be in English. Any - # user-facing error message should be localized and sent in the - # {::Google::Rpc::Status#details google.rpc.Status.details} field, or localized - # by the client. - # @!attribute [rw] details - # @return [::Array<::Google::Protobuf::Any>] - # A list of messages that carry the error details. There is a common set of - # message types for APIs to use. - class Status - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/Gemfile deleted file mode 100644 index 7c86bdbf96dc..000000000000 --- a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/Gemfile +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -source "https://rubygems.org" - -if ENV["GOOGLE_CLOUD_SAMPLES_TEST"] == "master" - gem "google-cloud-gke_hub-v1", path: "../" -else - gem "google-cloud-gke_hub-v1" -end - -group :test do - gem "google-style", "~> 1.26.1" - gem "minitest", "~> 5.16" - gem "minitest-focus", "~> 1.1" - gem "minitest-hooks", "~> 1.5" -end diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/create_feature.rb b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/create_feature.rb deleted file mode 100644 index dfc6134d9771..000000000000 --- a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/create_feature.rb +++ /dev/null @@ -1,54 +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 gkehub_v1_generated_GkeHub_CreateFeature_sync] -require "google/cloud/gke_hub/v1" - -## -# Snippet for the create_feature call in the GkeHub 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::GkeHub::V1::GkeHub::Client#create_feature. -# -def create_feature - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GkeHub::V1::GkeHub::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GkeHub::V1::CreateFeatureRequest.new - - # Call the create_feature method. - result = client.create_feature request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END gkehub_v1_generated_GkeHub_CreateFeature_sync] diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/create_membership.rb b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/create_membership.rb deleted file mode 100644 index 28f6d4328e93..000000000000 --- a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/create_membership.rb +++ /dev/null @@ -1,54 +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 gkehub_v1_generated_GkeHub_CreateMembership_sync] -require "google/cloud/gke_hub/v1" - -## -# Snippet for the create_membership call in the GkeHub 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::GkeHub::V1::GkeHub::Client#create_membership. -# -def create_membership - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GkeHub::V1::GkeHub::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GkeHub::V1::CreateMembershipRequest.new - - # Call the create_membership method. - result = client.create_membership request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END gkehub_v1_generated_GkeHub_CreateMembership_sync] diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/delete_feature.rb b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/delete_feature.rb deleted file mode 100644 index d5ab282208d9..000000000000 --- a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/delete_feature.rb +++ /dev/null @@ -1,54 +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 gkehub_v1_generated_GkeHub_DeleteFeature_sync] -require "google/cloud/gke_hub/v1" - -## -# Snippet for the delete_feature call in the GkeHub 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::GkeHub::V1::GkeHub::Client#delete_feature. -# -def delete_feature - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GkeHub::V1::GkeHub::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GkeHub::V1::DeleteFeatureRequest.new - - # Call the delete_feature method. - result = client.delete_feature request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END gkehub_v1_generated_GkeHub_DeleteFeature_sync] diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/delete_membership.rb b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/delete_membership.rb deleted file mode 100644 index bda3bb0bb7e8..000000000000 --- a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/delete_membership.rb +++ /dev/null @@ -1,54 +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 gkehub_v1_generated_GkeHub_DeleteMembership_sync] -require "google/cloud/gke_hub/v1" - -## -# Snippet for the delete_membership call in the GkeHub 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::GkeHub::V1::GkeHub::Client#delete_membership. -# -def delete_membership - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GkeHub::V1::GkeHub::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GkeHub::V1::DeleteMembershipRequest.new - - # Call the delete_membership method. - result = client.delete_membership request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END gkehub_v1_generated_GkeHub_DeleteMembership_sync] diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/generate_connect_manifest.rb b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/generate_connect_manifest.rb deleted file mode 100644 index a9afd25a3136..000000000000 --- a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/generate_connect_manifest.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 gkehub_v1_generated_GkeHub_GenerateConnectManifest_sync] -require "google/cloud/gke_hub/v1" - -## -# Snippet for the generate_connect_manifest call in the GkeHub 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::GkeHub::V1::GkeHub::Client#generate_connect_manifest. -# -def generate_connect_manifest - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GkeHub::V1::GkeHub::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GkeHub::V1::GenerateConnectManifestRequest.new - - # Call the generate_connect_manifest method. - result = client.generate_connect_manifest request - - # The returned object is of type Google::Cloud::GkeHub::V1::GenerateConnectManifestResponse. - p result -end -# [END gkehub_v1_generated_GkeHub_GenerateConnectManifest_sync] diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/get_feature.rb b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/get_feature.rb deleted file mode 100644 index f7e8cd8203b8..000000000000 --- a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/get_feature.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 gkehub_v1_generated_GkeHub_GetFeature_sync] -require "google/cloud/gke_hub/v1" - -## -# Snippet for the get_feature call in the GkeHub 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::GkeHub::V1::GkeHub::Client#get_feature. -# -def get_feature - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GkeHub::V1::GkeHub::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GkeHub::V1::GetFeatureRequest.new - - # Call the get_feature method. - result = client.get_feature request - - # The returned object is of type Google::Cloud::GkeHub::V1::Feature. - p result -end -# [END gkehub_v1_generated_GkeHub_GetFeature_sync] diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/get_membership.rb b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/get_membership.rb deleted file mode 100644 index 936b0e63b577..000000000000 --- a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/get_membership.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 gkehub_v1_generated_GkeHub_GetMembership_sync] -require "google/cloud/gke_hub/v1" - -## -# Snippet for the get_membership call in the GkeHub 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::GkeHub::V1::GkeHub::Client#get_membership. -# -def get_membership - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GkeHub::V1::GkeHub::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GkeHub::V1::GetMembershipRequest.new - - # Call the get_membership method. - result = client.get_membership request - - # The returned object is of type Google::Cloud::GkeHub::V1::Membership. - p result -end -# [END gkehub_v1_generated_GkeHub_GetMembership_sync] diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/list_features.rb b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/list_features.rb deleted file mode 100644 index 691761a88b5f..000000000000 --- a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/list_features.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 gkehub_v1_generated_GkeHub_ListFeatures_sync] -require "google/cloud/gke_hub/v1" - -## -# Snippet for the list_features call in the GkeHub 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::GkeHub::V1::GkeHub::Client#list_features. -# -def list_features - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GkeHub::V1::GkeHub::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GkeHub::V1::ListFeaturesRequest.new - - # Call the list_features method. - result = client.list_features 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::GkeHub::V1::Feature. - p item - end -end -# [END gkehub_v1_generated_GkeHub_ListFeatures_sync] diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/list_memberships.rb b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/list_memberships.rb deleted file mode 100644 index 26d33fb34cf5..000000000000 --- a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/list_memberships.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 gkehub_v1_generated_GkeHub_ListMemberships_sync] -require "google/cloud/gke_hub/v1" - -## -# Snippet for the list_memberships call in the GkeHub 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::GkeHub::V1::GkeHub::Client#list_memberships. -# -def list_memberships - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GkeHub::V1::GkeHub::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GkeHub::V1::ListMembershipsRequest.new - - # Call the list_memberships method. - result = client.list_memberships 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::GkeHub::V1::Membership. - p item - end -end -# [END gkehub_v1_generated_GkeHub_ListMemberships_sync] diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/update_feature.rb b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/update_feature.rb deleted file mode 100644 index b7b0abe5df93..000000000000 --- a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/update_feature.rb +++ /dev/null @@ -1,54 +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 gkehub_v1_generated_GkeHub_UpdateFeature_sync] -require "google/cloud/gke_hub/v1" - -## -# Snippet for the update_feature call in the GkeHub 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::GkeHub::V1::GkeHub::Client#update_feature. -# -def update_feature - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GkeHub::V1::GkeHub::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GkeHub::V1::UpdateFeatureRequest.new - - # Call the update_feature method. - result = client.update_feature request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END gkehub_v1_generated_GkeHub_UpdateFeature_sync] diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/update_membership.rb b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/update_membership.rb deleted file mode 100644 index 46717539b954..000000000000 --- a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/gke_hub/update_membership.rb +++ /dev/null @@ -1,54 +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 gkehub_v1_generated_GkeHub_UpdateMembership_sync] -require "google/cloud/gke_hub/v1" - -## -# Snippet for the update_membership call in the GkeHub 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::GkeHub::V1::GkeHub::Client#update_membership. -# -def update_membership - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GkeHub::V1::GkeHub::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GkeHub::V1::UpdateMembershipRequest.new - - # Call the update_membership method. - result = client.update_membership request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END gkehub_v1_generated_GkeHub_UpdateMembership_sync] diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/snippet_metadata_google.cloud.gkehub.v1.json b/owl-bot-staging/google-cloud-gke_hub-v1/snippets/snippet_metadata_google.cloud.gkehub.v1.json deleted file mode 100644 index 6a997ad0f834..000000000000 --- a/owl-bot-staging/google-cloud-gke_hub-v1/snippets/snippet_metadata_google.cloud.gkehub.v1.json +++ /dev/null @@ -1,1775 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-gke_hub-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.gkehub.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "gkehub_v1_generated_GkeHub_ListMemberships_sync", - "title": "Snippet for the list_memberships call in the GkeHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#list_memberships.", - "file": "gke_hub/list_memberships.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_memberships", - "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#list_memberships", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GkeHub::V1::ListMembershipsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::GkeHub::V1::ListMembershipsResponse", - "client": { - "short_name": "GkeHub::Client", - "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" - }, - "method": { - "short_name": "ListMemberships", - "full_name": "google.cloud.gkehub.v1.GkeHub.ListMemberships", - "service": { - "short_name": "GkeHub", - "full_name": "google.cloud.gkehub.v1.GkeHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "gkehub_v1_generated_GkeHub_ListBoundMemberships_sync", - "title": "Snippet for the list_bound_memberships call in the GkeHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#list_bound_memberships.", - "file": "gke_hub/list_bound_memberships.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_bound_memberships", - "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#list_bound_memberships", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GkeHub::V1::ListBoundMembershipsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::GkeHub::V1::ListBoundMembershipsResponse", - "client": { - "short_name": "GkeHub::Client", - "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" - }, - "method": { - "short_name": "ListBoundMemberships", - "full_name": "google.cloud.gkehub.v1.GkeHub.ListBoundMemberships", - "service": { - "short_name": "GkeHub", - "full_name": "google.cloud.gkehub.v1.GkeHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "gkehub_v1_generated_GkeHub_ListFeatures_sync", - "title": "Snippet for the list_features call in the GkeHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#list_features.", - "file": "gke_hub/list_features.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_features", - "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#list_features", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GkeHub::V1::ListFeaturesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::GkeHub::V1::ListFeaturesResponse", - "client": { - "short_name": "GkeHub::Client", - "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" - }, - "method": { - "short_name": "ListFeatures", - "full_name": "google.cloud.gkehub.v1.GkeHub.ListFeatures", - "service": { - "short_name": "GkeHub", - "full_name": "google.cloud.gkehub.v1.GkeHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "gkehub_v1_generated_GkeHub_GetMembership_sync", - "title": "Snippet for the get_membership call in the GkeHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#get_membership.", - "file": "gke_hub/get_membership.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_membership", - "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#get_membership", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GkeHub::V1::GetMembershipRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::GkeHub::V1::Membership", - "client": { - "short_name": "GkeHub::Client", - "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" - }, - "method": { - "short_name": "GetMembership", - "full_name": "google.cloud.gkehub.v1.GkeHub.GetMembership", - "service": { - "short_name": "GkeHub", - "full_name": "google.cloud.gkehub.v1.GkeHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "gkehub_v1_generated_GkeHub_GetFeature_sync", - "title": "Snippet for the get_feature call in the GkeHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#get_feature.", - "file": "gke_hub/get_feature.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_feature", - "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#get_feature", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GkeHub::V1::GetFeatureRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::GkeHub::V1::Feature", - "client": { - "short_name": "GkeHub::Client", - "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" - }, - "method": { - "short_name": "GetFeature", - "full_name": "google.cloud.gkehub.v1.GkeHub.GetFeature", - "service": { - "short_name": "GkeHub", - "full_name": "google.cloud.gkehub.v1.GkeHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "gkehub_v1_generated_GkeHub_CreateMembership_sync", - "title": "Snippet for the create_membership call in the GkeHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#create_membership.", - "file": "gke_hub/create_membership.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_membership", - "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#create_membership", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GkeHub::V1::CreateMembershipRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "GkeHub::Client", - "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" - }, - "method": { - "short_name": "CreateMembership", - "full_name": "google.cloud.gkehub.v1.GkeHub.CreateMembership", - "service": { - "short_name": "GkeHub", - "full_name": "google.cloud.gkehub.v1.GkeHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "gkehub_v1_generated_GkeHub_CreateFeature_sync", - "title": "Snippet for the create_feature call in the GkeHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#create_feature.", - "file": "gke_hub/create_feature.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_feature", - "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#create_feature", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GkeHub::V1::CreateFeatureRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "GkeHub::Client", - "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" - }, - "method": { - "short_name": "CreateFeature", - "full_name": "google.cloud.gkehub.v1.GkeHub.CreateFeature", - "service": { - "short_name": "GkeHub", - "full_name": "google.cloud.gkehub.v1.GkeHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "gkehub_v1_generated_GkeHub_DeleteMembership_sync", - "title": "Snippet for the delete_membership call in the GkeHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#delete_membership.", - "file": "gke_hub/delete_membership.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_membership", - "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#delete_membership", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GkeHub::V1::DeleteMembershipRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "GkeHub::Client", - "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" - }, - "method": { - "short_name": "DeleteMembership", - "full_name": "google.cloud.gkehub.v1.GkeHub.DeleteMembership", - "service": { - "short_name": "GkeHub", - "full_name": "google.cloud.gkehub.v1.GkeHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "gkehub_v1_generated_GkeHub_DeleteFeature_sync", - "title": "Snippet for the delete_feature call in the GkeHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#delete_feature.", - "file": "gke_hub/delete_feature.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_feature", - "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#delete_feature", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GkeHub::V1::DeleteFeatureRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "GkeHub::Client", - "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" - }, - "method": { - "short_name": "DeleteFeature", - "full_name": "google.cloud.gkehub.v1.GkeHub.DeleteFeature", - "service": { - "short_name": "GkeHub", - "full_name": "google.cloud.gkehub.v1.GkeHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "gkehub_v1_generated_GkeHub_UpdateMembership_sync", - "title": "Snippet for the update_membership call in the GkeHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#update_membership.", - "file": "gke_hub/update_membership.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_membership", - "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#update_membership", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GkeHub::V1::UpdateMembershipRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "GkeHub::Client", - "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" - }, - "method": { - "short_name": "UpdateMembership", - "full_name": "google.cloud.gkehub.v1.GkeHub.UpdateMembership", - "service": { - "short_name": "GkeHub", - "full_name": "google.cloud.gkehub.v1.GkeHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "gkehub_v1_generated_GkeHub_UpdateFeature_sync", - "title": "Snippet for the update_feature call in the GkeHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#update_feature.", - "file": "gke_hub/update_feature.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_feature", - "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#update_feature", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GkeHub::V1::UpdateFeatureRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "GkeHub::Client", - "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" - }, - "method": { - "short_name": "UpdateFeature", - "full_name": "google.cloud.gkehub.v1.GkeHub.UpdateFeature", - "service": { - "short_name": "GkeHub", - "full_name": "google.cloud.gkehub.v1.GkeHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "gkehub_v1_generated_GkeHub_GenerateConnectManifest_sync", - "title": "Snippet for the generate_connect_manifest call in the GkeHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#generate_connect_manifest.", - "file": "gke_hub/generate_connect_manifest.rb", - "language": "RUBY", - "client_method": { - "short_name": "generate_connect_manifest", - "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#generate_connect_manifest", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GkeHub::V1::GenerateConnectManifestRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::GkeHub::V1::GenerateConnectManifestResponse", - "client": { - "short_name": "GkeHub::Client", - "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" - }, - "method": { - "short_name": "GenerateConnectManifest", - "full_name": "google.cloud.gkehub.v1.GkeHub.GenerateConnectManifest", - "service": { - "short_name": "GkeHub", - "full_name": "google.cloud.gkehub.v1.GkeHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "gkehub_v1_generated_GkeHub_CreateFleet_sync", - "title": "Snippet for the create_fleet call in the GkeHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#create_fleet.", - "file": "gke_hub/create_fleet.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_fleet", - "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#create_fleet", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GkeHub::V1::CreateFleetRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "GkeHub::Client", - "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" - }, - "method": { - "short_name": "CreateFleet", - "full_name": "google.cloud.gkehub.v1.GkeHub.CreateFleet", - "service": { - "short_name": "GkeHub", - "full_name": "google.cloud.gkehub.v1.GkeHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "gkehub_v1_generated_GkeHub_GetFleet_sync", - "title": "Snippet for the get_fleet call in the GkeHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#get_fleet.", - "file": "gke_hub/get_fleet.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_fleet", - "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#get_fleet", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GkeHub::V1::GetFleetRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::GkeHub::V1::Fleet", - "client": { - "short_name": "GkeHub::Client", - "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" - }, - "method": { - "short_name": "GetFleet", - "full_name": "google.cloud.gkehub.v1.GkeHub.GetFleet", - "service": { - "short_name": "GkeHub", - "full_name": "google.cloud.gkehub.v1.GkeHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "gkehub_v1_generated_GkeHub_UpdateFleet_sync", - "title": "Snippet for the update_fleet call in the GkeHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#update_fleet.", - "file": "gke_hub/update_fleet.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_fleet", - "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#update_fleet", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GkeHub::V1::UpdateFleetRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "GkeHub::Client", - "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" - }, - "method": { - "short_name": "UpdateFleet", - "full_name": "google.cloud.gkehub.v1.GkeHub.UpdateFleet", - "service": { - "short_name": "GkeHub", - "full_name": "google.cloud.gkehub.v1.GkeHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "gkehub_v1_generated_GkeHub_DeleteFleet_sync", - "title": "Snippet for the delete_fleet call in the GkeHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#delete_fleet.", - "file": "gke_hub/delete_fleet.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_fleet", - "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#delete_fleet", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GkeHub::V1::DeleteFleetRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "GkeHub::Client", - "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" - }, - "method": { - "short_name": "DeleteFleet", - "full_name": "google.cloud.gkehub.v1.GkeHub.DeleteFleet", - "service": { - "short_name": "GkeHub", - "full_name": "google.cloud.gkehub.v1.GkeHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "gkehub_v1_generated_GkeHub_ListFleets_sync", - "title": "Snippet for the list_fleets call in the GkeHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#list_fleets.", - "file": "gke_hub/list_fleets.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_fleets", - "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#list_fleets", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GkeHub::V1::ListFleetsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::GkeHub::V1::ListFleetsResponse", - "client": { - "short_name": "GkeHub::Client", - "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" - }, - "method": { - "short_name": "ListFleets", - "full_name": "google.cloud.gkehub.v1.GkeHub.ListFleets", - "service": { - "short_name": "GkeHub", - "full_name": "google.cloud.gkehub.v1.GkeHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "gkehub_v1_generated_GkeHub_GetScopeNamespace_sync", - "title": "Snippet for the get_scope_namespace call in the GkeHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#get_scope_namespace.", - "file": "gke_hub/get_scope_namespace.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_scope_namespace", - "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#get_scope_namespace", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GkeHub::V1::GetScopeNamespaceRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::GkeHub::V1::Namespace", - "client": { - "short_name": "GkeHub::Client", - "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" - }, - "method": { - "short_name": "GetScopeNamespace", - "full_name": "google.cloud.gkehub.v1.GkeHub.GetScopeNamespace", - "service": { - "short_name": "GkeHub", - "full_name": "google.cloud.gkehub.v1.GkeHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "gkehub_v1_generated_GkeHub_CreateScopeNamespace_sync", - "title": "Snippet for the create_scope_namespace call in the GkeHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#create_scope_namespace.", - "file": "gke_hub/create_scope_namespace.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_scope_namespace", - "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#create_scope_namespace", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GkeHub::V1::CreateScopeNamespaceRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "GkeHub::Client", - "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" - }, - "method": { - "short_name": "CreateScopeNamespace", - "full_name": "google.cloud.gkehub.v1.GkeHub.CreateScopeNamespace", - "service": { - "short_name": "GkeHub", - "full_name": "google.cloud.gkehub.v1.GkeHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "gkehub_v1_generated_GkeHub_UpdateScopeNamespace_sync", - "title": "Snippet for the update_scope_namespace call in the GkeHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#update_scope_namespace.", - "file": "gke_hub/update_scope_namespace.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_scope_namespace", - "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#update_scope_namespace", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GkeHub::V1::UpdateScopeNamespaceRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "GkeHub::Client", - "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" - }, - "method": { - "short_name": "UpdateScopeNamespace", - "full_name": "google.cloud.gkehub.v1.GkeHub.UpdateScopeNamespace", - "service": { - "short_name": "GkeHub", - "full_name": "google.cloud.gkehub.v1.GkeHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "gkehub_v1_generated_GkeHub_DeleteScopeNamespace_sync", - "title": "Snippet for the delete_scope_namespace call in the GkeHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#delete_scope_namespace.", - "file": "gke_hub/delete_scope_namespace.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_scope_namespace", - "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#delete_scope_namespace", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GkeHub::V1::DeleteScopeNamespaceRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "GkeHub::Client", - "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" - }, - "method": { - "short_name": "DeleteScopeNamespace", - "full_name": "google.cloud.gkehub.v1.GkeHub.DeleteScopeNamespace", - "service": { - "short_name": "GkeHub", - "full_name": "google.cloud.gkehub.v1.GkeHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "gkehub_v1_generated_GkeHub_ListScopeNamespaces_sync", - "title": "Snippet for the list_scope_namespaces call in the GkeHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#list_scope_namespaces.", - "file": "gke_hub/list_scope_namespaces.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_scope_namespaces", - "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#list_scope_namespaces", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GkeHub::V1::ListScopeNamespacesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::GkeHub::V1::ListScopeNamespacesResponse", - "client": { - "short_name": "GkeHub::Client", - "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" - }, - "method": { - "short_name": "ListScopeNamespaces", - "full_name": "google.cloud.gkehub.v1.GkeHub.ListScopeNamespaces", - "service": { - "short_name": "GkeHub", - "full_name": "google.cloud.gkehub.v1.GkeHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "gkehub_v1_generated_GkeHub_GetScopeRBACRoleBinding_sync", - "title": "Snippet for the get_scope_rbac_role_binding call in the GkeHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#get_scope_rbac_role_binding.", - "file": "gke_hub/get_scope_rbac_role_binding.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_scope_rbac_role_binding", - "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#get_scope_rbac_role_binding", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GkeHub::V1::GetScopeRBACRoleBindingRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::GkeHub::V1::RBACRoleBinding", - "client": { - "short_name": "GkeHub::Client", - "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" - }, - "method": { - "short_name": "GetScopeRBACRoleBinding", - "full_name": "google.cloud.gkehub.v1.GkeHub.GetScopeRBACRoleBinding", - "service": { - "short_name": "GkeHub", - "full_name": "google.cloud.gkehub.v1.GkeHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "gkehub_v1_generated_GkeHub_CreateScopeRBACRoleBinding_sync", - "title": "Snippet for the create_scope_rbac_role_binding call in the GkeHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#create_scope_rbac_role_binding.", - "file": "gke_hub/create_scope_rbac_role_binding.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_scope_rbac_role_binding", - "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#create_scope_rbac_role_binding", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GkeHub::V1::CreateScopeRBACRoleBindingRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "GkeHub::Client", - "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" - }, - "method": { - "short_name": "CreateScopeRBACRoleBinding", - "full_name": "google.cloud.gkehub.v1.GkeHub.CreateScopeRBACRoleBinding", - "service": { - "short_name": "GkeHub", - "full_name": "google.cloud.gkehub.v1.GkeHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "gkehub_v1_generated_GkeHub_UpdateScopeRBACRoleBinding_sync", - "title": "Snippet for the update_scope_rbac_role_binding call in the GkeHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#update_scope_rbac_role_binding.", - "file": "gke_hub/update_scope_rbac_role_binding.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_scope_rbac_role_binding", - "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#update_scope_rbac_role_binding", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GkeHub::V1::UpdateScopeRBACRoleBindingRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "GkeHub::Client", - "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" - }, - "method": { - "short_name": "UpdateScopeRBACRoleBinding", - "full_name": "google.cloud.gkehub.v1.GkeHub.UpdateScopeRBACRoleBinding", - "service": { - "short_name": "GkeHub", - "full_name": "google.cloud.gkehub.v1.GkeHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "gkehub_v1_generated_GkeHub_DeleteScopeRBACRoleBinding_sync", - "title": "Snippet for the delete_scope_rbac_role_binding call in the GkeHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#delete_scope_rbac_role_binding.", - "file": "gke_hub/delete_scope_rbac_role_binding.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_scope_rbac_role_binding", - "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#delete_scope_rbac_role_binding", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GkeHub::V1::DeleteScopeRBACRoleBindingRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "GkeHub::Client", - "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" - }, - "method": { - "short_name": "DeleteScopeRBACRoleBinding", - "full_name": "google.cloud.gkehub.v1.GkeHub.DeleteScopeRBACRoleBinding", - "service": { - "short_name": "GkeHub", - "full_name": "google.cloud.gkehub.v1.GkeHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "gkehub_v1_generated_GkeHub_ListScopeRBACRoleBindings_sync", - "title": "Snippet for the list_scope_rbac_role_bindings call in the GkeHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#list_scope_rbac_role_bindings.", - "file": "gke_hub/list_scope_rbac_role_bindings.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_scope_rbac_role_bindings", - "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#list_scope_rbac_role_bindings", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GkeHub::V1::ListScopeRBACRoleBindingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::GkeHub::V1::ListScopeRBACRoleBindingsResponse", - "client": { - "short_name": "GkeHub::Client", - "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" - }, - "method": { - "short_name": "ListScopeRBACRoleBindings", - "full_name": "google.cloud.gkehub.v1.GkeHub.ListScopeRBACRoleBindings", - "service": { - "short_name": "GkeHub", - "full_name": "google.cloud.gkehub.v1.GkeHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "gkehub_v1_generated_GkeHub_GetScope_sync", - "title": "Snippet for the get_scope call in the GkeHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#get_scope.", - "file": "gke_hub/get_scope.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_scope", - "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#get_scope", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GkeHub::V1::GetScopeRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::GkeHub::V1::Scope", - "client": { - "short_name": "GkeHub::Client", - "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" - }, - "method": { - "short_name": "GetScope", - "full_name": "google.cloud.gkehub.v1.GkeHub.GetScope", - "service": { - "short_name": "GkeHub", - "full_name": "google.cloud.gkehub.v1.GkeHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "gkehub_v1_generated_GkeHub_CreateScope_sync", - "title": "Snippet for the create_scope call in the GkeHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#create_scope.", - "file": "gke_hub/create_scope.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_scope", - "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#create_scope", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GkeHub::V1::CreateScopeRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "GkeHub::Client", - "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" - }, - "method": { - "short_name": "CreateScope", - "full_name": "google.cloud.gkehub.v1.GkeHub.CreateScope", - "service": { - "short_name": "GkeHub", - "full_name": "google.cloud.gkehub.v1.GkeHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "gkehub_v1_generated_GkeHub_UpdateScope_sync", - "title": "Snippet for the update_scope call in the GkeHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#update_scope.", - "file": "gke_hub/update_scope.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_scope", - "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#update_scope", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GkeHub::V1::UpdateScopeRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "GkeHub::Client", - "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" - }, - "method": { - "short_name": "UpdateScope", - "full_name": "google.cloud.gkehub.v1.GkeHub.UpdateScope", - "service": { - "short_name": "GkeHub", - "full_name": "google.cloud.gkehub.v1.GkeHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "gkehub_v1_generated_GkeHub_DeleteScope_sync", - "title": "Snippet for the delete_scope call in the GkeHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#delete_scope.", - "file": "gke_hub/delete_scope.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_scope", - "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#delete_scope", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GkeHub::V1::DeleteScopeRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "GkeHub::Client", - "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" - }, - "method": { - "short_name": "DeleteScope", - "full_name": "google.cloud.gkehub.v1.GkeHub.DeleteScope", - "service": { - "short_name": "GkeHub", - "full_name": "google.cloud.gkehub.v1.GkeHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "gkehub_v1_generated_GkeHub_ListScopes_sync", - "title": "Snippet for the list_scopes call in the GkeHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#list_scopes.", - "file": "gke_hub/list_scopes.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_scopes", - "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#list_scopes", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GkeHub::V1::ListScopesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::GkeHub::V1::ListScopesResponse", - "client": { - "short_name": "GkeHub::Client", - "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" - }, - "method": { - "short_name": "ListScopes", - "full_name": "google.cloud.gkehub.v1.GkeHub.ListScopes", - "service": { - "short_name": "GkeHub", - "full_name": "google.cloud.gkehub.v1.GkeHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "gkehub_v1_generated_GkeHub_ListPermittedScopes_sync", - "title": "Snippet for the list_permitted_scopes call in the GkeHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#list_permitted_scopes.", - "file": "gke_hub/list_permitted_scopes.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_permitted_scopes", - "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#list_permitted_scopes", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GkeHub::V1::ListPermittedScopesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::GkeHub::V1::ListPermittedScopesResponse", - "client": { - "short_name": "GkeHub::Client", - "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" - }, - "method": { - "short_name": "ListPermittedScopes", - "full_name": "google.cloud.gkehub.v1.GkeHub.ListPermittedScopes", - "service": { - "short_name": "GkeHub", - "full_name": "google.cloud.gkehub.v1.GkeHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "gkehub_v1_generated_GkeHub_GetMembershipBinding_sync", - "title": "Snippet for the get_membership_binding call in the GkeHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#get_membership_binding.", - "file": "gke_hub/get_membership_binding.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_membership_binding", - "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#get_membership_binding", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GkeHub::V1::GetMembershipBindingRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::GkeHub::V1::MembershipBinding", - "client": { - "short_name": "GkeHub::Client", - "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" - }, - "method": { - "short_name": "GetMembershipBinding", - "full_name": "google.cloud.gkehub.v1.GkeHub.GetMembershipBinding", - "service": { - "short_name": "GkeHub", - "full_name": "google.cloud.gkehub.v1.GkeHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "gkehub_v1_generated_GkeHub_CreateMembershipBinding_sync", - "title": "Snippet for the create_membership_binding call in the GkeHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#create_membership_binding.", - "file": "gke_hub/create_membership_binding.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_membership_binding", - "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#create_membership_binding", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GkeHub::V1::CreateMembershipBindingRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "GkeHub::Client", - "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" - }, - "method": { - "short_name": "CreateMembershipBinding", - "full_name": "google.cloud.gkehub.v1.GkeHub.CreateMembershipBinding", - "service": { - "short_name": "GkeHub", - "full_name": "google.cloud.gkehub.v1.GkeHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "gkehub_v1_generated_GkeHub_UpdateMembershipBinding_sync", - "title": "Snippet for the update_membership_binding call in the GkeHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#update_membership_binding.", - "file": "gke_hub/update_membership_binding.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_membership_binding", - "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#update_membership_binding", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GkeHub::V1::UpdateMembershipBindingRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "GkeHub::Client", - "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" - }, - "method": { - "short_name": "UpdateMembershipBinding", - "full_name": "google.cloud.gkehub.v1.GkeHub.UpdateMembershipBinding", - "service": { - "short_name": "GkeHub", - "full_name": "google.cloud.gkehub.v1.GkeHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "gkehub_v1_generated_GkeHub_DeleteMembershipBinding_sync", - "title": "Snippet for the delete_membership_binding call in the GkeHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#delete_membership_binding.", - "file": "gke_hub/delete_membership_binding.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_membership_binding", - "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#delete_membership_binding", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GkeHub::V1::DeleteMembershipBindingRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "GkeHub::Client", - "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" - }, - "method": { - "short_name": "DeleteMembershipBinding", - "full_name": "google.cloud.gkehub.v1.GkeHub.DeleteMembershipBinding", - "service": { - "short_name": "GkeHub", - "full_name": "google.cloud.gkehub.v1.GkeHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "gkehub_v1_generated_GkeHub_ListMembershipBindings_sync", - "title": "Snippet for the list_membership_bindings call in the GkeHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#list_membership_bindings.", - "file": "gke_hub/list_membership_bindings.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_membership_bindings", - "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#list_membership_bindings", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GkeHub::V1::ListMembershipBindingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::GkeHub::V1::ListMembershipBindingsResponse", - "client": { - "short_name": "GkeHub::Client", - "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" - }, - "method": { - "short_name": "ListMembershipBindings", - "full_name": "google.cloud.gkehub.v1.GkeHub.ListMembershipBindings", - "service": { - "short_name": "GkeHub", - "full_name": "google.cloud.gkehub.v1.GkeHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "gkehub_v1_generated_GkeHub_GetMembershipRBACRoleBinding_sync", - "title": "Snippet for the get_membership_rbac_role_binding call in the GkeHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#get_membership_rbac_role_binding.", - "file": "gke_hub/get_membership_rbac_role_binding.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_membership_rbac_role_binding", - "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#get_membership_rbac_role_binding", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GkeHub::V1::GetMembershipRBACRoleBindingRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::GkeHub::V1::RBACRoleBinding", - "client": { - "short_name": "GkeHub::Client", - "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" - }, - "method": { - "short_name": "GetMembershipRBACRoleBinding", - "full_name": "google.cloud.gkehub.v1.GkeHub.GetMembershipRBACRoleBinding", - "service": { - "short_name": "GkeHub", - "full_name": "google.cloud.gkehub.v1.GkeHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "gkehub_v1_generated_GkeHub_CreateMembershipRBACRoleBinding_sync", - "title": "Snippet for the create_membership_rbac_role_binding call in the GkeHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#create_membership_rbac_role_binding.", - "file": "gke_hub/create_membership_rbac_role_binding.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_membership_rbac_role_binding", - "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#create_membership_rbac_role_binding", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GkeHub::V1::CreateMembershipRBACRoleBindingRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "GkeHub::Client", - "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" - }, - "method": { - "short_name": "CreateMembershipRBACRoleBinding", - "full_name": "google.cloud.gkehub.v1.GkeHub.CreateMembershipRBACRoleBinding", - "service": { - "short_name": "GkeHub", - "full_name": "google.cloud.gkehub.v1.GkeHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "gkehub_v1_generated_GkeHub_UpdateMembershipRBACRoleBinding_sync", - "title": "Snippet for the update_membership_rbac_role_binding call in the GkeHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#update_membership_rbac_role_binding.", - "file": "gke_hub/update_membership_rbac_role_binding.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_membership_rbac_role_binding", - "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#update_membership_rbac_role_binding", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GkeHub::V1::UpdateMembershipRBACRoleBindingRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "GkeHub::Client", - "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" - }, - "method": { - "short_name": "UpdateMembershipRBACRoleBinding", - "full_name": "google.cloud.gkehub.v1.GkeHub.UpdateMembershipRBACRoleBinding", - "service": { - "short_name": "GkeHub", - "full_name": "google.cloud.gkehub.v1.GkeHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "gkehub_v1_generated_GkeHub_DeleteMembershipRBACRoleBinding_sync", - "title": "Snippet for the delete_membership_rbac_role_binding call in the GkeHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#delete_membership_rbac_role_binding.", - "file": "gke_hub/delete_membership_rbac_role_binding.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_membership_rbac_role_binding", - "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#delete_membership_rbac_role_binding", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GkeHub::V1::DeleteMembershipRBACRoleBindingRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "GkeHub::Client", - "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" - }, - "method": { - "short_name": "DeleteMembershipRBACRoleBinding", - "full_name": "google.cloud.gkehub.v1.GkeHub.DeleteMembershipRBACRoleBinding", - "service": { - "short_name": "GkeHub", - "full_name": "google.cloud.gkehub.v1.GkeHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "gkehub_v1_generated_GkeHub_ListMembershipRBACRoleBindings_sync", - "title": "Snippet for the list_membership_rbac_role_bindings call in the GkeHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#list_membership_rbac_role_bindings.", - "file": "gke_hub/list_membership_rbac_role_bindings.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_membership_rbac_role_bindings", - "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#list_membership_rbac_role_bindings", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GkeHub::V1::ListMembershipRBACRoleBindingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::GkeHub::V1::ListMembershipRBACRoleBindingsResponse", - "client": { - "short_name": "GkeHub::Client", - "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" - }, - "method": { - "short_name": "ListMembershipRBACRoleBindings", - "full_name": "google.cloud.gkehub.v1.GkeHub.ListMembershipRBACRoleBindings", - "service": { - "short_name": "GkeHub", - "full_name": "google.cloud.gkehub.v1.GkeHub" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "gkehub_v1_generated_GkeHub_GenerateMembershipRBACRoleBindingYAML_sync", - "title": "Snippet for the generate_membership_rbac_role_binding_yaml call in the GkeHub service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeHub::V1::GkeHub::Client#generate_membership_rbac_role_binding_yaml.", - "file": "gke_hub/generate_membership_rbac_role_binding_yaml.rb", - "language": "RUBY", - "client_method": { - "short_name": "generate_membership_rbac_role_binding_yaml", - "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client#generate_membership_rbac_role_binding_yaml", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GkeHub::V1::GenerateMembershipRBACRoleBindingYAMLRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::GkeHub::V1::GenerateMembershipRBACRoleBindingYAMLResponse", - "client": { - "short_name": "GkeHub::Client", - "full_name": "::Google::Cloud::GkeHub::V1::GkeHub::Client" - }, - "method": { - "short_name": "GenerateMembershipRBACRoleBindingYAML", - "full_name": "google.cloud.gkehub.v1.GkeHub.GenerateMembershipRBACRoleBindingYAML", - "service": { - "short_name": "GkeHub", - "full_name": "google.cloud.gkehub.v1.GkeHub" - } - } - }, - "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-gke_hub-v1/test/google/cloud/gke_hub/v1/gke_hub_operations_test.rb b/owl-bot-staging/google-cloud-gke_hub-v1/test/google/cloud/gke_hub/v1/gke_hub_operations_test.rb deleted file mode 100644 index 7d3682da88a8..000000000000 --- a/owl-bot-staging/google-cloud-gke_hub-v1/test/google/cloud/gke_hub/v1/gke_hub_operations_test.rb +++ /dev/null @@ -1,400 +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/gkehub/v1/service_pb" -require "google/cloud/gkehub/v1/service_services_pb" -require "google/cloud/gke_hub/v1/gke_hub" - -class ::Google::Cloud::GkeHub::V1::GkeHub::OperationsTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_operations - # Create GRPC objects. - grpc_response = ::Google::Longrunning::ListOperationsResponse.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" - filter = "hello world" - page_size = 42 - page_token = "hello world" - return_partial_success = true - - list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_operations, name - assert_kind_of ::Google::Longrunning::ListOperationsRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal true, request["return_partial_success"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_operations_client_stub do - # Create client - client = ::Google::Cloud::GkeHub::V1::GkeHub::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) 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 - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, 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 - client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), 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_operations_client_stub.call_rpc_count - end - end - - def test_get_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.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_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_operation, name - assert_kind_of ::Google::Longrunning::GetOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_operation_client_stub do - # Create client - client = ::Google::Cloud::GkeHub::V1::GkeHub::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_operation({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_operation name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_operation({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_operation_client_stub.call_rpc_count - end - end - - def test_delete_operation - # 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_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_operation, name - assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_operation_client_stub do - # Create client - client = ::Google::Cloud::GkeHub::V1::GkeHub::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_operation(::Google::Longrunning::DeleteOperationRequest.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_operation_client_stub.call_rpc_count - end - end - - def test_cancel_operation - # 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" - - cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_operation, name - assert_kind_of ::Google::Longrunning::CancelOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_operation_client_stub do - # Create client - client = ::Google::Cloud::GkeHub::V1::GkeHub::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.cancel_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.cancel_operation(::Google::Longrunning::CancelOperationRequest.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, cancel_operation_client_stub.call_rpc_count - end - end - - def test_wait_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.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" - timeout = {} - - wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :wait_operation, name - assert_kind_of ::Google::Longrunning::WaitOperationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, wait_operation_client_stub do - # Create client - client = ::Google::Cloud::GkeHub::V1::GkeHub::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.wait_operation({ name: name, timeout: timeout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.wait_operation name: name, timeout: timeout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, wait_operation_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::GkeHub::V1::GkeHub::Operations.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::GkeHub::V1::GkeHub::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/test/google/cloud/gke_hub/v1/gke_hub_paths_test.rb b/owl-bot-staging/google-cloud-gke_hub-v1/test/google/cloud/gke_hub/v1/gke_hub_paths_test.rb deleted file mode 100644 index 282a2b7080cf..000000000000 --- a/owl-bot-staging/google-cloud-gke_hub-v1/test/google/cloud/gke_hub/v1/gke_hub_paths_test.rb +++ /dev/null @@ -1,145 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/gke_hub/v1/gke_hub" - -class ::Google::Cloud::GkeHub::V1::GkeHub::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_feature_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.feature_path project: "value0", location: "value1", feature: "value2" - assert_equal "projects/value0/locations/value1/features/value2", path - end - end - - def test_fleet_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.fleet_path project: "value0", location: "value1", fleet: "value2" - assert_equal "projects/value0/locations/value1/fleets/value2", path - - path = client.fleet_path organization: "value0", location: "value1", fleet: "value2" - assert_equal "organizations/value0/locations/value1/fleets/value2", path - end - end - - def test_location_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.location_path project: "value0", location: "value1" - assert_equal "projects/value0/locations/value1", path - end - end - - def test_membership_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.membership_path project: "value0", location: "value1", membership: "value2" - assert_equal "projects/value0/locations/value1/memberships/value2", path - end - end - - def test_membership_binding_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.membership_binding_path project: "value0", location: "value1", membership: "value2", membershipbinding: "value3" - assert_equal "projects/value0/locations/value1/memberships/value2/bindings/value3", path - end - end - - def test_namespace_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.namespace_path project: "value0", location: "value1", scope: "value2", namespace: "value3" - assert_equal "projects/value0/locations/value1/scopes/value2/namespaces/value3", path - end - end - - def test_rbac_role_binding_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.rbac_role_binding_path project: "value0", location: "value1", scope: "value2", rbacrolebinding: "value3" - assert_equal "projects/value0/locations/value1/scopes/value2/rbacrolebindings/value3", path - - path = client.rbac_role_binding_path project: "value0", location: "value1", membership: "value2", rbacrolebinding: "value3" - assert_equal "projects/value0/locations/value1/memberships/value2/rbacrolebindings/value3", path - end - end - - def test_scope_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.scope_path project: "value0", location: "value1", scope: "value2" - assert_equal "projects/value0/locations/value1/scopes/value2", path - end - end -end diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/test/google/cloud/gke_hub/v1/gke_hub_rest_test.rb b/owl-bot-staging/google-cloud-gke_hub-v1/test/google/cloud/gke_hub/v1/gke_hub_rest_test.rb deleted file mode 100644 index 0c529b1fe0bf..000000000000 --- a/owl-bot-staging/google-cloud-gke_hub-v1/test/google/cloud/gke_hub/v1/gke_hub_rest_test.rb +++ /dev/null @@ -1,2544 +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/gkehub/v1/service_pb" -require "google/cloud/gke_hub/v1/gke_hub/rest" - - -class ::Google::Cloud::GkeHub::V1::GkeHub::Rest::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_count, :requests - - def initialize response, &block - @response = response - @block = block - @call_count = 0 - @requests = [] - end - - def make_get_request uri:, params: {}, options: {}, method_name: nil - make_http_request :get, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_delete_request uri:, params: {}, options: {}, method_name: nil - make_http_request :delete, uri: uri, body: nil, params: params, options: options, method_name: method_name - end - - def make_post_request uri:, body: nil, params: {}, options: {}, method_name: nil - make_http_request :post, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_patch_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :patch, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_put_request uri:, body:, params: {}, options: {}, method_name: nil - make_http_request :put, uri: uri, body: body, params: params, options: options, method_name: method_name - end - - def make_http_request *args, **kwargs - @call_count += 1 - - @requests << @block&.call(*args, **kwargs) - - @response - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_memberships - # Create test objects. - client_result = ::Google::Cloud::GkeHub::V1::ListMembershipsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_memberships_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_list_memberships_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_memberships_client_stub do - # Create client - client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_memberships({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_memberships parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_memberships ::Google::Cloud::GkeHub::V1::ListMembershipsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_memberships({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_memberships(::Google::Cloud::GkeHub::V1::ListMembershipsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_memberships_client_stub.call_count - end - end - end - - def test_list_bound_memberships - # Create test objects. - client_result = ::Google::Cloud::GkeHub::V1::ListBoundMembershipsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - scope_name = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - - list_bound_memberships_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_list_bound_memberships_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_bound_memberships_client_stub do - # Create client - client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_bound_memberships({ scope_name: scope_name, filter: filter, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_bound_memberships scope_name: scope_name, filter: filter, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_bound_memberships ::Google::Cloud::GkeHub::V1::ListBoundMembershipsRequest.new(scope_name: scope_name, filter: filter, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_bound_memberships({ scope_name: scope_name, filter: filter, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_bound_memberships(::Google::Cloud::GkeHub::V1::ListBoundMembershipsRequest.new(scope_name: scope_name, filter: filter, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_bound_memberships_client_stub.call_count - end - end - end - - def test_list_features - # Create test objects. - client_result = ::Google::Cloud::GkeHub::V1::ListFeaturesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - return_partial_success = true - - list_features_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_list_features_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_features_client_stub do - # Create client - client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_features({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, return_partial_success: return_partial_success }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_features parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, return_partial_success: return_partial_success do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_features ::Google::Cloud::GkeHub::V1::ListFeaturesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, return_partial_success: return_partial_success) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_features({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, return_partial_success: return_partial_success }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_features(::Google::Cloud::GkeHub::V1::ListFeaturesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, return_partial_success: return_partial_success), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_features_client_stub.call_count - end - end - end - - def test_get_membership - # Create test objects. - client_result = ::Google::Cloud::GkeHub::V1::Membership.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_membership_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_get_membership_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_membership_client_stub do - # Create client - client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_membership({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_membership name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_membership ::Google::Cloud::GkeHub::V1::GetMembershipRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_membership({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_membership(::Google::Cloud::GkeHub::V1::GetMembershipRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_membership_client_stub.call_count - end - end - end - - def test_get_feature - # Create test objects. - client_result = ::Google::Cloud::GkeHub::V1::Feature.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - return_partial_success = true - - get_feature_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_get_feature_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_feature_client_stub do - # Create client - client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_feature({ name: name, return_partial_success: return_partial_success }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_feature name: name, return_partial_success: return_partial_success do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_feature ::Google::Cloud::GkeHub::V1::GetFeatureRequest.new(name: name, return_partial_success: return_partial_success) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_feature({ name: name, return_partial_success: return_partial_success }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_feature(::Google::Cloud::GkeHub::V1::GetFeatureRequest.new(name: name, return_partial_success: return_partial_success), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_feature_client_stub.call_count - end - end - end - - def test_create_membership - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - membership_id = "hello world" - resource = {} - request_id = "hello world" - - create_membership_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_create_membership_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_membership_client_stub do - # Create client - client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_membership({ parent: parent, membership_id: membership_id, resource: resource, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_membership parent: parent, membership_id: membership_id, resource: resource, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_membership ::Google::Cloud::GkeHub::V1::CreateMembershipRequest.new(parent: parent, membership_id: membership_id, resource: resource, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_membership({ parent: parent, membership_id: membership_id, resource: resource, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_membership(::Google::Cloud::GkeHub::V1::CreateMembershipRequest.new(parent: parent, membership_id: membership_id, resource: resource, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_membership_client_stub.call_count - end - end - end - - def test_create_feature - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - feature_id = "hello world" - resource = {} - request_id = "hello world" - - create_feature_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_create_feature_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_feature_client_stub do - # Create client - client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_feature({ parent: parent, feature_id: feature_id, resource: resource, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_feature parent: parent, feature_id: feature_id, resource: resource, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_feature ::Google::Cloud::GkeHub::V1::CreateFeatureRequest.new(parent: parent, feature_id: feature_id, resource: resource, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_feature({ parent: parent, feature_id: feature_id, resource: resource, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_feature(::Google::Cloud::GkeHub::V1::CreateFeatureRequest.new(parent: parent, feature_id: feature_id, resource: resource, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_feature_client_stub.call_count - end - end - end - - def test_delete_membership - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - force = true - - delete_membership_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_delete_membership_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_membership_client_stub do - # Create client - client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_membership({ name: name, request_id: request_id, force: force }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_membership name: name, request_id: request_id, force: force do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_membership ::Google::Cloud::GkeHub::V1::DeleteMembershipRequest.new(name: name, request_id: request_id, force: force) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_membership({ name: name, request_id: request_id, force: force }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_membership(::Google::Cloud::GkeHub::V1::DeleteMembershipRequest.new(name: name, request_id: request_id, force: force), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_membership_client_stub.call_count - end - end - end - - def test_delete_feature - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - force = true - request_id = "hello world" - - delete_feature_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_delete_feature_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_feature_client_stub do - # Create client - client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_feature({ name: name, force: force, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_feature name: name, force: force, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_feature ::Google::Cloud::GkeHub::V1::DeleteFeatureRequest.new(name: name, force: force, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_feature({ name: name, force: force, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_feature(::Google::Cloud::GkeHub::V1::DeleteFeatureRequest.new(name: name, force: force, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_feature_client_stub.call_count - end - end - end - - def test_update_membership - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - update_mask = {} - resource = {} - request_id = "hello world" - - update_membership_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_update_membership_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_membership_client_stub do - # Create client - client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_membership({ name: name, update_mask: update_mask, resource: resource, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_membership name: name, update_mask: update_mask, resource: resource, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_membership ::Google::Cloud::GkeHub::V1::UpdateMembershipRequest.new(name: name, update_mask: update_mask, resource: resource, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_membership({ name: name, update_mask: update_mask, resource: resource, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_membership(::Google::Cloud::GkeHub::V1::UpdateMembershipRequest.new(name: name, update_mask: update_mask, resource: resource, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_membership_client_stub.call_count - end - end - end - - def test_update_feature - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - update_mask = {} - resource = {} - request_id = "hello world" - - update_feature_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_update_feature_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_feature_client_stub do - # Create client - client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_feature({ name: name, update_mask: update_mask, resource: resource, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_feature name: name, update_mask: update_mask, resource: resource, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_feature ::Google::Cloud::GkeHub::V1::UpdateFeatureRequest.new(name: name, update_mask: update_mask, resource: resource, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_feature({ name: name, update_mask: update_mask, resource: resource, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_feature(::Google::Cloud::GkeHub::V1::UpdateFeatureRequest.new(name: name, update_mask: update_mask, resource: resource, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_feature_client_stub.call_count - end - end - end - - def test_generate_connect_manifest - # Create test objects. - client_result = ::Google::Cloud::GkeHub::V1::GenerateConnectManifestResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - namespace = "hello world" - proxy = "hello world" - version = "hello world" - is_upgrade = true - registry = "hello world" - image_pull_secret_content = "hello world" - - generate_connect_manifest_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_generate_connect_manifest_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, generate_connect_manifest_client_stub do - # Create client - client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.generate_connect_manifest({ name: name, namespace: namespace, proxy: proxy, version: version, is_upgrade: is_upgrade, registry: registry, image_pull_secret_content: image_pull_secret_content }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.generate_connect_manifest name: name, namespace: namespace, proxy: proxy, version: version, is_upgrade: is_upgrade, registry: registry, image_pull_secret_content: image_pull_secret_content do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.generate_connect_manifest ::Google::Cloud::GkeHub::V1::GenerateConnectManifestRequest.new(name: name, namespace: namespace, proxy: proxy, version: version, is_upgrade: is_upgrade, registry: registry, image_pull_secret_content: image_pull_secret_content) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.generate_connect_manifest({ name: name, namespace: namespace, proxy: proxy, version: version, is_upgrade: is_upgrade, registry: registry, image_pull_secret_content: image_pull_secret_content }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.generate_connect_manifest(::Google::Cloud::GkeHub::V1::GenerateConnectManifestRequest.new(name: name, namespace: namespace, proxy: proxy, version: version, is_upgrade: is_upgrade, registry: registry, image_pull_secret_content: image_pull_secret_content), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, generate_connect_manifest_client_stub.call_count - end - end - end - - def test_create_fleet - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - fleet = {} - - create_fleet_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_create_fleet_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_fleet_client_stub do - # Create client - client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_fleet({ parent: parent, fleet: fleet }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_fleet parent: parent, fleet: fleet do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_fleet ::Google::Cloud::GkeHub::V1::CreateFleetRequest.new(parent: parent, fleet: fleet) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_fleet({ parent: parent, fleet: fleet }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_fleet(::Google::Cloud::GkeHub::V1::CreateFleetRequest.new(parent: parent, fleet: fleet), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_fleet_client_stub.call_count - end - end - end - - def test_get_fleet - # Create test objects. - client_result = ::Google::Cloud::GkeHub::V1::Fleet.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_fleet_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_get_fleet_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_fleet_client_stub do - # Create client - client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_fleet({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_fleet name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_fleet ::Google::Cloud::GkeHub::V1::GetFleetRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_fleet({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_fleet(::Google::Cloud::GkeHub::V1::GetFleetRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_fleet_client_stub.call_count - end - end - end - - def test_update_fleet - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - fleet = {} - update_mask = {} - - update_fleet_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_update_fleet_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_fleet_client_stub do - # Create client - client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_fleet({ fleet: fleet, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_fleet fleet: fleet, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_fleet ::Google::Cloud::GkeHub::V1::UpdateFleetRequest.new(fleet: fleet, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_fleet({ fleet: fleet, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_fleet(::Google::Cloud::GkeHub::V1::UpdateFleetRequest.new(fleet: fleet, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_fleet_client_stub.call_count - end - end - end - - def test_delete_fleet - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_fleet_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_delete_fleet_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_fleet_client_stub do - # Create client - client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_fleet({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_fleet name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_fleet ::Google::Cloud::GkeHub::V1::DeleteFleetRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_fleet({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_fleet(::Google::Cloud::GkeHub::V1::DeleteFleetRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_fleet_client_stub.call_count - end - end - end - - def test_list_fleets - # Create test objects. - client_result = ::Google::Cloud::GkeHub::V1::ListFleetsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_token = "hello world" - page_size = 42 - - list_fleets_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_list_fleets_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_fleets_client_stub do - # Create client - client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_fleets({ parent: parent, page_token: page_token, page_size: page_size }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_fleets parent: parent, page_token: page_token, page_size: page_size do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_fleets ::Google::Cloud::GkeHub::V1::ListFleetsRequest.new(parent: parent, page_token: page_token, page_size: page_size) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_fleets({ parent: parent, page_token: page_token, page_size: page_size }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_fleets(::Google::Cloud::GkeHub::V1::ListFleetsRequest.new(parent: parent, page_token: page_token, page_size: page_size), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_fleets_client_stub.call_count - end - end - end - - def test_get_scope_namespace - # Create test objects. - client_result = ::Google::Cloud::GkeHub::V1::Namespace.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_scope_namespace_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_get_scope_namespace_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_scope_namespace_client_stub do - # Create client - client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_scope_namespace({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_scope_namespace name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_scope_namespace ::Google::Cloud::GkeHub::V1::GetScopeNamespaceRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_scope_namespace({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_scope_namespace(::Google::Cloud::GkeHub::V1::GetScopeNamespaceRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_scope_namespace_client_stub.call_count - end - end - end - - def test_create_scope_namespace - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - scope_namespace_id = "hello world" - scope_namespace = {} - - create_scope_namespace_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_create_scope_namespace_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_scope_namespace_client_stub do - # Create client - client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_scope_namespace({ parent: parent, scope_namespace_id: scope_namespace_id, scope_namespace: scope_namespace }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_scope_namespace parent: parent, scope_namespace_id: scope_namespace_id, scope_namespace: scope_namespace do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_scope_namespace ::Google::Cloud::GkeHub::V1::CreateScopeNamespaceRequest.new(parent: parent, scope_namespace_id: scope_namespace_id, scope_namespace: scope_namespace) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_scope_namespace({ parent: parent, scope_namespace_id: scope_namespace_id, scope_namespace: scope_namespace }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_scope_namespace(::Google::Cloud::GkeHub::V1::CreateScopeNamespaceRequest.new(parent: parent, scope_namespace_id: scope_namespace_id, scope_namespace: scope_namespace), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_scope_namespace_client_stub.call_count - end - end - end - - def test_update_scope_namespace - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - scope_namespace = {} - update_mask = {} - - update_scope_namespace_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_update_scope_namespace_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_scope_namespace_client_stub do - # Create client - client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_scope_namespace({ scope_namespace: scope_namespace, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_scope_namespace scope_namespace: scope_namespace, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_scope_namespace ::Google::Cloud::GkeHub::V1::UpdateScopeNamespaceRequest.new(scope_namespace: scope_namespace, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_scope_namespace({ scope_namespace: scope_namespace, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_scope_namespace(::Google::Cloud::GkeHub::V1::UpdateScopeNamespaceRequest.new(scope_namespace: scope_namespace, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_scope_namespace_client_stub.call_count - end - end - end - - def test_delete_scope_namespace - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_scope_namespace_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_delete_scope_namespace_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_scope_namespace_client_stub do - # Create client - client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_scope_namespace({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_scope_namespace name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_scope_namespace ::Google::Cloud::GkeHub::V1::DeleteScopeNamespaceRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_scope_namespace({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_scope_namespace(::Google::Cloud::GkeHub::V1::DeleteScopeNamespaceRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_scope_namespace_client_stub.call_count - end - end - end - - def test_list_scope_namespaces - # Create test objects. - client_result = ::Google::Cloud::GkeHub::V1::ListScopeNamespacesResponse.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_scope_namespaces_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_list_scope_namespaces_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_scope_namespaces_client_stub do - # Create client - client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_scope_namespaces({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_scope_namespaces parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_scope_namespaces ::Google::Cloud::GkeHub::V1::ListScopeNamespacesRequest.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 - client.list_scope_namespaces({ 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 - client.list_scope_namespaces(::Google::Cloud::GkeHub::V1::ListScopeNamespacesRequest.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_scope_namespaces_client_stub.call_count - end - end - end - - def test_get_scope_rbac_role_binding - # Create test objects. - client_result = ::Google::Cloud::GkeHub::V1::RBACRoleBinding.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_scope_rbac_role_binding_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_get_scope_rbac_role_binding_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_scope_rbac_role_binding_client_stub do - # Create client - client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_scope_rbac_role_binding({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_scope_rbac_role_binding name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_scope_rbac_role_binding ::Google::Cloud::GkeHub::V1::GetScopeRBACRoleBindingRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_scope_rbac_role_binding({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_scope_rbac_role_binding(::Google::Cloud::GkeHub::V1::GetScopeRBACRoleBindingRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_scope_rbac_role_binding_client_stub.call_count - end - end - end - - def test_create_scope_rbac_role_binding - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - rbacrolebinding_id = "hello world" - rbacrolebinding = {} - - create_scope_rbac_role_binding_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_create_scope_rbac_role_binding_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_scope_rbac_role_binding_client_stub do - # Create client - client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_scope_rbac_role_binding({ parent: parent, rbacrolebinding_id: rbacrolebinding_id, rbacrolebinding: rbacrolebinding }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_scope_rbac_role_binding parent: parent, rbacrolebinding_id: rbacrolebinding_id, rbacrolebinding: rbacrolebinding do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_scope_rbac_role_binding ::Google::Cloud::GkeHub::V1::CreateScopeRBACRoleBindingRequest.new(parent: parent, rbacrolebinding_id: rbacrolebinding_id, rbacrolebinding: rbacrolebinding) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_scope_rbac_role_binding({ parent: parent, rbacrolebinding_id: rbacrolebinding_id, rbacrolebinding: rbacrolebinding }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_scope_rbac_role_binding(::Google::Cloud::GkeHub::V1::CreateScopeRBACRoleBindingRequest.new(parent: parent, rbacrolebinding_id: rbacrolebinding_id, rbacrolebinding: rbacrolebinding), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_scope_rbac_role_binding_client_stub.call_count - end - end - end - - def test_update_scope_rbac_role_binding - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - rbacrolebinding = {} - update_mask = {} - - update_scope_rbac_role_binding_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_update_scope_rbac_role_binding_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_scope_rbac_role_binding_client_stub do - # Create client - client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_scope_rbac_role_binding({ rbacrolebinding: rbacrolebinding, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_scope_rbac_role_binding rbacrolebinding: rbacrolebinding, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_scope_rbac_role_binding ::Google::Cloud::GkeHub::V1::UpdateScopeRBACRoleBindingRequest.new(rbacrolebinding: rbacrolebinding, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_scope_rbac_role_binding({ rbacrolebinding: rbacrolebinding, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_scope_rbac_role_binding(::Google::Cloud::GkeHub::V1::UpdateScopeRBACRoleBindingRequest.new(rbacrolebinding: rbacrolebinding, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_scope_rbac_role_binding_client_stub.call_count - end - end - end - - def test_delete_scope_rbac_role_binding - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_scope_rbac_role_binding_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_delete_scope_rbac_role_binding_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_scope_rbac_role_binding_client_stub do - # Create client - client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_scope_rbac_role_binding({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_scope_rbac_role_binding name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_scope_rbac_role_binding ::Google::Cloud::GkeHub::V1::DeleteScopeRBACRoleBindingRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_scope_rbac_role_binding({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_scope_rbac_role_binding(::Google::Cloud::GkeHub::V1::DeleteScopeRBACRoleBindingRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_scope_rbac_role_binding_client_stub.call_count - end - end - end - - def test_list_scope_rbac_role_bindings - # Create test objects. - client_result = ::Google::Cloud::GkeHub::V1::ListScopeRBACRoleBindingsResponse.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_scope_rbac_role_bindings_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_list_scope_rbac_role_bindings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_scope_rbac_role_bindings_client_stub do - # Create client - client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_scope_rbac_role_bindings({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_scope_rbac_role_bindings parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_scope_rbac_role_bindings ::Google::Cloud::GkeHub::V1::ListScopeRBACRoleBindingsRequest.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 - client.list_scope_rbac_role_bindings({ 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 - client.list_scope_rbac_role_bindings(::Google::Cloud::GkeHub::V1::ListScopeRBACRoleBindingsRequest.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_scope_rbac_role_bindings_client_stub.call_count - end - end - end - - def test_get_scope - # Create test objects. - client_result = ::Google::Cloud::GkeHub::V1::Scope.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_scope_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_get_scope_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_scope_client_stub do - # Create client - client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_scope({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_scope name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_scope ::Google::Cloud::GkeHub::V1::GetScopeRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_scope({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_scope(::Google::Cloud::GkeHub::V1::GetScopeRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_scope_client_stub.call_count - end - end - end - - def test_create_scope - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - scope_id = "hello world" - scope = {} - - create_scope_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_create_scope_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_scope_client_stub do - # Create client - client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_scope({ parent: parent, scope_id: scope_id, scope: scope }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_scope parent: parent, scope_id: scope_id, scope: scope do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_scope ::Google::Cloud::GkeHub::V1::CreateScopeRequest.new(parent: parent, scope_id: scope_id, scope: scope) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_scope({ parent: parent, scope_id: scope_id, scope: scope }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_scope(::Google::Cloud::GkeHub::V1::CreateScopeRequest.new(parent: parent, scope_id: scope_id, scope: scope), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_scope_client_stub.call_count - end - end - end - - def test_update_scope - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - scope = {} - update_mask = {} - - update_scope_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_update_scope_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_scope_client_stub do - # Create client - client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_scope({ scope: scope, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_scope scope: scope, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_scope ::Google::Cloud::GkeHub::V1::UpdateScopeRequest.new(scope: scope, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_scope({ scope: scope, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_scope(::Google::Cloud::GkeHub::V1::UpdateScopeRequest.new(scope: scope, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_scope_client_stub.call_count - end - end - end - - def test_delete_scope - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_scope_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_delete_scope_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_scope_client_stub do - # Create client - client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_scope({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_scope name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_scope ::Google::Cloud::GkeHub::V1::DeleteScopeRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_scope({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_scope(::Google::Cloud::GkeHub::V1::DeleteScopeRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_scope_client_stub.call_count - end - end - end - - def test_list_scopes - # Create test objects. - client_result = ::Google::Cloud::GkeHub::V1::ListScopesResponse.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_scopes_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_list_scopes_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_scopes_client_stub do - # Create client - client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_scopes({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_scopes parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_scopes ::Google::Cloud::GkeHub::V1::ListScopesRequest.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 - client.list_scopes({ 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 - client.list_scopes(::Google::Cloud::GkeHub::V1::ListScopesRequest.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_scopes_client_stub.call_count - end - end - end - - def test_list_permitted_scopes - # Create test objects. - client_result = ::Google::Cloud::GkeHub::V1::ListPermittedScopesResponse.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_permitted_scopes_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_list_permitted_scopes_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_permitted_scopes_client_stub do - # Create client - client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_permitted_scopes({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_permitted_scopes parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_permitted_scopes ::Google::Cloud::GkeHub::V1::ListPermittedScopesRequest.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 - client.list_permitted_scopes({ 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 - client.list_permitted_scopes(::Google::Cloud::GkeHub::V1::ListPermittedScopesRequest.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_permitted_scopes_client_stub.call_count - end - end - end - - def test_get_membership_binding - # Create test objects. - client_result = ::Google::Cloud::GkeHub::V1::MembershipBinding.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_membership_binding_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_get_membership_binding_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_membership_binding_client_stub do - # Create client - client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_membership_binding({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_membership_binding name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_membership_binding ::Google::Cloud::GkeHub::V1::GetMembershipBindingRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_membership_binding({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_membership_binding(::Google::Cloud::GkeHub::V1::GetMembershipBindingRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_membership_binding_client_stub.call_count - end - end - end - - def test_create_membership_binding - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - membership_binding = {} - membership_binding_id = "hello world" - - create_membership_binding_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_create_membership_binding_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_membership_binding_client_stub do - # Create client - client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_membership_binding({ parent: parent, membership_binding: membership_binding, membership_binding_id: membership_binding_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_membership_binding parent: parent, membership_binding: membership_binding, membership_binding_id: membership_binding_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_membership_binding ::Google::Cloud::GkeHub::V1::CreateMembershipBindingRequest.new(parent: parent, membership_binding: membership_binding, membership_binding_id: membership_binding_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_membership_binding({ parent: parent, membership_binding: membership_binding, membership_binding_id: membership_binding_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_membership_binding(::Google::Cloud::GkeHub::V1::CreateMembershipBindingRequest.new(parent: parent, membership_binding: membership_binding, membership_binding_id: membership_binding_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_membership_binding_client_stub.call_count - end - end - end - - def test_update_membership_binding - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - membership_binding = {} - update_mask = {} - - update_membership_binding_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_update_membership_binding_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_membership_binding_client_stub do - # Create client - client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_membership_binding({ membership_binding: membership_binding, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_membership_binding membership_binding: membership_binding, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_membership_binding ::Google::Cloud::GkeHub::V1::UpdateMembershipBindingRequest.new(membership_binding: membership_binding, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_membership_binding({ membership_binding: membership_binding, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_membership_binding(::Google::Cloud::GkeHub::V1::UpdateMembershipBindingRequest.new(membership_binding: membership_binding, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_membership_binding_client_stub.call_count - end - end - end - - def test_delete_membership_binding - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_membership_binding_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_delete_membership_binding_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_membership_binding_client_stub do - # Create client - client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_membership_binding({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_membership_binding name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_membership_binding ::Google::Cloud::GkeHub::V1::DeleteMembershipBindingRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_membership_binding({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_membership_binding(::Google::Cloud::GkeHub::V1::DeleteMembershipBindingRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_membership_binding_client_stub.call_count - end - end - end - - def test_list_membership_bindings - # Create test objects. - client_result = ::Google::Cloud::GkeHub::V1::ListMembershipBindingsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_membership_bindings_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_list_membership_bindings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_membership_bindings_client_stub do - # Create client - client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_membership_bindings({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_membership_bindings parent: parent, page_size: page_size, page_token: page_token, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_membership_bindings ::Google::Cloud::GkeHub::V1::ListMembershipBindingsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_membership_bindings({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_membership_bindings(::Google::Cloud::GkeHub::V1::ListMembershipBindingsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_membership_bindings_client_stub.call_count - end - end - end - - def test_get_membership_rbac_role_binding - # Create test objects. - client_result = ::Google::Cloud::GkeHub::V1::RBACRoleBinding.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_membership_rbac_role_binding_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_get_membership_rbac_role_binding_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_membership_rbac_role_binding_client_stub do - # Create client - client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_membership_rbac_role_binding({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_membership_rbac_role_binding name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_membership_rbac_role_binding ::Google::Cloud::GkeHub::V1::GetMembershipRBACRoleBindingRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_membership_rbac_role_binding({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_membership_rbac_role_binding(::Google::Cloud::GkeHub::V1::GetMembershipRBACRoleBindingRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_membership_rbac_role_binding_client_stub.call_count - end - end - end - - def test_create_membership_rbac_role_binding - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - rbacrolebinding_id = "hello world" - rbacrolebinding = {} - - create_membership_rbac_role_binding_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_create_membership_rbac_role_binding_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_membership_rbac_role_binding_client_stub do - # Create client - client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_membership_rbac_role_binding({ parent: parent, rbacrolebinding_id: rbacrolebinding_id, rbacrolebinding: rbacrolebinding }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_membership_rbac_role_binding parent: parent, rbacrolebinding_id: rbacrolebinding_id, rbacrolebinding: rbacrolebinding do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_membership_rbac_role_binding ::Google::Cloud::GkeHub::V1::CreateMembershipRBACRoleBindingRequest.new(parent: parent, rbacrolebinding_id: rbacrolebinding_id, rbacrolebinding: rbacrolebinding) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_membership_rbac_role_binding({ parent: parent, rbacrolebinding_id: rbacrolebinding_id, rbacrolebinding: rbacrolebinding }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_membership_rbac_role_binding(::Google::Cloud::GkeHub::V1::CreateMembershipRBACRoleBindingRequest.new(parent: parent, rbacrolebinding_id: rbacrolebinding_id, rbacrolebinding: rbacrolebinding), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_membership_rbac_role_binding_client_stub.call_count - end - end - end - - def test_update_membership_rbac_role_binding - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - rbacrolebinding = {} - update_mask = {} - - update_membership_rbac_role_binding_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_update_membership_rbac_role_binding_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_membership_rbac_role_binding_client_stub do - # Create client - client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_membership_rbac_role_binding({ rbacrolebinding: rbacrolebinding, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_membership_rbac_role_binding rbacrolebinding: rbacrolebinding, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_membership_rbac_role_binding ::Google::Cloud::GkeHub::V1::UpdateMembershipRBACRoleBindingRequest.new(rbacrolebinding: rbacrolebinding, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_membership_rbac_role_binding({ rbacrolebinding: rbacrolebinding, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_membership_rbac_role_binding(::Google::Cloud::GkeHub::V1::UpdateMembershipRBACRoleBindingRequest.new(rbacrolebinding: rbacrolebinding, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_membership_rbac_role_binding_client_stub.call_count - end - end - end - - def test_delete_membership_rbac_role_binding - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_membership_rbac_role_binding_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_delete_membership_rbac_role_binding_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_membership_rbac_role_binding_client_stub do - # Create client - client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_membership_rbac_role_binding({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_membership_rbac_role_binding name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_membership_rbac_role_binding ::Google::Cloud::GkeHub::V1::DeleteMembershipRBACRoleBindingRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_membership_rbac_role_binding({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_membership_rbac_role_binding(::Google::Cloud::GkeHub::V1::DeleteMembershipRBACRoleBindingRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_membership_rbac_role_binding_client_stub.call_count - end - end - end - - def test_list_membership_rbac_role_bindings - # Create test objects. - client_result = ::Google::Cloud::GkeHub::V1::ListMembershipRBACRoleBindingsResponse.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_membership_rbac_role_bindings_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_list_membership_rbac_role_bindings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_membership_rbac_role_bindings_client_stub do - # Create client - client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_membership_rbac_role_bindings({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_membership_rbac_role_bindings parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_membership_rbac_role_bindings ::Google::Cloud::GkeHub::V1::ListMembershipRBACRoleBindingsRequest.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 - client.list_membership_rbac_role_bindings({ 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 - client.list_membership_rbac_role_bindings(::Google::Cloud::GkeHub::V1::ListMembershipRBACRoleBindingsRequest.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_membership_rbac_role_bindings_client_stub.call_count - end - end - end - - def test_generate_membership_rbac_role_binding_yaml - # Create test objects. - client_result = ::Google::Cloud::GkeHub::V1::GenerateMembershipRBACRoleBindingYAMLResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - rbacrolebinding_id = "hello world" - rbacrolebinding = {} - - generate_membership_rbac_role_binding_yaml_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::GkeHub::V1::GkeHub::Rest::ServiceStub.stub :transcode_generate_membership_rbac_role_binding_yaml_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, generate_membership_rbac_role_binding_yaml_client_stub do - # Create client - client = ::Google::Cloud::GkeHub::V1::GkeHub::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.generate_membership_rbac_role_binding_yaml({ parent: parent, rbacrolebinding_id: rbacrolebinding_id, rbacrolebinding: rbacrolebinding }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.generate_membership_rbac_role_binding_yaml parent: parent, rbacrolebinding_id: rbacrolebinding_id, rbacrolebinding: rbacrolebinding do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.generate_membership_rbac_role_binding_yaml ::Google::Cloud::GkeHub::V1::GenerateMembershipRBACRoleBindingYAMLRequest.new(parent: parent, rbacrolebinding_id: rbacrolebinding_id, rbacrolebinding: rbacrolebinding) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.generate_membership_rbac_role_binding_yaml({ parent: parent, rbacrolebinding_id: rbacrolebinding_id, rbacrolebinding: rbacrolebinding }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.generate_membership_rbac_role_binding_yaml(::Google::Cloud::GkeHub::V1::GenerateMembershipRBACRoleBindingYAMLRequest.new(parent: parent, rbacrolebinding_id: rbacrolebinding_id, rbacrolebinding: rbacrolebinding), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, generate_membership_rbac_role_binding_yaml_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::GkeHub::V1::GkeHub::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::GkeHub::V1::GkeHub::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/test/google/cloud/gke_hub/v1/gke_hub_test.rb b/owl-bot-staging/google-cloud-gke_hub-v1/test/google/cloud/gke_hub/v1/gke_hub_test.rb deleted file mode 100644 index d30531394ca9..000000000000 --- a/owl-bot-staging/google-cloud-gke_hub-v1/test/google/cloud/gke_hub/v1/gke_hub_test.rb +++ /dev/null @@ -1,2978 +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/gkehub/v1/service_pb" -require "google/cloud/gke_hub/v1/gke_hub" - -class ::Google::Cloud::GkeHub::V1::GkeHub::ClientTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_memberships - # Create GRPC objects. - grpc_response = ::Google::Cloud::GkeHub::V1::ListMembershipsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - - list_memberships_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_memberships, name - assert_kind_of ::Google::Cloud::GkeHub::V1::ListMembershipsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_memberships_client_stub do - # Create client - client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_memberships({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_memberships parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_memberships ::Google::Cloud::GkeHub::V1::ListMembershipsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_memberships({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_memberships(::Google::Cloud::GkeHub::V1::ListMembershipsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_memberships_client_stub.call_rpc_count - end - end - - def test_list_bound_memberships - # Create GRPC objects. - grpc_response = ::Google::Cloud::GkeHub::V1::ListBoundMembershipsResponse.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. - scope_name = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - - list_bound_memberships_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_bound_memberships, name - assert_kind_of ::Google::Cloud::GkeHub::V1::ListBoundMembershipsRequest, request - assert_equal "hello world", request["scope_name"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_bound_memberships_client_stub do - # Create client - client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_bound_memberships({ scope_name: scope_name, filter: filter, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_bound_memberships scope_name: scope_name, filter: filter, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_bound_memberships ::Google::Cloud::GkeHub::V1::ListBoundMembershipsRequest.new(scope_name: scope_name, filter: filter, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_bound_memberships({ scope_name: scope_name, filter: filter, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_bound_memberships(::Google::Cloud::GkeHub::V1::ListBoundMembershipsRequest.new(scope_name: scope_name, filter: filter, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_bound_memberships_client_stub.call_rpc_count - end - end - - def test_list_features - # Create GRPC objects. - grpc_response = ::Google::Cloud::GkeHub::V1::ListFeaturesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - order_by = "hello world" - return_partial_success = true - - list_features_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_features, name - assert_kind_of ::Google::Cloud::GkeHub::V1::ListFeaturesRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - assert_equal true, request["return_partial_success"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_features_client_stub do - # Create client - client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_features({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, return_partial_success: return_partial_success }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_features parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, return_partial_success: return_partial_success do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_features ::Google::Cloud::GkeHub::V1::ListFeaturesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, return_partial_success: return_partial_success) 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 - client.list_features({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, return_partial_success: return_partial_success }, 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 - client.list_features(::Google::Cloud::GkeHub::V1::ListFeaturesRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, return_partial_success: return_partial_success), 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_features_client_stub.call_rpc_count - end - end - - def test_get_membership - # Create GRPC objects. - grpc_response = ::Google::Cloud::GkeHub::V1::Membership.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_membership_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_membership, name - assert_kind_of ::Google::Cloud::GkeHub::V1::GetMembershipRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_membership_client_stub do - # Create client - client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_membership({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_membership name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_membership ::Google::Cloud::GkeHub::V1::GetMembershipRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_membership({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_membership(::Google::Cloud::GkeHub::V1::GetMembershipRequest.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_membership_client_stub.call_rpc_count - end - end - - def test_get_feature - # Create GRPC objects. - grpc_response = ::Google::Cloud::GkeHub::V1::Feature.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" - return_partial_success = true - - get_feature_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_feature, name - assert_kind_of ::Google::Cloud::GkeHub::V1::GetFeatureRequest, request - assert_equal "hello world", request["name"] - assert_equal true, request["return_partial_success"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_feature_client_stub do - # Create client - client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_feature({ name: name, return_partial_success: return_partial_success }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_feature name: name, return_partial_success: return_partial_success do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_feature ::Google::Cloud::GkeHub::V1::GetFeatureRequest.new(name: name, return_partial_success: return_partial_success) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_feature({ name: name, return_partial_success: return_partial_success }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_feature(::Google::Cloud::GkeHub::V1::GetFeatureRequest.new(name: name, return_partial_success: return_partial_success), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_feature_client_stub.call_rpc_count - end - end - - def test_create_membership - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.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" - membership_id = "hello world" - resource = {} - request_id = "hello world" - - create_membership_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_membership, name - assert_kind_of ::Google::Cloud::GkeHub::V1::CreateMembershipRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["membership_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GkeHub::V1::Membership), request["resource"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_membership_client_stub do - # Create client - client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_membership({ parent: parent, membership_id: membership_id, resource: resource, request_id: request_id }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_membership parent: parent, membership_id: membership_id, resource: resource, request_id: request_id do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_membership ::Google::Cloud::GkeHub::V1::CreateMembershipRequest.new(parent: parent, membership_id: membership_id, resource: resource, request_id: request_id) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_membership({ parent: parent, membership_id: membership_id, resource: resource, request_id: request_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_membership(::Google::Cloud::GkeHub::V1::CreateMembershipRequest.new(parent: parent, membership_id: membership_id, resource: resource, request_id: request_id), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_membership_client_stub.call_rpc_count - end - end - - def test_create_feature - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.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" - feature_id = "hello world" - resource = {} - request_id = "hello world" - - create_feature_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_feature, name - assert_kind_of ::Google::Cloud::GkeHub::V1::CreateFeatureRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["feature_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GkeHub::V1::Feature), request["resource"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_feature_client_stub do - # Create client - client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_feature({ parent: parent, feature_id: feature_id, resource: resource, request_id: request_id }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_feature parent: parent, feature_id: feature_id, resource: resource, request_id: request_id do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_feature ::Google::Cloud::GkeHub::V1::CreateFeatureRequest.new(parent: parent, feature_id: feature_id, resource: resource, request_id: request_id) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_feature({ parent: parent, feature_id: feature_id, resource: resource, request_id: request_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_feature(::Google::Cloud::GkeHub::V1::CreateFeatureRequest.new(parent: parent, feature_id: feature_id, resource: resource, request_id: request_id), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_feature_client_stub.call_rpc_count - end - end - - def test_delete_membership - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.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" - request_id = "hello world" - force = true - - delete_membership_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_membership, name - assert_kind_of ::Google::Cloud::GkeHub::V1::DeleteMembershipRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["request_id"] - assert_equal true, request["force"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_membership_client_stub do - # Create client - client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_membership({ name: name, request_id: request_id, force: force }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_membership name: name, request_id: request_id, force: force do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_membership ::Google::Cloud::GkeHub::V1::DeleteMembershipRequest.new(name: name, request_id: request_id, force: force) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_membership({ name: name, request_id: request_id, force: force }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_membership(::Google::Cloud::GkeHub::V1::DeleteMembershipRequest.new(name: name, request_id: request_id, force: force), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_membership_client_stub.call_rpc_count - end - end - - def test_delete_feature - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - force = true - request_id = "hello world" - - delete_feature_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_feature, name - assert_kind_of ::Google::Cloud::GkeHub::V1::DeleteFeatureRequest, request - assert_equal "hello world", request["name"] - assert_equal true, request["force"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_feature_client_stub do - # Create client - client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_feature({ name: name, force: force, request_id: request_id }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_feature name: name, force: force, request_id: request_id do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_feature ::Google::Cloud::GkeHub::V1::DeleteFeatureRequest.new(name: name, force: force, request_id: request_id) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_feature({ name: name, force: force, request_id: request_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_feature(::Google::Cloud::GkeHub::V1::DeleteFeatureRequest.new(name: name, force: force, request_id: request_id), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_feature_client_stub.call_rpc_count - end - end - - def test_update_membership - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.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" - update_mask = {} - resource = {} - request_id = "hello world" - - update_membership_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_membership, name - assert_kind_of ::Google::Cloud::GkeHub::V1::UpdateMembershipRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GkeHub::V1::Membership), request["resource"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_membership_client_stub do - # Create client - client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_membership({ name: name, update_mask: update_mask, resource: resource, request_id: request_id }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_membership name: name, update_mask: update_mask, resource: resource, request_id: request_id do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_membership ::Google::Cloud::GkeHub::V1::UpdateMembershipRequest.new(name: name, update_mask: update_mask, resource: resource, request_id: request_id) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_membership({ name: name, update_mask: update_mask, resource: resource, request_id: request_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_membership(::Google::Cloud::GkeHub::V1::UpdateMembershipRequest.new(name: name, update_mask: update_mask, resource: resource, request_id: request_id), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_membership_client_stub.call_rpc_count - end - end - - def test_update_feature - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.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" - update_mask = {} - resource = {} - request_id = "hello world" - - update_feature_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_feature, name - assert_kind_of ::Google::Cloud::GkeHub::V1::UpdateFeatureRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GkeHub::V1::Feature), request["resource"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_feature_client_stub do - # Create client - client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_feature({ name: name, update_mask: update_mask, resource: resource, request_id: request_id }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_feature name: name, update_mask: update_mask, resource: resource, request_id: request_id do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_feature ::Google::Cloud::GkeHub::V1::UpdateFeatureRequest.new(name: name, update_mask: update_mask, resource: resource, request_id: request_id) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_feature({ name: name, update_mask: update_mask, resource: resource, request_id: request_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_feature(::Google::Cloud::GkeHub::V1::UpdateFeatureRequest.new(name: name, update_mask: update_mask, resource: resource, request_id: request_id), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_feature_client_stub.call_rpc_count - end - end - - def test_generate_connect_manifest - # Create GRPC objects. - grpc_response = ::Google::Cloud::GkeHub::V1::GenerateConnectManifestResponse.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" - namespace = "hello world" - proxy = "hello world" - version = "hello world" - is_upgrade = true - registry = "hello world" - image_pull_secret_content = "hello world" - - generate_connect_manifest_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :generate_connect_manifest, name - assert_kind_of ::Google::Cloud::GkeHub::V1::GenerateConnectManifestRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["namespace"] - assert_equal "hello world", request["proxy"] - assert_equal "hello world", request["version"] - assert_equal true, request["is_upgrade"] - assert_equal "hello world", request["registry"] - assert_equal "hello world", request["image_pull_secret_content"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, generate_connect_manifest_client_stub do - # Create client - client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.generate_connect_manifest({ name: name, namespace: namespace, proxy: proxy, version: version, is_upgrade: is_upgrade, registry: registry, image_pull_secret_content: image_pull_secret_content }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.generate_connect_manifest name: name, namespace: namespace, proxy: proxy, version: version, is_upgrade: is_upgrade, registry: registry, image_pull_secret_content: image_pull_secret_content do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.generate_connect_manifest ::Google::Cloud::GkeHub::V1::GenerateConnectManifestRequest.new(name: name, namespace: namespace, proxy: proxy, version: version, is_upgrade: is_upgrade, registry: registry, image_pull_secret_content: image_pull_secret_content) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.generate_connect_manifest({ name: name, namespace: namespace, proxy: proxy, version: version, is_upgrade: is_upgrade, registry: registry, image_pull_secret_content: image_pull_secret_content }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.generate_connect_manifest(::Google::Cloud::GkeHub::V1::GenerateConnectManifestRequest.new(name: name, namespace: namespace, proxy: proxy, version: version, is_upgrade: is_upgrade, registry: registry, image_pull_secret_content: image_pull_secret_content), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, generate_connect_manifest_client_stub.call_rpc_count - end - end - - def test_create_fleet - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.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" - fleet = {} - - create_fleet_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_fleet, name - assert_kind_of ::Google::Cloud::GkeHub::V1::CreateFleetRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GkeHub::V1::Fleet), request["fleet"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_fleet_client_stub do - # Create client - client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_fleet({ parent: parent, fleet: fleet }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_fleet parent: parent, fleet: fleet do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_fleet ::Google::Cloud::GkeHub::V1::CreateFleetRequest.new(parent: parent, fleet: fleet) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_fleet({ parent: parent, fleet: fleet }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_fleet(::Google::Cloud::GkeHub::V1::CreateFleetRequest.new(parent: parent, fleet: fleet), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_fleet_client_stub.call_rpc_count - end - end - - def test_get_fleet - # Create GRPC objects. - grpc_response = ::Google::Cloud::GkeHub::V1::Fleet.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_fleet_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_fleet, name - assert_kind_of ::Google::Cloud::GkeHub::V1::GetFleetRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_fleet_client_stub do - # Create client - client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_fleet({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_fleet name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_fleet ::Google::Cloud::GkeHub::V1::GetFleetRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_fleet({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_fleet(::Google::Cloud::GkeHub::V1::GetFleetRequest.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_fleet_client_stub.call_rpc_count - end - end - - def test_update_fleet - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.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. - fleet = {} - update_mask = {} - - update_fleet_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_fleet, name - assert_kind_of ::Google::Cloud::GkeHub::V1::UpdateFleetRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GkeHub::V1::Fleet), request["fleet"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_fleet_client_stub do - # Create client - client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_fleet({ fleet: fleet, update_mask: update_mask }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_fleet fleet: fleet, update_mask: update_mask do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_fleet ::Google::Cloud::GkeHub::V1::UpdateFleetRequest.new(fleet: fleet, update_mask: update_mask) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_fleet({ fleet: fleet, update_mask: update_mask }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_fleet(::Google::Cloud::GkeHub::V1::UpdateFleetRequest.new(fleet: fleet, update_mask: update_mask), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_fleet_client_stub.call_rpc_count - end - end - - def test_delete_fleet - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.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_fleet_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_fleet, name - assert_kind_of ::Google::Cloud::GkeHub::V1::DeleteFleetRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_fleet_client_stub do - # Create client - client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_fleet({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_fleet name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_fleet ::Google::Cloud::GkeHub::V1::DeleteFleetRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_fleet({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_fleet(::Google::Cloud::GkeHub::V1::DeleteFleetRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_fleet_client_stub.call_rpc_count - end - end - - def test_list_fleets - # Create GRPC objects. - grpc_response = ::Google::Cloud::GkeHub::V1::ListFleetsResponse.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_token = "hello world" - page_size = 42 - - list_fleets_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_fleets, name - assert_kind_of ::Google::Cloud::GkeHub::V1::ListFleetsRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["page_token"] - assert_equal 42, request["page_size"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_fleets_client_stub do - # Create client - client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_fleets({ parent: parent, page_token: page_token, page_size: page_size }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_fleets parent: parent, page_token: page_token, page_size: page_size do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_fleets ::Google::Cloud::GkeHub::V1::ListFleetsRequest.new(parent: parent, page_token: page_token, page_size: page_size) 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 - client.list_fleets({ parent: parent, page_token: page_token, page_size: page_size }, 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 - client.list_fleets(::Google::Cloud::GkeHub::V1::ListFleetsRequest.new(parent: parent, page_token: page_token, page_size: page_size), 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_fleets_client_stub.call_rpc_count - end - end - - def test_get_scope_namespace - # Create GRPC objects. - grpc_response = ::Google::Cloud::GkeHub::V1::Namespace.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_scope_namespace_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_scope_namespace, name - assert_kind_of ::Google::Cloud::GkeHub::V1::GetScopeNamespaceRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_scope_namespace_client_stub do - # Create client - client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_scope_namespace({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_scope_namespace name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_scope_namespace ::Google::Cloud::GkeHub::V1::GetScopeNamespaceRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_scope_namespace({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_scope_namespace(::Google::Cloud::GkeHub::V1::GetScopeNamespaceRequest.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_scope_namespace_client_stub.call_rpc_count - end - end - - def test_create_scope_namespace - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.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" - scope_namespace_id = "hello world" - scope_namespace = {} - - create_scope_namespace_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_scope_namespace, name - assert_kind_of ::Google::Cloud::GkeHub::V1::CreateScopeNamespaceRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["scope_namespace_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GkeHub::V1::Namespace), request["scope_namespace"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_scope_namespace_client_stub do - # Create client - client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_scope_namespace({ parent: parent, scope_namespace_id: scope_namespace_id, scope_namespace: scope_namespace }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_scope_namespace parent: parent, scope_namespace_id: scope_namespace_id, scope_namespace: scope_namespace do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_scope_namespace ::Google::Cloud::GkeHub::V1::CreateScopeNamespaceRequest.new(parent: parent, scope_namespace_id: scope_namespace_id, scope_namespace: scope_namespace) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_scope_namespace({ parent: parent, scope_namespace_id: scope_namespace_id, scope_namespace: scope_namespace }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_scope_namespace(::Google::Cloud::GkeHub::V1::CreateScopeNamespaceRequest.new(parent: parent, scope_namespace_id: scope_namespace_id, scope_namespace: scope_namespace), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_scope_namespace_client_stub.call_rpc_count - end - end - - def test_update_scope_namespace - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.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. - scope_namespace = {} - update_mask = {} - - update_scope_namespace_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_scope_namespace, name - assert_kind_of ::Google::Cloud::GkeHub::V1::UpdateScopeNamespaceRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GkeHub::V1::Namespace), request["scope_namespace"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_scope_namespace_client_stub do - # Create client - client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_scope_namespace({ scope_namespace: scope_namespace, update_mask: update_mask }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_scope_namespace scope_namespace: scope_namespace, update_mask: update_mask do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_scope_namespace ::Google::Cloud::GkeHub::V1::UpdateScopeNamespaceRequest.new(scope_namespace: scope_namespace, update_mask: update_mask) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_scope_namespace({ scope_namespace: scope_namespace, update_mask: update_mask }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_scope_namespace(::Google::Cloud::GkeHub::V1::UpdateScopeNamespaceRequest.new(scope_namespace: scope_namespace, update_mask: update_mask), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_scope_namespace_client_stub.call_rpc_count - end - end - - def test_delete_scope_namespace - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.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_scope_namespace_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_scope_namespace, name - assert_kind_of ::Google::Cloud::GkeHub::V1::DeleteScopeNamespaceRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_scope_namespace_client_stub do - # Create client - client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_scope_namespace({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_scope_namespace name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_scope_namespace ::Google::Cloud::GkeHub::V1::DeleteScopeNamespaceRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_scope_namespace({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_scope_namespace(::Google::Cloud::GkeHub::V1::DeleteScopeNamespaceRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_scope_namespace_client_stub.call_rpc_count - end - end - - def test_list_scope_namespaces - # Create GRPC objects. - grpc_response = ::Google::Cloud::GkeHub::V1::ListScopeNamespacesResponse.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_scope_namespaces_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_scope_namespaces, name - assert_kind_of ::Google::Cloud::GkeHub::V1::ListScopeNamespacesRequest, 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_scope_namespaces_client_stub do - # Create client - client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_scope_namespaces({ 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 - client.list_scope_namespaces 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 - client.list_scope_namespaces ::Google::Cloud::GkeHub::V1::ListScopeNamespacesRequest.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 - client.list_scope_namespaces({ 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 - client.list_scope_namespaces(::Google::Cloud::GkeHub::V1::ListScopeNamespacesRequest.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_scope_namespaces_client_stub.call_rpc_count - end - end - - def test_get_scope_rbac_role_binding - # Create GRPC objects. - grpc_response = ::Google::Cloud::GkeHub::V1::RBACRoleBinding.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_scope_rbac_role_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_scope_rbac_role_binding, name - assert_kind_of ::Google::Cloud::GkeHub::V1::GetScopeRBACRoleBindingRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_scope_rbac_role_binding_client_stub do - # Create client - client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_scope_rbac_role_binding({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_scope_rbac_role_binding name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_scope_rbac_role_binding ::Google::Cloud::GkeHub::V1::GetScopeRBACRoleBindingRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_scope_rbac_role_binding({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_scope_rbac_role_binding(::Google::Cloud::GkeHub::V1::GetScopeRBACRoleBindingRequest.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_scope_rbac_role_binding_client_stub.call_rpc_count - end - end - - def test_create_scope_rbac_role_binding - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.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" - rbacrolebinding_id = "hello world" - rbacrolebinding = {} - - create_scope_rbac_role_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_scope_rbac_role_binding, name - assert_kind_of ::Google::Cloud::GkeHub::V1::CreateScopeRBACRoleBindingRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["rbacrolebinding_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GkeHub::V1::RBACRoleBinding), request["rbacrolebinding"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_scope_rbac_role_binding_client_stub do - # Create client - client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_scope_rbac_role_binding({ parent: parent, rbacrolebinding_id: rbacrolebinding_id, rbacrolebinding: rbacrolebinding }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_scope_rbac_role_binding parent: parent, rbacrolebinding_id: rbacrolebinding_id, rbacrolebinding: rbacrolebinding do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_scope_rbac_role_binding ::Google::Cloud::GkeHub::V1::CreateScopeRBACRoleBindingRequest.new(parent: parent, rbacrolebinding_id: rbacrolebinding_id, rbacrolebinding: rbacrolebinding) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_scope_rbac_role_binding({ parent: parent, rbacrolebinding_id: rbacrolebinding_id, rbacrolebinding: rbacrolebinding }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_scope_rbac_role_binding(::Google::Cloud::GkeHub::V1::CreateScopeRBACRoleBindingRequest.new(parent: parent, rbacrolebinding_id: rbacrolebinding_id, rbacrolebinding: rbacrolebinding), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_scope_rbac_role_binding_client_stub.call_rpc_count - end - end - - def test_update_scope_rbac_role_binding - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.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. - rbacrolebinding = {} - update_mask = {} - - update_scope_rbac_role_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_scope_rbac_role_binding, name - assert_kind_of ::Google::Cloud::GkeHub::V1::UpdateScopeRBACRoleBindingRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GkeHub::V1::RBACRoleBinding), request["rbacrolebinding"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_scope_rbac_role_binding_client_stub do - # Create client - client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_scope_rbac_role_binding({ rbacrolebinding: rbacrolebinding, update_mask: update_mask }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_scope_rbac_role_binding rbacrolebinding: rbacrolebinding, update_mask: update_mask do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_scope_rbac_role_binding ::Google::Cloud::GkeHub::V1::UpdateScopeRBACRoleBindingRequest.new(rbacrolebinding: rbacrolebinding, update_mask: update_mask) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_scope_rbac_role_binding({ rbacrolebinding: rbacrolebinding, update_mask: update_mask }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_scope_rbac_role_binding(::Google::Cloud::GkeHub::V1::UpdateScopeRBACRoleBindingRequest.new(rbacrolebinding: rbacrolebinding, update_mask: update_mask), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_scope_rbac_role_binding_client_stub.call_rpc_count - end - end - - def test_delete_scope_rbac_role_binding - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.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_scope_rbac_role_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_scope_rbac_role_binding, name - assert_kind_of ::Google::Cloud::GkeHub::V1::DeleteScopeRBACRoleBindingRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_scope_rbac_role_binding_client_stub do - # Create client - client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_scope_rbac_role_binding({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_scope_rbac_role_binding name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_scope_rbac_role_binding ::Google::Cloud::GkeHub::V1::DeleteScopeRBACRoleBindingRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_scope_rbac_role_binding({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_scope_rbac_role_binding(::Google::Cloud::GkeHub::V1::DeleteScopeRBACRoleBindingRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_scope_rbac_role_binding_client_stub.call_rpc_count - end - end - - def test_list_scope_rbac_role_bindings - # Create GRPC objects. - grpc_response = ::Google::Cloud::GkeHub::V1::ListScopeRBACRoleBindingsResponse.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_scope_rbac_role_bindings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_scope_rbac_role_bindings, name - assert_kind_of ::Google::Cloud::GkeHub::V1::ListScopeRBACRoleBindingsRequest, 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_scope_rbac_role_bindings_client_stub do - # Create client - client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_scope_rbac_role_bindings({ 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 - client.list_scope_rbac_role_bindings 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 - client.list_scope_rbac_role_bindings ::Google::Cloud::GkeHub::V1::ListScopeRBACRoleBindingsRequest.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 - client.list_scope_rbac_role_bindings({ 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 - client.list_scope_rbac_role_bindings(::Google::Cloud::GkeHub::V1::ListScopeRBACRoleBindingsRequest.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_scope_rbac_role_bindings_client_stub.call_rpc_count - end - end - - def test_get_scope - # Create GRPC objects. - grpc_response = ::Google::Cloud::GkeHub::V1::Scope.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_scope_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_scope, name - assert_kind_of ::Google::Cloud::GkeHub::V1::GetScopeRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_scope_client_stub do - # Create client - client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_scope({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_scope name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_scope ::Google::Cloud::GkeHub::V1::GetScopeRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_scope({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_scope(::Google::Cloud::GkeHub::V1::GetScopeRequest.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_scope_client_stub.call_rpc_count - end - end - - def test_create_scope - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.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" - scope_id = "hello world" - scope = {} - - create_scope_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_scope, name - assert_kind_of ::Google::Cloud::GkeHub::V1::CreateScopeRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["scope_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GkeHub::V1::Scope), request["scope"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_scope_client_stub do - # Create client - client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_scope({ parent: parent, scope_id: scope_id, scope: scope }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_scope parent: parent, scope_id: scope_id, scope: scope do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_scope ::Google::Cloud::GkeHub::V1::CreateScopeRequest.new(parent: parent, scope_id: scope_id, scope: scope) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_scope({ parent: parent, scope_id: scope_id, scope: scope }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_scope(::Google::Cloud::GkeHub::V1::CreateScopeRequest.new(parent: parent, scope_id: scope_id, scope: scope), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_scope_client_stub.call_rpc_count - end - end - - def test_update_scope - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.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. - scope = {} - update_mask = {} - - update_scope_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_scope, name - assert_kind_of ::Google::Cloud::GkeHub::V1::UpdateScopeRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GkeHub::V1::Scope), request["scope"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_scope_client_stub do - # Create client - client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_scope({ scope: scope, update_mask: update_mask }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_scope scope: scope, update_mask: update_mask do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_scope ::Google::Cloud::GkeHub::V1::UpdateScopeRequest.new(scope: scope, update_mask: update_mask) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_scope({ scope: scope, update_mask: update_mask }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_scope(::Google::Cloud::GkeHub::V1::UpdateScopeRequest.new(scope: scope, update_mask: update_mask), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_scope_client_stub.call_rpc_count - end - end - - def test_delete_scope - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.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_scope_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_scope, name - assert_kind_of ::Google::Cloud::GkeHub::V1::DeleteScopeRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_scope_client_stub do - # Create client - client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_scope({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_scope name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_scope ::Google::Cloud::GkeHub::V1::DeleteScopeRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_scope({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_scope(::Google::Cloud::GkeHub::V1::DeleteScopeRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_scope_client_stub.call_rpc_count - end - end - - def test_list_scopes - # Create GRPC objects. - grpc_response = ::Google::Cloud::GkeHub::V1::ListScopesResponse.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_scopes_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_scopes, name - assert_kind_of ::Google::Cloud::GkeHub::V1::ListScopesRequest, 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_scopes_client_stub do - # Create client - client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_scopes({ 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 - client.list_scopes 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 - client.list_scopes ::Google::Cloud::GkeHub::V1::ListScopesRequest.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 - client.list_scopes({ 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 - client.list_scopes(::Google::Cloud::GkeHub::V1::ListScopesRequest.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_scopes_client_stub.call_rpc_count - end - end - - def test_list_permitted_scopes - # Create GRPC objects. - grpc_response = ::Google::Cloud::GkeHub::V1::ListPermittedScopesResponse.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_permitted_scopes_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_permitted_scopes, name - assert_kind_of ::Google::Cloud::GkeHub::V1::ListPermittedScopesRequest, 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_permitted_scopes_client_stub do - # Create client - client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_permitted_scopes({ 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 - client.list_permitted_scopes 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 - client.list_permitted_scopes ::Google::Cloud::GkeHub::V1::ListPermittedScopesRequest.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 - client.list_permitted_scopes({ 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 - client.list_permitted_scopes(::Google::Cloud::GkeHub::V1::ListPermittedScopesRequest.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_permitted_scopes_client_stub.call_rpc_count - end - end - - def test_get_membership_binding - # Create GRPC objects. - grpc_response = ::Google::Cloud::GkeHub::V1::MembershipBinding.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_membership_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_membership_binding, name - assert_kind_of ::Google::Cloud::GkeHub::V1::GetMembershipBindingRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_membership_binding_client_stub do - # Create client - client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_membership_binding({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_membership_binding name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_membership_binding ::Google::Cloud::GkeHub::V1::GetMembershipBindingRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_membership_binding({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_membership_binding(::Google::Cloud::GkeHub::V1::GetMembershipBindingRequest.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_membership_binding_client_stub.call_rpc_count - end - end - - def test_create_membership_binding - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.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" - membership_binding = {} - membership_binding_id = "hello world" - - create_membership_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_membership_binding, name - assert_kind_of ::Google::Cloud::GkeHub::V1::CreateMembershipBindingRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GkeHub::V1::MembershipBinding), request["membership_binding"] - assert_equal "hello world", request["membership_binding_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_membership_binding_client_stub do - # Create client - client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_membership_binding({ parent: parent, membership_binding: membership_binding, membership_binding_id: membership_binding_id }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_membership_binding parent: parent, membership_binding: membership_binding, membership_binding_id: membership_binding_id do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_membership_binding ::Google::Cloud::GkeHub::V1::CreateMembershipBindingRequest.new(parent: parent, membership_binding: membership_binding, membership_binding_id: membership_binding_id) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_membership_binding({ parent: parent, membership_binding: membership_binding, membership_binding_id: membership_binding_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_membership_binding(::Google::Cloud::GkeHub::V1::CreateMembershipBindingRequest.new(parent: parent, membership_binding: membership_binding, membership_binding_id: membership_binding_id), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_membership_binding_client_stub.call_rpc_count - end - end - - def test_update_membership_binding - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.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. - membership_binding = {} - update_mask = {} - - update_membership_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_membership_binding, name - assert_kind_of ::Google::Cloud::GkeHub::V1::UpdateMembershipBindingRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GkeHub::V1::MembershipBinding), request["membership_binding"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_membership_binding_client_stub do - # Create client - client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_membership_binding({ membership_binding: membership_binding, update_mask: update_mask }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_membership_binding membership_binding: membership_binding, update_mask: update_mask do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_membership_binding ::Google::Cloud::GkeHub::V1::UpdateMembershipBindingRequest.new(membership_binding: membership_binding, update_mask: update_mask) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_membership_binding({ membership_binding: membership_binding, update_mask: update_mask }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_membership_binding(::Google::Cloud::GkeHub::V1::UpdateMembershipBindingRequest.new(membership_binding: membership_binding, update_mask: update_mask), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_membership_binding_client_stub.call_rpc_count - end - end - - def test_delete_membership_binding - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.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_membership_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_membership_binding, name - assert_kind_of ::Google::Cloud::GkeHub::V1::DeleteMembershipBindingRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_membership_binding_client_stub do - # Create client - client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_membership_binding({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_membership_binding name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_membership_binding ::Google::Cloud::GkeHub::V1::DeleteMembershipBindingRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_membership_binding({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_membership_binding(::Google::Cloud::GkeHub::V1::DeleteMembershipBindingRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_membership_binding_client_stub.call_rpc_count - end - end - - def test_list_membership_bindings - # Create GRPC objects. - grpc_response = ::Google::Cloud::GkeHub::V1::ListMembershipBindingsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - page_size = 42 - page_token = "hello world" - filter = "hello world" - - list_membership_bindings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_membership_bindings, name - assert_kind_of ::Google::Cloud::GkeHub::V1::ListMembershipBindingsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_membership_bindings_client_stub do - # Create client - client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_membership_bindings({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_membership_bindings parent: parent, page_size: page_size, page_token: page_token, filter: filter do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_membership_bindings ::Google::Cloud::GkeHub::V1::ListMembershipBindingsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter) 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 - client.list_membership_bindings({ parent: parent, page_size: page_size, page_token: page_token, filter: filter }, 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 - client.list_membership_bindings(::Google::Cloud::GkeHub::V1::ListMembershipBindingsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter), 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_membership_bindings_client_stub.call_rpc_count - end - end - - def test_get_membership_rbac_role_binding - # Create GRPC objects. - grpc_response = ::Google::Cloud::GkeHub::V1::RBACRoleBinding.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_membership_rbac_role_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_membership_rbac_role_binding, name - assert_kind_of ::Google::Cloud::GkeHub::V1::GetMembershipRBACRoleBindingRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_membership_rbac_role_binding_client_stub do - # Create client - client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_membership_rbac_role_binding({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_membership_rbac_role_binding name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_membership_rbac_role_binding ::Google::Cloud::GkeHub::V1::GetMembershipRBACRoleBindingRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_membership_rbac_role_binding({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_membership_rbac_role_binding(::Google::Cloud::GkeHub::V1::GetMembershipRBACRoleBindingRequest.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_membership_rbac_role_binding_client_stub.call_rpc_count - end - end - - def test_create_membership_rbac_role_binding - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.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" - rbacrolebinding_id = "hello world" - rbacrolebinding = {} - - create_membership_rbac_role_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_membership_rbac_role_binding, name - assert_kind_of ::Google::Cloud::GkeHub::V1::CreateMembershipRBACRoleBindingRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["rbacrolebinding_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GkeHub::V1::RBACRoleBinding), request["rbacrolebinding"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_membership_rbac_role_binding_client_stub do - # Create client - client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_membership_rbac_role_binding({ parent: parent, rbacrolebinding_id: rbacrolebinding_id, rbacrolebinding: rbacrolebinding }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_membership_rbac_role_binding parent: parent, rbacrolebinding_id: rbacrolebinding_id, rbacrolebinding: rbacrolebinding do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_membership_rbac_role_binding ::Google::Cloud::GkeHub::V1::CreateMembershipRBACRoleBindingRequest.new(parent: parent, rbacrolebinding_id: rbacrolebinding_id, rbacrolebinding: rbacrolebinding) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_membership_rbac_role_binding({ parent: parent, rbacrolebinding_id: rbacrolebinding_id, rbacrolebinding: rbacrolebinding }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_membership_rbac_role_binding(::Google::Cloud::GkeHub::V1::CreateMembershipRBACRoleBindingRequest.new(parent: parent, rbacrolebinding_id: rbacrolebinding_id, rbacrolebinding: rbacrolebinding), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_membership_rbac_role_binding_client_stub.call_rpc_count - end - end - - def test_update_membership_rbac_role_binding - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.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. - rbacrolebinding = {} - update_mask = {} - - update_membership_rbac_role_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_membership_rbac_role_binding, name - assert_kind_of ::Google::Cloud::GkeHub::V1::UpdateMembershipRBACRoleBindingRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GkeHub::V1::RBACRoleBinding), request["rbacrolebinding"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_membership_rbac_role_binding_client_stub do - # Create client - client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_membership_rbac_role_binding({ rbacrolebinding: rbacrolebinding, update_mask: update_mask }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_membership_rbac_role_binding rbacrolebinding: rbacrolebinding, update_mask: update_mask do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_membership_rbac_role_binding ::Google::Cloud::GkeHub::V1::UpdateMembershipRBACRoleBindingRequest.new(rbacrolebinding: rbacrolebinding, update_mask: update_mask) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_membership_rbac_role_binding({ rbacrolebinding: rbacrolebinding, update_mask: update_mask }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_membership_rbac_role_binding(::Google::Cloud::GkeHub::V1::UpdateMembershipRBACRoleBindingRequest.new(rbacrolebinding: rbacrolebinding, update_mask: update_mask), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_membership_rbac_role_binding_client_stub.call_rpc_count - end - end - - def test_delete_membership_rbac_role_binding - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.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_membership_rbac_role_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_membership_rbac_role_binding, name - assert_kind_of ::Google::Cloud::GkeHub::V1::DeleteMembershipRBACRoleBindingRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_membership_rbac_role_binding_client_stub do - # Create client - client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_membership_rbac_role_binding({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_membership_rbac_role_binding name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_membership_rbac_role_binding ::Google::Cloud::GkeHub::V1::DeleteMembershipRBACRoleBindingRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_membership_rbac_role_binding({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_membership_rbac_role_binding(::Google::Cloud::GkeHub::V1::DeleteMembershipRBACRoleBindingRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_membership_rbac_role_binding_client_stub.call_rpc_count - end - end - - def test_list_membership_rbac_role_bindings - # Create GRPC objects. - grpc_response = ::Google::Cloud::GkeHub::V1::ListMembershipRBACRoleBindingsResponse.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_membership_rbac_role_bindings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_membership_rbac_role_bindings, name - assert_kind_of ::Google::Cloud::GkeHub::V1::ListMembershipRBACRoleBindingsRequest, 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_membership_rbac_role_bindings_client_stub do - # Create client - client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_membership_rbac_role_bindings({ 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 - client.list_membership_rbac_role_bindings 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 - client.list_membership_rbac_role_bindings ::Google::Cloud::GkeHub::V1::ListMembershipRBACRoleBindingsRequest.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 - client.list_membership_rbac_role_bindings({ 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 - client.list_membership_rbac_role_bindings(::Google::Cloud::GkeHub::V1::ListMembershipRBACRoleBindingsRequest.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_membership_rbac_role_bindings_client_stub.call_rpc_count - end - end - - def test_generate_membership_rbac_role_binding_yaml - # Create GRPC objects. - grpc_response = ::Google::Cloud::GkeHub::V1::GenerateMembershipRBACRoleBindingYAMLResponse.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" - rbacrolebinding_id = "hello world" - rbacrolebinding = {} - - generate_membership_rbac_role_binding_yaml_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :generate_membership_rbac_role_binding_yaml, name - assert_kind_of ::Google::Cloud::GkeHub::V1::GenerateMembershipRBACRoleBindingYAMLRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["rbacrolebinding_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GkeHub::V1::RBACRoleBinding), request["rbacrolebinding"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, generate_membership_rbac_role_binding_yaml_client_stub do - # Create client - client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.generate_membership_rbac_role_binding_yaml({ parent: parent, rbacrolebinding_id: rbacrolebinding_id, rbacrolebinding: rbacrolebinding }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.generate_membership_rbac_role_binding_yaml parent: parent, rbacrolebinding_id: rbacrolebinding_id, rbacrolebinding: rbacrolebinding do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.generate_membership_rbac_role_binding_yaml ::Google::Cloud::GkeHub::V1::GenerateMembershipRBACRoleBindingYAMLRequest.new(parent: parent, rbacrolebinding_id: rbacrolebinding_id, rbacrolebinding: rbacrolebinding) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.generate_membership_rbac_role_binding_yaml({ parent: parent, rbacrolebinding_id: rbacrolebinding_id, rbacrolebinding: rbacrolebinding }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.generate_membership_rbac_role_binding_yaml(::Google::Cloud::GkeHub::V1::GenerateMembershipRBACRoleBindingYAMLRequest.new(parent: parent, rbacrolebinding_id: rbacrolebinding_id, rbacrolebinding: rbacrolebinding), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, generate_membership_rbac_role_binding_yaml_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::GkeHub::V1::GkeHub::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::GkeHub::V1::GkeHub::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::GkeHub::V1::GkeHub::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::GkeHub::V1::GkeHub::Client, client - assert_equal creds, client.configure.credentials - end - end - - def test_operations_client - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::GkeHub::V1::GkeHub::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::GkeHub::V1::GkeHub::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-gke_hub-v1/test/helper.rb b/owl-bot-staging/google-cloud-gke_hub-v1/test/helper.rb deleted file mode 100644 index f0e715458fa2..000000000000 --- a/owl-bot-staging/google-cloud-gke_hub-v1/test/helper.rb +++ /dev/null @@ -1,25 +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/rg" - -require "grpc" - -require "ostruct"